mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-06-05 23:18:52 +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 *
|
GstMediaDescriptorWriter *
|
||||||
gst_media_descriptor_writer_new_discover (GstValidateRunner * runner,
|
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;
|
GList *tmp, *streams = NULL;
|
||||||
GstDiscovererInfo *info = 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_duration (info),
|
||||||
gst_discoverer_info_get_seekable (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))
|
if (gst_discoverer_info_get_tags (info))
|
||||||
gst_media_descriptor_writer_add_taglist (writer,
|
gst_media_descriptor_writer_add_taglist (writer,
|
||||||
gst_discoverer_info_get_tags (info));
|
gst_discoverer_info_get_tags (info));
|
||||||
|
|
|
@ -59,6 +59,7 @@ typedef struct {
|
||||||
GstMediaDescriptorWriter * gst_media_descriptor_writer_new_discover (GstValidateRunner *runner,
|
GstMediaDescriptorWriter * gst_media_descriptor_writer_new_discover (GstValidateRunner *runner,
|
||||||
const gchar *uri,
|
const gchar *uri,
|
||||||
gboolean full,
|
gboolean full,
|
||||||
|
gboolean handle_g_logs,
|
||||||
GError **err);
|
GError **err);
|
||||||
|
|
||||||
GstMediaDescriptorWriter * gst_media_descriptor_writer_new (GstValidateRunner *runner,
|
GstMediaDescriptorWriter * gst_media_descriptor_writer_new (GstValidateRunner *runner,
|
||||||
|
|
|
@ -95,7 +95,8 @@ main (int argc, gchar ** argv)
|
||||||
|
|
||||||
runner = gst_validate_runner_new ();
|
runner = gst_validate_runner_new ();
|
||||||
writer =
|
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) {
|
if (writer == NULL) {
|
||||||
g_print ("Could not discover file: %s", argv[1]);
|
g_print ("Could not discover file: %s", argv[1]);
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
|
Loading…
Reference in a new issue