mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
plugins, tools: update for get_protocols() return value change
This commit is contained in:
parent
de3e83759e
commit
f598856765
5 changed files with 21 additions and 17 deletions
|
@ -591,10 +591,10 @@ gst_fd_sink_uri_get_type (GType type)
|
|||
return GST_URI_SINK;
|
||||
}
|
||||
|
||||
static gchar **
|
||||
static const gchar *const *
|
||||
gst_fd_sink_uri_get_protocols (GType type)
|
||||
{
|
||||
static gchar *protocols[] = { (char *) "fd", NULL };
|
||||
static const gchar *protocols[] = { "fd", NULL };
|
||||
|
||||
return protocols;
|
||||
}
|
||||
|
|
|
@ -605,10 +605,10 @@ gst_fd_src_uri_get_type (GType type)
|
|||
return GST_URI_SRC;
|
||||
}
|
||||
|
||||
static gchar **
|
||||
static const gchar *const *
|
||||
gst_fd_src_uri_get_protocols (GType type)
|
||||
{
|
||||
static gchar *protocols[] = { (char *) "fd", NULL };
|
||||
static const gchar *protocols[] = { "fd", NULL };
|
||||
|
||||
return protocols;
|
||||
}
|
||||
|
|
|
@ -689,10 +689,10 @@ gst_file_sink_uri_get_type (GType type)
|
|||
return GST_URI_SINK;
|
||||
}
|
||||
|
||||
static gchar **
|
||||
static const gchar *const *
|
||||
gst_file_sink_uri_get_protocols (GType type)
|
||||
{
|
||||
static gchar *protocols[] = { (char *) "file", NULL };
|
||||
static const gchar *protocols[] = { "file", NULL };
|
||||
|
||||
return protocols;
|
||||
}
|
||||
|
|
|
@ -582,10 +582,10 @@ gst_file_src_uri_get_type (GType type)
|
|||
return GST_URI_SRC;
|
||||
}
|
||||
|
||||
static gchar **
|
||||
static const gchar *const *
|
||||
gst_file_src_uri_get_protocols (GType type)
|
||||
{
|
||||
static gchar *protocols[] = { (char *) "file", NULL };
|
||||
static const gchar *protocols[] = { "file", NULL };
|
||||
|
||||
return protocols;
|
||||
}
|
||||
|
|
|
@ -690,8 +690,8 @@ static void
|
|||
print_uri_handler_info (GstElement * element)
|
||||
{
|
||||
if (GST_IS_URI_HANDLER (element)) {
|
||||
const gchar *const *uri_protocols;
|
||||
const gchar *uri_type;
|
||||
gchar **uri_protocols;
|
||||
|
||||
if (gst_uri_handler_get_uri_type (GST_URI_HANDLER (element)) == GST_URI_SRC)
|
||||
uri_type = "source";
|
||||
|
@ -1090,8 +1090,9 @@ print_all_uri_handlers (void)
|
|||
}
|
||||
|
||||
if (GST_IS_URI_HANDLER (element)) {
|
||||
const gchar *const *uri_protocols;
|
||||
const gchar *dir;
|
||||
gchar **uri_protocols, *joined;
|
||||
gchar *joined;
|
||||
|
||||
switch (gst_uri_handler_get_uri_type (GST_URI_HANDLER (element))) {
|
||||
case GST_URI_SRC:
|
||||
|
@ -1107,7 +1108,7 @@ print_all_uri_handlers (void)
|
|||
|
||||
uri_protocols =
|
||||
gst_uri_handler_get_protocols (GST_URI_HANDLER (element));
|
||||
joined = g_strjoinv (", ", uri_protocols);
|
||||
joined = g_strjoinv (", ", (gchar **) uri_protocols);
|
||||
|
||||
g_print ("%s (%s, rank %u): %s\n",
|
||||
gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (factory)), dir,
|
||||
|
@ -1392,23 +1393,26 @@ print_plugin_automatic_install_info_codecs (GstElementFactory * factory)
|
|||
static void
|
||||
print_plugin_automatic_install_info_protocols (GstElementFactory * factory)
|
||||
{
|
||||
gchar **protocols, **p;
|
||||
const gchar *const *protocols;
|
||||
|
||||
protocols = gst_element_factory_get_uri_protocols (factory);
|
||||
if (protocols != NULL && *protocols != NULL) {
|
||||
switch (gst_element_factory_get_uri_type (factory)) {
|
||||
case GST_URI_SINK:
|
||||
for (p = protocols; *p != NULL; ++p)
|
||||
g_print ("urisink-%s\n", *p);
|
||||
while (*protocols != NULL) {
|
||||
g_print ("urisink-%s\n", *protocols);
|
||||
++protocols;
|
||||
}
|
||||
break;
|
||||
case GST_URI_SRC:
|
||||
for (p = protocols; *p != NULL; ++p)
|
||||
g_print ("urisource-%s\n", *p);
|
||||
while (*protocols != NULL) {
|
||||
g_print ("urisource-%s\n", *protocols);
|
||||
++protocols;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
g_strfreev (protocols);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue