mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
urihandler: remove "new-uri" signal
No one but filesrc used that API. Should probably be replaced by requiring an "uri" property instead, and then objects can do a notify on that. Also removed interface structure padding, it's not needed.
This commit is contained in:
parent
bb18ca7fa4
commit
34e3e26467
4 changed files with 2 additions and 71 deletions
|
@ -2709,7 +2709,6 @@ gst_uri_handler_get_uri_type
|
||||||
gst_uri_handler_get_protocols
|
gst_uri_handler_get_protocols
|
||||||
gst_uri_handler_get_uri
|
gst_uri_handler_get_uri
|
||||||
gst_uri_handler_set_uri
|
gst_uri_handler_set_uri
|
||||||
gst_uri_handler_new_uri
|
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GST_URI_HANDLER
|
GST_URI_HANDLER
|
||||||
GST_IS_URI_HANDLER
|
GST_IS_URI_HANDLER
|
||||||
|
|
51
gst/gsturi.c
51
gst/gsturi.c
|
@ -52,16 +52,6 @@
|
||||||
GST_DEBUG_CATEGORY_STATIC (gst_uri_handler_debug);
|
GST_DEBUG_CATEGORY_STATIC (gst_uri_handler_debug);
|
||||||
#define GST_CAT_DEFAULT gst_uri_handler_debug
|
#define GST_CAT_DEFAULT gst_uri_handler_debug
|
||||||
|
|
||||||
enum
|
|
||||||
{
|
|
||||||
NEW_URI,
|
|
||||||
LAST_SIGNAL
|
|
||||||
};
|
|
||||||
|
|
||||||
static guint gst_uri_handler_signals[LAST_SIGNAL] = { 0 };
|
|
||||||
|
|
||||||
static void gst_uri_handler_base_init (gpointer g_class);
|
|
||||||
|
|
||||||
GType
|
GType
|
||||||
gst_uri_handler_get_type (void)
|
gst_uri_handler_get_type (void)
|
||||||
{
|
{
|
||||||
|
@ -71,7 +61,7 @@ gst_uri_handler_get_type (void)
|
||||||
GType _type;
|
GType _type;
|
||||||
static const GTypeInfo urihandler_info = {
|
static const GTypeInfo urihandler_info = {
|
||||||
sizeof (GstURIHandlerInterface),
|
sizeof (GstURIHandlerInterface),
|
||||||
gst_uri_handler_base_init,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
|
@ -92,29 +82,6 @@ gst_uri_handler_get_type (void)
|
||||||
return urihandler_type;
|
return urihandler_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
gst_uri_handler_base_init (gpointer g_class)
|
|
||||||
{
|
|
||||||
static gboolean initialized = FALSE;
|
|
||||||
|
|
||||||
if (G_UNLIKELY (!initialized)) {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* GstURIHandler::new-uri:
|
|
||||||
* @handler: The #GstURIHandler which emitted the signal
|
|
||||||
* @uri: (transfer none): The new URI, or NULL if the URI was removed
|
|
||||||
*
|
|
||||||
* The URI of the given @handler has changed.
|
|
||||||
*/
|
|
||||||
|
|
||||||
gst_uri_handler_signals[NEW_URI] =
|
|
||||||
g_signal_new ("new-uri", GST_TYPE_URI_HANDLER, G_SIGNAL_RUN_LAST,
|
|
||||||
G_STRUCT_OFFSET (GstURIHandlerInterface, new_uri), NULL, NULL,
|
|
||||||
gst_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING);
|
|
||||||
initialized = TRUE;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static const guchar acceptable[96] = { /* X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 XA XB XC XD XE XF */
|
static const guchar acceptable[96] = { /* X0 X1 X2 X3 X4 X5 X6 X7 X8 X9 XA XB XC XD XE XF */
|
||||||
0x00, 0x3F, 0x20, 0x20, 0x20, 0x00, 0x2C, 0x3F, 0x3F, 0x3F, 0x3F, 0x22, 0x20, 0x3F, 0x3F, 0x1C, /* 2X !"#$%&'()*+,-./ */
|
0x00, 0x3F, 0x20, 0x20, 0x20, 0x00, 0x2C, 0x3F, 0x3F, 0x3F, 0x3F, 0x22, 0x20, 0x3F, 0x3F, 0x1C, /* 2X !"#$%&'()*+,-./ */
|
||||||
0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x38, 0x20, 0x20, 0x2C, 0x20, 0x2C, /* 3X 0123456789:;<=>? */
|
0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x3F, 0x38, 0x20, 0x20, 0x2C, 0x20, 0x2C, /* 3X 0123456789:;<=>? */
|
||||||
|
@ -759,22 +726,6 @@ gst_uri_handler_set_uri (GstURIHandler * handler, const gchar * uri)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* gst_uri_handler_new_uri:
|
|
||||||
* @handler: A #GstURIHandler
|
|
||||||
* @uri: new URI or NULL if it was unset
|
|
||||||
*
|
|
||||||
* Emits the new-uri signal for a given handler, when that handler has a new URI.
|
|
||||||
* This function should only be called by URI handlers themselves.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
gst_uri_handler_new_uri (GstURIHandler * handler, const gchar * uri)
|
|
||||||
{
|
|
||||||
g_return_if_fail (GST_IS_URI_HANDLER (handler));
|
|
||||||
|
|
||||||
g_signal_emit (handler, gst_uri_handler_signals[NEW_URI], 0, uri);
|
|
||||||
}
|
|
||||||
|
|
||||||
static gchar *
|
static gchar *
|
||||||
gst_file_utils_canonicalise_path (const gchar * path)
|
gst_file_utils_canonicalise_path (const gchar * path)
|
||||||
{
|
{
|
||||||
|
|
19
gst/gsturi.h
19
gst/gsturi.h
|
@ -80,18 +80,7 @@ typedef struct _GstURIHandlerInterface GstURIHandlerInterface;
|
||||||
struct _GstURIHandlerInterface {
|
struct _GstURIHandlerInterface {
|
||||||
GTypeInterface parent;
|
GTypeInterface parent;
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
/* signals */
|
|
||||||
void (* new_uri) (GstURIHandler * handler,
|
|
||||||
const gchar * uri);
|
|
||||||
/* idea for the future ?
|
|
||||||
gboolean (* require_password) (GstURIHandler * handler,
|
|
||||||
gchar ** username,
|
|
||||||
gchar ** password);
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* vtable */
|
/* vtable */
|
||||||
|
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
/* querying capabilities */
|
/* querying capabilities */
|
||||||
GstURIType (* get_type) (GType type);
|
GstURIType (* get_type) (GType type);
|
||||||
|
@ -101,12 +90,6 @@ struct _GstURIHandlerInterface {
|
||||||
const gchar * (* get_uri) (GstURIHandler * handler);
|
const gchar * (* get_uri) (GstURIHandler * handler);
|
||||||
gboolean (* set_uri) (GstURIHandler * handler,
|
gboolean (* set_uri) (GstURIHandler * handler,
|
||||||
const gchar * uri);
|
const gchar * uri);
|
||||||
|
|
||||||
/*< private >*/
|
|
||||||
/* we might want to add functions here to query features,
|
|
||||||
* someone with gnome-vfs knowledge go ahead */
|
|
||||||
|
|
||||||
gpointer _gst_reserved[GST_PADDING];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* general URI functions */
|
/* general URI functions */
|
||||||
|
@ -137,8 +120,6 @@ gchar ** gst_uri_handler_get_protocols (GstURIHandler * handler);
|
||||||
const gchar * gst_uri_handler_get_uri (GstURIHandler * handler);
|
const gchar * gst_uri_handler_get_uri (GstURIHandler * handler);
|
||||||
gboolean gst_uri_handler_set_uri (GstURIHandler * handler,
|
gboolean gst_uri_handler_set_uri (GstURIHandler * handler,
|
||||||
const gchar * uri);
|
const gchar * uri);
|
||||||
void gst_uri_handler_new_uri (GstURIHandler * handler,
|
|
||||||
const gchar * uri);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -257,7 +257,7 @@ gst_file_src_set_location (GstFileSrc * src, const gchar * location)
|
||||||
GST_INFO ("uri : %s", src->uri);
|
GST_INFO ("uri : %s", src->uri);
|
||||||
}
|
}
|
||||||
g_object_notify (G_OBJECT (src), "location");
|
g_object_notify (G_OBJECT (src), "location");
|
||||||
gst_uri_handler_new_uri (GST_URI_HANDLER (src), src->uri);
|
/* FIXME 0.11: notify "uri" property once there is one */
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue