• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* GStreamer
2  * Copyright (C) <2005,2006> Wim Taymans <wim@fluendo.com>
3  *
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.
8  *
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.
13  *
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., 51 Franklin St, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19 /*
20  * Unless otherwise indicated, Source Code is licensed under MIT license.
21  * See further explanation attached in License Statement (distributed in the file
22  * LICENSE).
23  *
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:
30  *
31  * The above copyright notice and this permission notice shall be included in all
32  * copies or substantial portions of the Software.
33  *
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
40  * SOFTWARE.
41  */
42 
43 #ifndef __GST_RTSP_URL_H__
44 #define __GST_RTSP_URL_H__
45 
46 #include <glib.h>
47 #include <glib-object.h>
48 
49 #include <gst/rtsp/gstrtspdefs.h>
50 #include <gst/rtsp/gstrtsptransport.h>
51 
52 G_BEGIN_DECLS
53 
54 /**
55  * GST_RTSP_DEFAULT_PORT:
56  *
57  * The default RTSP port to connect to.
58  */
59 #define GST_RTSP_DEFAULT_PORT       554
60 
61 #define GST_TYPE_RTSP_URL  (gst_rtsp_url_get_type())
62 
63 typedef struct _GstRTSPUrl GstRTSPUrl;
64 
65 /**
66  * GstRTSPUrl:
67  * @transports: the transports allowed
68  * @family: the family
69  * @user: the user
70  * @passwd: the password
71  * @host: the host
72  * @port: the port
73  * @abspath: the absolute path
74  * @query: additional query parameters
75  *
76  * This structure contains the result of a parsed RTSP URL
77  */
78 struct _GstRTSPUrl {
79   GstRTSPLowerTrans  transports;
80   GstRTSPFamily      family;
81   gchar             *user;
82   gchar             *passwd;
83   gchar             *host;
84   guint16            port;
85   gchar             *abspath;
86   gchar             *query;
87 };
88 
89 GST_RTSP_API
90 GType gst_rtsp_url_get_type (void);
91 
92 GST_RTSP_API
93 GstRTSPResult      gst_rtsp_url_parse           (const gchar *urlstr, GstRTSPUrl **url);
94 
95 GST_RTSP_API
96 GstRTSPUrl*        gst_rtsp_url_copy            (const GstRTSPUrl *url);
97 
98 GST_RTSP_API
99 void               gst_rtsp_url_free            (GstRTSPUrl *url);
100 
101 GST_RTSP_API
102 gchar*             gst_rtsp_url_get_request_uri (const GstRTSPUrl *url);
103 
104 GST_RTSP_API
105 gchar *            gst_rtsp_url_get_request_uri_with_control (const GstRTSPUrl * url,
106                                                               const gchar * control_path);
107 
108 GST_RTSP_API
109 gchar**            gst_rtsp_url_decode_path_components
110                                                 (const GstRTSPUrl *url);
111 GST_RTSP_API
112 GstRTSPResult      gst_rtsp_url_set_port        (GstRTSPUrl *url, guint16 port);
113 
114 GST_RTSP_API
115 GstRTSPResult      gst_rtsp_url_get_port        (const GstRTSPUrl *url, guint16 *port);
116 
117 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GstRTSPUrl, gst_rtsp_url_free)
118 
119 G_END_DECLS
120 
121 #endif /* __GST_RTSP_URL_H__ */
122