diff --git a/ChangeLog b/ChangeLog index feb353881d..ec0534d35f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-04-20 Sebastian Dröge + + * 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 * gst/gsttaglist.c: (gst_tag_merge_strings_with_comma): diff --git a/tools/gst-inspect.c b/tools/gst-inspect.c index a5db596f56..a9cb4bbd28 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -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);