|
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 /*< private >*/ |
|
68 gpointer _gst_reserved[GST_PADDING]; |
|
69 }; |
|
70 |
|
71 GType gst_rtsp_extension_get_type (void); |
|
72 |
|
73 /* invoke vfunction on interface */ |
|
74 gboolean gst_rtsp_extension_detect_server (GstRTSPExtension *ext, GstRTSPMessage *resp); |
|
75 |
|
76 GstRTSPResult gst_rtsp_extension_before_send (GstRTSPExtension *ext, GstRTSPMessage *req); |
|
77 GstRTSPResult gst_rtsp_extension_after_send (GstRTSPExtension *ext, GstRTSPMessage *req, |
|
78 GstRTSPMessage *resp); |
|
79 GstRTSPResult gst_rtsp_extension_parse_sdp (GstRTSPExtension *ext, GstSDPMessage *sdp, |
|
80 GstStructure *s); |
|
81 GstRTSPResult gst_rtsp_extension_setup_media (GstRTSPExtension *ext, GstSDPMedia *media); |
|
82 gboolean gst_rtsp_extension_configure_stream (GstRTSPExtension *ext, GstCaps *caps); |
|
83 GstRTSPResult gst_rtsp_extension_get_transports (GstRTSPExtension *ext, GstRTSPLowerTrans protocols, |
|
84 gchar **transport); |
|
85 GstRTSPResult gst_rtsp_extension_stream_select (GstRTSPExtension *ext, GstRTSPUrl *url); |
|
86 |
|
87 /* signal emision */ |
|
88 GstRTSPResult gst_rtsp_extension_send (GstRTSPExtension *ext, GstRTSPMessage *req, |
|
89 GstRTSPMessage *resp); |
|
90 |
|
91 G_END_DECLS |
|
92 |
|
93 #endif /* __GST_RTSP_EXTENSION_H__ */ |