Update wfdconfigmessage for supporting Wi-Fi Display sink side
[platform/core/multimedia/gst-rtsp-server-wfd.git] / src / include / rtsp-media-mapping.h
1 /* GStreamer
2  * Copyright (C) 2008 Wim Taymans <wim.taymans at gmail.com>
3
4 * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
5  *
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.
10  *
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.
15  *
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.
20  *
21
22 * * Modifications by Samsung Electronics Co., Ltd.
23
24 * 1. Applied Miracast WFD Server function
25 */
26
27 #include <gst/gst.h>
28
29 #include <gst/rtsp/gstrtspurl.h>
30
31 #include "rtsp-media-factory.h"
32
33 #ifndef __GST_RTSP_MEDIA_MAPPING_H__
34 #define __GST_RTSP_MEDIA_MAPPING_H__
35
36 G_BEGIN_DECLS
37
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))
46
47 typedef struct _GstRTSPMediaMapping GstRTSPMediaMapping;
48 typedef struct _GstRTSPMediaMappingClass GstRTSPMediaMappingClass;
49
50 /**
51  * GstRTSPMediaMapping:
52  * @mappings: the mountpoint to media mappings
53  *
54  * Creates a #GstRTSPMediaFactory object for a given url.
55  */
56 struct _GstRTSPMediaMapping {
57   GObject       parent;
58
59   GHashTable   *mappings;
60 };
61
62 /**
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().
67  *
68  * The class for the media mapping object.
69  */
70 struct _GstRTSPMediaMappingClass {
71   GObjectClass  parent_class;
72
73   GstRTSPMediaFactory * (*find_media)  (GstRTSPMediaMapping *mapping, const GstRTSPUrl *url);
74 };
75
76 GType                 gst_rtsp_media_mapping_get_type     (void);
77
78 /* creating a mapping */
79 GstRTSPMediaMapping * gst_rtsp_media_mapping_new          (void);
80
81 /* finding a media factory */
82 GstRTSPMediaFactory * gst_rtsp_media_mapping_find_factory   (GstRTSPMediaMapping *mapping, const GstRTSPUrl *url);
83
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);
88
89 G_END_DECLS
90
91 #endif /* __GST_RTSP_MEDIA_MAPPING_H__ */