mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-19 22:05:58 +00:00
validate: use GstMediaDescriptorWriter as log handler
Allow us to catch warnings when running gst-validate-media-check-1.0.
This commit is contained in:
parent
2133207113
commit
36e69f305a
3 changed files with 7 additions and 2 deletions
|
@ -504,7 +504,7 @@ _run_frame_analisis (GstMediaDescriptorWriter * writer,
|
|||
|
||||
GstMediaDescriptorWriter *
|
||||
gst_media_descriptor_writer_new_discover (GstValidateRunner * runner,
|
||||
const gchar * uri, gboolean full, GError ** err)
|
||||
const gchar * uri, gboolean full, gboolean handle_g_logs, GError ** err)
|
||||
{
|
||||
GList *tmp, *streams = NULL;
|
||||
GstDiscovererInfo *info = NULL;
|
||||
|
@ -536,6 +536,9 @@ gst_media_descriptor_writer_new_discover (GstValidateRunner * runner,
|
|||
gst_discoverer_info_get_duration (info),
|
||||
gst_discoverer_info_get_seekable (info));
|
||||
|
||||
if (handle_g_logs)
|
||||
gst_validate_reporter_set_handle_g_logs (GST_VALIDATE_REPORTER (writer));
|
||||
|
||||
if (gst_discoverer_info_get_tags (info))
|
||||
gst_media_descriptor_writer_add_taglist (writer,
|
||||
gst_discoverer_info_get_tags (info));
|
||||
|
|
|
@ -59,6 +59,7 @@ typedef struct {
|
|||
GstMediaDescriptorWriter * gst_media_descriptor_writer_new_discover (GstValidateRunner *runner,
|
||||
const gchar *uri,
|
||||
gboolean full,
|
||||
gboolean handle_g_logs,
|
||||
GError **err);
|
||||
|
||||
GstMediaDescriptorWriter * gst_media_descriptor_writer_new (GstValidateRunner *runner,
|
||||
|
|
|
@ -95,7 +95,8 @@ main (int argc, gchar ** argv)
|
|||
|
||||
runner = gst_validate_runner_new ();
|
||||
writer =
|
||||
gst_media_descriptor_writer_new_discover (runner, argv[1], full, &err);
|
||||
gst_media_descriptor_writer_new_discover (runner, argv[1], full, TRUE,
|
||||
&err);
|
||||
if (writer == NULL) {
|
||||
g_print ("Could not discover file: %s", argv[1]);
|
||||
ret = 1;
|
||||
|
|
Loading…
Reference in a new issue