Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/gst-plugins-good.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2014-06-28 20:40:45 +0400
committerTim-Philipp Müller <tim@centricular.com>2014-06-28 20:40:45 +0400
commit4edbd4c368bdcfd05388a266d87169732d1f3bc4 (patch)
tree0501453cf393902108da325948815ed276e5699b /tests/check/elements
parent155a3fec9334a5a2f9918aff491b5926143cba71 (diff)
tests: matroskaparse: fail on errors and disable pull mode test
Actually look for error messages on the bus and fail if there is one before the EOS message. Disable pull mode test which is pointless as long as matroskaparse only supports push mode (pull mode support has not been ported over to 1.0).
Diffstat (limited to 'tests/check/elements')
-rw-r--r--tests/check/elements/matroskaparse.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/check/elements/matroskaparse.c b/tests/check/elements/matroskaparse.c
index 8c2482c4f..13ef8d8d8 100644
--- a/tests/check/elements/matroskaparse.c
+++ b/tests/check/elements/matroskaparse.c
@@ -75,9 +75,17 @@ run_check_for_file (const gchar * file_name, gboolean push_mode)
state_ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
fail_unless (state_ret != GST_STATE_CHANGE_FAILURE);
- msg = gst_bus_poll (bus, GST_MESSAGE_EOS, -1);
- fail_unless (msg != NULL, "Expected EOS message on bus! (%s)", file_name);
-
+ msg = gst_bus_poll (bus, GST_MESSAGE_EOS | GST_MESSAGE_ERROR, -1);
+ if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ERROR) {
+ GError *err;
+ gchar *dbg;
+
+ gst_message_parse_error (msg, &err, &dbg);
+ gst_object_default_error (GST_MESSAGE_SRC (msg), err, dbg);
+ g_error ("%s (%s)", err->message, dbg);
+ g_error_free (err);
+ g_free (dbg);
+ }
gst_message_unref (msg);
gst_object_unref (bus);
@@ -88,12 +96,14 @@ run_check_for_file (const gchar * file_name, gboolean push_mode)
g_free (path);
}
+#if 0
GST_START_TEST (test_parse_file_pull)
{
run_check_for_file ("pinknoise-vorbis.mkv", TRUE);
}
GST_END_TEST;
+#endif
GST_START_TEST (test_parse_file_push)
{
@@ -109,7 +119,9 @@ matroskaparse_suite (void)
TCase *tc_chain = tcase_create ("general");
suite_add_tcase (s, tc_chain);
+#if 0
tcase_add_test (tc_chain, test_parse_file_pull);
+#endif
tcase_add_test (tc_chain, test_parse_file_push);
return s;