+ my_g_string_append_printf (s, depth, "\n");
+
+ return g_string_free (s, FALSE);
+}
+
+static gchar *
+gst_stream_subtitle_information_to_string (GstDiscovererStreamInfo * info,
+ gint depth)
+{
+ GstDiscovererSubtitleInfo *subtitle_info;
+ GString *s;
+ gchar *tmp;
+ const gchar *ctmp;
+ int len = 400;
+ const GstTagList *tags;
+ GstCaps *caps;
+
+ g_return_val_if_fail (info != NULL, NULL);
+
+ s = g_string_sized_new (len);
+
+ my_g_string_append_printf (s, depth, "Codec:\n");
+ caps = gst_discoverer_stream_info_get_caps (info);
+ tmp = gst_caps_to_string (caps);
+ gst_caps_unref (caps);
+ my_g_string_append_printf (s, depth, " %s\n", tmp);
+ g_free (tmp);
+
+ my_g_string_append_printf (s, depth, "Additional info:\n");
+ if (gst_discoverer_stream_info_get_misc (info)) {
+ tmp = gst_structure_to_string (gst_discoverer_stream_info_get_misc (info));
+ my_g_string_append_printf (s, depth, " %s\n", tmp);
+ g_free (tmp);
+ } else {
+ my_g_string_append_printf (s, depth, " None\n");
+ }
+
+ subtitle_info = (GstDiscovererSubtitleInfo *) info;
+ ctmp = gst_discoverer_subtitle_info_get_language (subtitle_info);
+ my_g_string_append_printf (s, depth, "Language: %s\n",
+ ctmp ? ctmp : "<unknown>");
+
+ my_g_string_append_printf (s, depth, "Tags:\n");
+ tags = gst_discoverer_stream_info_get_tags (info);
+ if (tags) {
+ tmp = gst_structure_to_string ((GstStructure *) tags);
+ my_g_string_append_printf (s, depth, " %s\n", tmp);
+ g_free (tmp);
+ } else {
+ my_g_string_append_printf (s, depth, " None\n");
+ }
+ if (verbose)
+ my_g_string_append_printf (s, depth, "\n");