2 * Copyright (C) 2008 Wim Taymans <wim.taymans at gmail.com>
4 * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
22 * * Modifications by Samsung Electronics Co., Ltd.
24 * 1. Applied Miracast WFD Server function
29 #include <gst/rtsp/gstrtspurl.h>
31 #include "rtsp-media-factory.h"
33 #ifndef __GST_RTSP_MEDIA_MAPPING_H__
34 #define __GST_RTSP_MEDIA_MAPPING_H__
38 #define GST_TYPE_RTSP_MEDIA_MAPPING (gst_rtsp_media_mapping_get_type ())
39 #define GST_IS_RTSP_MEDIA_MAPPING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_RTSP_MEDIA_MAPPING))
40 #define GST_IS_RTSP_MEDIA_MAPPING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_RTSP_MEDIA_MAPPING))
41 #define GST_RTSP_MEDIA_MAPPING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_RTSP_MEDIA_MAPPING, GstRTSPMediaMappingClass))
42 #define GST_RTSP_MEDIA_MAPPING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_RTSP_MEDIA_MAPPING, GstRTSPMediaMapping))
43 #define GST_RTSP_MEDIA_MAPPING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_RTSP_MEDIA_MAPPING, GstRTSPMediaMappingClass))
44 #define GST_RTSP_MEDIA_MAPPING_CAST(obj) ((GstRTSPMediaMapping*)(obj))
45 #define GST_RTSP_MEDIA_MAPPING_CLASS_CAST(klass) ((GstRTSPMediaMappingClass*)(klass))
47 typedef struct _GstRTSPMediaMapping GstRTSPMediaMapping;
48 typedef struct _GstRTSPMediaMappingClass GstRTSPMediaMappingClass;
51 * GstRTSPMediaMapping:
52 * @mappings: the mountpoint to media mappings
54 * Creates a #GstRTSPMediaFactory object for a given url.
56 struct _GstRTSPMediaMapping {
63 * GstRTSPMediaMappingClass:
64 * @find_media: Create or return a previously cached #GstRTSPMediaFactory object
65 * for the given url. the default implementation will use the mappings
66 * added with gst_rtsp_media_mapping_add_factory().
68 * The class for the media mapping object.
70 struct _GstRTSPMediaMappingClass {
71 GObjectClass parent_class;
73 GstRTSPMediaFactory * (*find_media) (GstRTSPMediaMapping *mapping, const GstRTSPUrl *url);
76 GType gst_rtsp_media_mapping_get_type (void);
78 /* creating a mapping */
79 GstRTSPMediaMapping * gst_rtsp_media_mapping_new (void);
81 /* finding a media factory */
82 GstRTSPMediaFactory * gst_rtsp_media_mapping_find_factory (GstRTSPMediaMapping *mapping, const GstRTSPUrl *url);
84 /* managing media to a path */
85 void gst_rtsp_media_mapping_add_factory (GstRTSPMediaMapping *mapping, const gchar *path,
86 GstRTSPMediaFactory *factory);
87 void gst_rtsp_media_mapping_remove_factory (GstRTSPMediaMapping *mapping, const gchar *path);
91 #endif /* __GST_RTSP_MEDIA_MAPPING_H__ */