mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
Add GType for GstRTSPUrl and expose a copy function because we can.
Original commit message from CVS: * docs/libs/gst-plugins-base-libs-sections.txt: * gst-libs/gst/rtsp/gstrtspurl.c: (register_rtsp_url_type), (gst_rtsp_url_get_type), (gst_rtsp_url_copy): * gst-libs/gst/rtsp/gstrtspurl.h: * win32/common/libgstrtsp.def: Add GType for GstRTSPUrl and expose a copy function because we can. API: gst_rtsp_url_copy() Fixes #567027.
This commit is contained in:
parent
b6b860f9a4
commit
1f6297f051
5 changed files with 71 additions and 0 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
2009-01-08 Wim Taymans <wim.taymans@collabora.co.uk>
|
||||
|
||||
* docs/libs/gst-plugins-base-libs-sections.txt:
|
||||
* gst-libs/gst/rtsp/gstrtspurl.c: (register_rtsp_url_type),
|
||||
(gst_rtsp_url_get_type), (gst_rtsp_url_copy):
|
||||
* gst-libs/gst/rtsp/gstrtspurl.h:
|
||||
* win32/common/libgstrtsp.def:
|
||||
Add GType for GstRTSPUrl and expose a copy function because we can.
|
||||
API: gst_rtsp_url_copy()
|
||||
Fixes #567027.
|
||||
|
||||
2009-01-07 Sebastian Dröge <sebastian.droege@collabora.co.uk>
|
||||
|
||||
* configure.ac:
|
||||
|
|
|
@ -1242,10 +1242,13 @@ gst_rtsp_message_dump
|
|||
GST_RTSP_DEFAULT_PORT
|
||||
GstRTSPUrl
|
||||
gst_rtsp_url_parse
|
||||
gst_rtsp_url_copy
|
||||
gst_rtsp_url_free
|
||||
gst_rtsp_url_get_request_uri
|
||||
gst_rtsp_url_set_port
|
||||
gst_rtsp_url_get_port
|
||||
<SUBSECTION Standard>
|
||||
gst_rtsp_url_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
|
|
|
@ -58,6 +58,24 @@
|
|||
|
||||
#include "gstrtspurl.h"
|
||||
|
||||
static void
|
||||
register_rtsp_url_type (GType * id)
|
||||
{
|
||||
*id = g_boxed_type_register_static ("GstRTSPUrl",
|
||||
(GBoxedCopyFunc) gst_rtsp_url_copy, (GBoxedFreeFunc) gst_rtsp_url_free);
|
||||
}
|
||||
|
||||
GType
|
||||
gst_rtsp_url_get_type (void)
|
||||
{
|
||||
static GType id;
|
||||
static GOnce once = G_ONCE_INIT;
|
||||
|
||||
g_once (&once, (GThreadFunc) register_rtsp_url_type, &id);
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
#define RTSP_PROTO "rtsp://"
|
||||
#define RTSP_PROTO_LEN 7
|
||||
#define RTSPU_PROTO "rtspu://"
|
||||
|
@ -176,6 +194,37 @@ invalid:
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_rtsp_url_copy:
|
||||
* @url: a #GstRTSPUrl
|
||||
*
|
||||
* Make a copy of @url.
|
||||
*
|
||||
* Returns: a copy of @url. Free with gst_rtsp_url_free () after usage.
|
||||
*
|
||||
* Since: 0.10.22
|
||||
*/
|
||||
GstRTSPUrl *
|
||||
gst_rtsp_url_copy (GstRTSPUrl * url)
|
||||
{
|
||||
GstRTSPUrl *res;
|
||||
|
||||
g_return_val_if_fail (url != NULL, NULL);
|
||||
|
||||
res = g_new0 (GstRTSPUrl, 1);
|
||||
|
||||
res->transports = url->transports;
|
||||
res->family = url->family;
|
||||
res->user = g_strdup (url->user);
|
||||
res->passwd = g_strdup (url->passwd);
|
||||
res->host = g_strdup (url->host);
|
||||
res->port = url->port;
|
||||
res->abspath = g_strdup (url->abspath);
|
||||
res->query = g_strdup (url->query);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* gst_rtsp_url_free:
|
||||
* @url: a #GstRTSPUrl
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#define __GST_RTSP_URL_H__
|
||||
|
||||
#include <glib.h>
|
||||
#include <glib-object.h>
|
||||
|
||||
#include <gst/rtsp/gstrtspdefs.h>
|
||||
#include <gst/rtsp/gstrtsptransport.h>
|
||||
|
@ -57,6 +58,8 @@ G_BEGIN_DECLS
|
|||
*/
|
||||
#define GST_RTSP_DEFAULT_PORT 554
|
||||
|
||||
#define GST_TYPE_RTSP_URL (gst_rtsp_url_get_type())
|
||||
|
||||
typedef struct _GstRTSPUrl GstRTSPUrl;
|
||||
|
||||
/**
|
||||
|
@ -83,7 +86,10 @@ struct _GstRTSPUrl {
|
|||
gchar *query;
|
||||
};
|
||||
|
||||
GType gst_rtsp_url_get_type (void);
|
||||
|
||||
GstRTSPResult gst_rtsp_url_parse (const gchar *urlstr, GstRTSPUrl **url);
|
||||
GstRTSPUrl* gst_rtsp_url_copy (GstRTSPUrl *url);
|
||||
void gst_rtsp_url_free (GstRTSPUrl *url);
|
||||
gchar* gst_rtsp_url_get_request_uri (GstRTSPUrl *url);
|
||||
|
||||
|
|
|
@ -75,9 +75,11 @@ EXPORTS
|
|||
gst_rtsp_transport_init
|
||||
gst_rtsp_transport_new
|
||||
gst_rtsp_transport_parse
|
||||
gst_rtsp_url_copy
|
||||
gst_rtsp_url_free
|
||||
gst_rtsp_url_get_port
|
||||
gst_rtsp_url_get_request_uri
|
||||
gst_rtsp_url_get_type
|
||||
gst_rtsp_url_parse
|
||||
gst_rtsp_url_set_port
|
||||
gst_rtsp_version_as_text
|
||||
|
|
Loading…
Reference in a new issue