From 045c4b6ec80c469790afdb5e4126441841c98673 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim-Philipp=20M=C3=BCller?= Date: Sun, 26 Aug 2012 22:08:54 +0100 Subject: [PATCH] deinterlace: the field in caps is "interlace-mode" not "interlace-method" Fix deinterlace unit test. Need to set right field on output caps. Also remove right field (not old 0.10 "interlaced" boolean field) from caps in unit test before comparing old and new. --- gst/deinterlace/gstdeinterlace.c | 2 +- tests/check/elements/deinterlace.c | 11 ++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/gst/deinterlace/gstdeinterlace.c b/gst/deinterlace/gstdeinterlace.c index de43808..a61af66 100644 --- a/gst/deinterlace/gstdeinterlace.c +++ b/gst/deinterlace/gstdeinterlace.c @@ -2358,7 +2358,7 @@ gst_deinterlace_setcaps (GstDeinterlace * self, GstPad * pad, GstCaps * caps) if (self->mode != GST_DEINTERLACE_MODE_DISABLED) { srccaps = gst_caps_make_writable (srccaps); - gst_caps_set_simple (srccaps, "interlace-method", G_TYPE_STRING, + gst_caps_set_simple (srccaps, "interlace-mode", G_TYPE_STRING, "progressive", NULL); } diff --git a/tests/check/elements/deinterlace.c b/tests/check/elements/deinterlace.c index 258c875..c25cbcc 100644 --- a/tests/check/elements/deinterlace.c +++ b/tests/check/elements/deinterlace.c @@ -249,7 +249,12 @@ deinterlace_check_passthrough (gint mode, const gchar * infiltercaps) fail_unless (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_CHANGE_FAILURE); - msg = gst_bus_poll (GST_ELEMENT_BUS (pipeline), GST_MESSAGE_EOS, -1); + msg = gst_bus_poll (GST_ELEMENT_BUS (pipeline), + GST_MESSAGE_ERROR | GST_MESSAGE_EOS, -1); + if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) { + GST_ERROR ("ERROR: %" GST_PTR_FORMAT, msg); + fail ("Unexpected error message"); + } gst_message_unref (msg); /* queue should be empty */ @@ -283,11 +288,11 @@ deinterlace_set_caps_and_check (GstCaps * input, gboolean must_deinterlace) othercaps = gst_caps_make_writable (othercaps); s = gst_caps_get_structure (othercaps, 0); - gst_structure_remove_field (s, "interlaced"); + gst_structure_remove_field (s, "interlace-mode"); input = gst_caps_make_writable (input); s = gst_caps_get_structure (input, 0); - gst_structure_remove_field (s, "interlaced"); + gst_structure_remove_field (s, "interlace-mode"); fail_unless (gst_caps_is_equal (input, othercaps)); } -- 2.7.4