From: Sebastian Dröge Date: Sun, 20 Apr 2008 09:55:25 +0000 (+0000) Subject: tools/gst-inspect.c: Print the URI protocols and the URI type supported by the element. X-Git-Tag: RELEASE-0_10_20~120 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=83fc25314e2e0d95b4a53f5ad267a9d50b910d0f;p=platform%2Fupstream%2Fgstreamer.git 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. --- diff --git a/ChangeLog b/ChangeLog index feb3538..ec0534d 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 a5db596..a9cb4bb 100644 --- a/tools/gst-inspect.c +++ b/tools/gst-inspect.c @@ -718,6 +718,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) { const GList *pads; @@ -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);