mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
tools/gst-inspect.c: Print the URI protocols and the URI type supported by the element.
Original commit message from CVS: * tools/gst-inspect.c: (print_uri_handler_info), (print_element_info): Print the URI protocols and the URI type supported by the element.
This commit is contained in:
parent
b7462645e5
commit
83fc25314e
2 changed files with 40 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2008-04-20 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* tools/gst-inspect.c: (print_uri_handler_info),
|
||||
(print_element_info):
|
||||
Print the URI protocols and the URI type supported by the element.
|
||||
|
||||
2008-04-19 Sebastian Dröge <slomo@circular-chaos.org>
|
||||
|
||||
* gst/gsttaglist.c: (gst_tag_merge_strings_with_comma):
|
||||
|
|
|
@ -717,6 +717,39 @@ print_index_info (GstElement * element)
|
|||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
print_uri_handler_info (GstElement * element)
|
||||
{
|
||||
if (GST_IS_URI_HANDLER (element)) {
|
||||
const gchar *uri_type;
|
||||
gchar **uri_protocols;
|
||||
|
||||
if (gst_uri_handler_get_uri_type (GST_URI_HANDLER (element)) == GST_URI_SRC)
|
||||
uri_type = "source";
|
||||
else if (gst_uri_handler_get_uri_type (GST_URI_HANDLER (element)) ==
|
||||
GST_URI_SINK)
|
||||
uri_type = "sink";
|
||||
else
|
||||
uri_type = "unknown";
|
||||
|
||||
uri_protocols = gst_uri_handler_get_protocols (GST_URI_HANDLER (element));
|
||||
|
||||
n_print ("\n");
|
||||
n_print ("URI handling capabilities:\n");
|
||||
n_print (" Element can act as %s.\n", uri_type);
|
||||
|
||||
if (uri_protocols && *uri_protocols) {
|
||||
n_print (" Supported URI protocols:\n");
|
||||
for (; *uri_protocols != NULL; uri_protocols++)
|
||||
n_print (" %s\n", *uri_protocols);
|
||||
} else {
|
||||
n_print (" No supported URI protocols\n");
|
||||
}
|
||||
} else {
|
||||
n_print ("Element has no URI handling capabilities.\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
print_pad_info (GstElement * element)
|
||||
{
|
||||
|
@ -1159,6 +1192,7 @@ print_element_info (GstElementFactory * factory, gboolean print_names)
|
|||
print_implementation_info (element);
|
||||
print_clocking_info (element);
|
||||
print_index_info (element);
|
||||
print_uri_handler_info (element);
|
||||
print_pad_info (element);
|
||||
print_element_properties_info (element);
|
||||
print_signal_info (element);
|
||||
|
|
Loading…
Reference in a new issue