Added gst-plugins-base-subtitles0.10-0.10.34 for Meego Harmattan 1.2
[mafwsubrenderer] / gst-plugins-base-subtitles0.10 / gst-libs / gst / rtsp / gstrtspextension.h
1 /* GStreamer RTSP Extension
2  * Copyright (C) 2007 Wim Taymans <wim@fluendo.com>
3  *
4  * gstrtspextension.h: RTSP Extension interface.
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 #ifndef __GST_RTSP_EXTENSION_H__
23 #define __GST_RTSP_EXTENSION_H__
24
25 #include <gst/gst.h>
26
27 #include <gst/sdp/gstsdpmessage.h>
28 #include <gst/rtsp/gstrtsptransport.h>
29 #include <gst/rtsp/gstrtspmessage.h>
30 #include <gst/rtsp/gstrtspurl.h>
31
32 G_BEGIN_DECLS
33
34 #define GST_TYPE_RTSP_EXTENSION \
35   (gst_rtsp_extension_get_type ())
36 #define GST_RTSP_EXTENSION(obj) \
37   (GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_RTSP_EXTENSION, GstRTSPExtension))
38 #define GST_IS_RTSP_EXTENSION(obj) \
39   (GST_IMPLEMENTS_INTERFACE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_RTSP_EXTENSION))
40 #define GST_RTSP_EXTENSION_GET_IFACE(inst) \
41   (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GST_TYPE_RTSP_EXTENSION, GstRTSPExtensionInterface))
42
43 typedef struct _GstRTSPExtension GstRTSPExtension;
44 typedef struct _GstRTSPExtensionInterface GstRTSPExtensionInterface;
45
46 struct _GstRTSPExtensionInterface {
47   GTypeInterface parent;
48
49   /* vfunctions */
50   gboolean      (*detect_server)    (GstRTSPExtension *ext, GstRTSPMessage *resp);
51
52   GstRTSPResult (*before_send)      (GstRTSPExtension *ext, GstRTSPMessage *req);
53   GstRTSPResult (*after_send)       (GstRTSPExtension *ext, GstRTSPMessage *req, GstRTSPMessage *resp);
54
55   GstRTSPResult (*parse_sdp)        (GstRTSPExtension *ext, GstSDPMessage *sdp, GstStructure *s);
56   GstRTSPResult (*setup_media)      (GstRTSPExtension *ext, GstSDPMedia *media);
57
58   gboolean      (*configure_stream) (GstRTSPExtension *ext, GstCaps *caps);
59
60   GstRTSPResult (*get_transports)   (GstRTSPExtension *ext, GstRTSPLowerTrans protocols, gchar **transport);
61
62   GstRTSPResult (*stream_select)    (GstRTSPExtension *ext, GstRTSPUrl *url);
63
64   /* signals */
65   GstRTSPResult (*send)             (GstRTSPExtension *ext, GstRTSPMessage *req, GstRTSPMessage *resp);
66
67   /* ABI: more vfunctions added later */
68   GstRTSPResult (*receive_request)  (GstRTSPExtension *ext, GstRTSPMessage *req);
69
70   /*< private >*/
71   gpointer                 _gst_reserved[GST_PADDING - 1];
72 };
73
74 GType           gst_rtsp_extension_get_type          (void);
75
76 /* invoke vfunction on interface */
77 gboolean        gst_rtsp_extension_detect_server     (GstRTSPExtension *ext, GstRTSPMessage *resp);
78   
79 GstRTSPResult   gst_rtsp_extension_before_send       (GstRTSPExtension *ext, GstRTSPMessage *req);
80 GstRTSPResult   gst_rtsp_extension_after_send        (GstRTSPExtension *ext, GstRTSPMessage *req,
81                                                       GstRTSPMessage *resp);
82 GstRTSPResult   gst_rtsp_extension_parse_sdp         (GstRTSPExtension *ext, GstSDPMessage *sdp,
83                                                       GstStructure *s);
84 GstRTSPResult   gst_rtsp_extension_setup_media       (GstRTSPExtension *ext, GstSDPMedia *media);
85 gboolean        gst_rtsp_extension_configure_stream  (GstRTSPExtension *ext, GstCaps *caps);
86 GstRTSPResult   gst_rtsp_extension_get_transports    (GstRTSPExtension *ext, GstRTSPLowerTrans protocols,
87                                                       gchar **transport);
88 GstRTSPResult   gst_rtsp_extension_stream_select     (GstRTSPExtension *ext, GstRTSPUrl *url);
89 GstRTSPResult   gst_rtsp_extension_receive_request   (GstRTSPExtension *ext, GstRTSPMessage *req);
90
91 /* signal emision */
92 GstRTSPResult   gst_rtsp_extension_send              (GstRTSPExtension *ext, GstRTSPMessage *req,
93                                                       GstRTSPMessage *resp);
94
95 G_END_DECLS
96
97 #endif /* __GST_RTSP_EXTENSION_H__ */