2 * Copyright (C) <2005,2006> Wim Taymans <wim@fluendo.com>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
20 * Unless otherwise indicated, Source Code is licensed under MIT license.
21 * See further explanation attached in License Statement (distributed in the file
24 * Permission is hereby granted, free of charge, to any person obtaining a copy of
25 * this software and associated documentation files (the "Software"), to deal in
26 * the Software without restriction, including without limitation the rights to
27 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
28 * of the Software, and to permit persons to whom the Software is furnished to do
29 * so, subject to the following conditions:
31 * The above copyright notice and this permission notice shall be included in all
32 * copies or substantial portions of the Software.
34 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
35 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
36 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
37 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
38 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
39 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
43 #ifndef __GST_RTSP_TRANSPORT_H__
44 #define __GST_RTSP_TRANSPORT_H__
46 #include <gst/rtsp/gstrtspdefs.h>
52 * @GST_RTSP_TRANS_UNKNOWN: invalid tansport mode
53 * @GST_RTSP_TRANS_RTP: transfer RTP data
54 * @GST_RTSP_TRANS_RDT: transfer RDT (RealMedia) data
56 * The transfer mode to use.
59 GST_RTSP_TRANS_UNKNOWN = 0,
60 GST_RTSP_TRANS_RTP = (1 << 0),
61 GST_RTSP_TRANS_RDT = (1 << 1)
66 * @GST_RTSP_PROFILE_UNKNOWN: invalid profile
67 * @GST_RTSP_PROFILE_AVP: the Audio/Visual profile
68 * @GST_RTSP_PROFILE_SAVP: the secure Audio/Visual profile
70 * The transfer profile to use.
73 GST_RTSP_PROFILE_UNKNOWN = 0,
74 GST_RTSP_PROFILE_AVP = (1 << 0),
75 GST_RTSP_PROFILE_SAVP = (1 << 1)
80 * @GST_RTSP_LOWER_TRANS_UNKNOWN: invalid transport flag
81 * @GST_RTSP_LOWER_TRANS_UDP: stream data over UDP
82 * @GST_RTSP_LOWER_TRANS_UDP_MCAST: stream data over UDP multicast
83 * @GST_RTSP_LOWER_TRANS_TCP: stream data over TCP
84 * @GST_RTSP_LOWER_TRANS_HTTP: stream data tunneled over HTTP. Since: 0.10.23
86 * The different transport methods.
89 GST_RTSP_LOWER_TRANS_UNKNOWN = 0,
90 GST_RTSP_LOWER_TRANS_UDP = (1 << 0),
91 GST_RTSP_LOWER_TRANS_UDP_MCAST = (1 << 1),
92 GST_RTSP_LOWER_TRANS_TCP = (1 << 2),
93 GST_RTSP_LOWER_TRANS_HTTP = (1 << 4)
96 #define GST_TYPE_RTSP_LOWER_TRANS (gst_rtsp_lower_trans_get_type())
97 GType gst_rtsp_lower_trans_get_type (void);
99 typedef struct _GstRTSPRange GstRTSPRange;
100 typedef struct _GstRTSPTransport GstRTSPTransport;
104 * @min: minimum value of the range
105 * @max: maximum value of the range
107 * A type to specify a range.
110 struct _GstRTSPRange {
117 * @trans: the transport mode
118 * @profile: the tansport profile
119 * @lower_transport: the lower transport
120 * @destination: the destination ip/hostname
121 * @source: the source ip/hostname
122 * @layers: the number of layers
123 * @mode_play: if play mode was selected
124 * @mode_record: if record mode was selected
125 * @append: is append mode was selected
126 * @interleaved: the interleave range
127 * @ttl: the time to live for multicast UDP
128 * @port: the port pair for multicast sessions
129 * @client_port: the client port pair for receiving data
130 * @server_port: the server port pair for receiving data
131 * @ssrc: the ssrc that the sender/receiver will use
133 * A structure holding the RTSP transport values.
136 struct _GstRTSPTransport {
137 GstRTSPTransMode trans;
138 GstRTSPProfile profile;
139 GstRTSPLowerTrans lower_transport;
145 gboolean mode_record;
147 GstRTSPRange interleaved;
149 /* multicast specific */
154 GstRTSPRange client_port;
155 GstRTSPRange server_port;
161 GstRTSPResult gst_rtsp_transport_new (GstRTSPTransport **transport);
162 GstRTSPResult gst_rtsp_transport_init (GstRTSPTransport *transport);
164 GstRTSPResult gst_rtsp_transport_parse (const gchar *str, GstRTSPTransport *transport);
165 gchar* gst_rtsp_transport_as_text (GstRTSPTransport *transport);
167 GstRTSPResult gst_rtsp_transport_get_mime (GstRTSPTransMode trans, const gchar **mime);
168 GstRTSPResult gst_rtsp_transport_get_manager (GstRTSPTransMode trans, const gchar **manager, guint option);
170 GstRTSPResult gst_rtsp_transport_free (GstRTSPTransport *transport);
174 #endif /* __GST_RTSP_TRANSPORT_H__ */