Skip to content

Commit

Permalink
tools: Fix discoverer deprecation
Browse files Browse the repository at this point in the history
The only information provided by "misc" was the missing plugins which
is already handled with another API
  • Loading branch information
bilboed committed Apr 2, 2018
1 parent d69fa0c commit cb28f49
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/check/libs/discoverer.c
Expand Up @@ -231,7 +231,9 @@ GST_START_TEST (test_disco_missing_plugins)
result = gst_discoverer_info_get_result (info);
GST_INFO ("result: %d, error message: %s", result, err->message);
fail_unless_equals_int (result, GST_DISCOVERER_MISSING_PLUGINS);
#ifndef GST_DISABLE_DEPRECATED
GST_INFO ("misc: %" GST_PTR_FORMAT, gst_discoverer_info_get_misc (info));
#endif

gst_discoverer_info_unref (info);
g_error_free (err);
Expand Down
4 changes: 4 additions & 0 deletions tools/gst-discoverer.c
Expand Up @@ -66,7 +66,9 @@ gst_stream_information_to_string (GstDiscovererStreamInfo * info, GString * s,
{
gchar *tmp;
GstCaps *caps;
#ifndef GST_DISABLE_DEPRECATED
const GstStructure *misc;
#endif

my_g_string_append_printf (s, depth, "Codec:\n");
caps = gst_discoverer_stream_info_get_caps (info);
Expand All @@ -75,6 +77,7 @@ gst_stream_information_to_string (GstDiscovererStreamInfo * info, GString * s,
my_g_string_append_printf (s, depth, " %s\n", tmp);
g_free (tmp);

#ifndef GST_DISABLE_DEPRECATED
my_g_string_append_printf (s, depth, "Additional info:\n");
if ((misc = gst_discoverer_stream_info_get_misc (info))) {
tmp = gst_structure_to_string (misc);
Expand All @@ -83,6 +86,7 @@ gst_stream_information_to_string (GstDiscovererStreamInfo * info, GString * s,
} else {
my_g_string_append_printf (s, depth, " None\n");
}
#endif

my_g_string_append_printf (s, depth, "Stream ID: %s\n",
gst_discoverer_stream_info_get_stream_id (info));
Expand Down

0 comments on commit cb28f49

Please sign in to comment.