From: Edward Hervey Date: Tue, 24 Apr 2012 14:32:39 +0000 (+0200) Subject: tests: Remove theoraenc discont test X-Git-Tag: RELEASE-0.11.91~67^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=416029a006ec822f63a6206591f3392983836c08;p=platform%2Fupstream%2Fgst-plugins-base.git tests: Remove theoraenc discont test It should be fixed differently, see https://bugzilla.gnome.org/show_bug.cgi?id=663262 --- diff --git a/tests/check/pipelines/theoraenc.c b/tests/check/pipelines/theoraenc.c index 3b101d0..d230707 100644 --- a/tests/check/pipelines/theoraenc.c +++ b/tests/check/pipelines/theoraenc.c @@ -308,119 +308,6 @@ GST_START_TEST (test_continuity) GST_END_TEST; -static gboolean -drop_second_data_buffer (GstPad * droppad, GstBuffer * buffer, gpointer unused) -{ - return !(GST_BUFFER_OFFSET (buffer) == 1); -} - -GST_START_TEST (test_discontinuity) -{ - GstElement *bin; - GstPad *pad, *droppad; - gchar *pipe_str; - GstBuffer *buffer; - GError *error = NULL; - guint drop_id; - - pipe_str = g_strdup_printf ("videotestsrc num-buffers=10" - " ! video/x-raw-yuv,format=(fourcc)I420,framerate=10/1" - " ! theoraenc ! fakesink name=fs0"); - - bin = gst_parse_launch (pipe_str, &error); - fail_unless (bin != NULL, "Error parsing pipeline: %s", - error ? error->message : "(invalid error)"); - g_free (pipe_str); - - /* the plan: same as test_continuity, but dropping a buffer and seeing if - theoraenc correctly notes the discontinuity */ - - /* get the pad to use to drop buffers */ - { - GstElement *sink = gst_bin_get_by_name (GST_BIN (bin), "theoraenc0"); - - fail_unless (sink != NULL, "Could not get theoraenc out of bin"); - droppad = gst_element_get_static_pad (sink, "sink"); - fail_unless (droppad != NULL, "Could not get pad out of theoraenc"); - gst_object_unref (sink); - } - - /* get the pad */ - { - GstElement *sink = gst_bin_get_by_name (GST_BIN (bin), "fs0"); - - fail_unless (sink != NULL, "Could not get fakesink out of bin"); - pad = gst_element_get_static_pad (sink, "sink"); - fail_unless (pad != NULL, "Could not get pad out of fakesink"); - gst_object_unref (sink); - } - - drop_id = gst_pad_add_buffer_probe (droppad, - G_CALLBACK (drop_second_data_buffer), NULL); - gst_buffer_straw_start_pipeline (bin, pad); - - /* header packets should have timestamp == NONE, granulepos 0 */ - buffer = gst_buffer_straw_get_buffer (bin, pad); - check_buffer_timestamp (buffer, GST_CLOCK_TIME_NONE); - check_buffer_duration (buffer, GST_CLOCK_TIME_NONE); - check_buffer_granulepos (buffer, 0); - check_buffer_is_header (buffer, TRUE); - gst_buffer_unref (buffer); - - buffer = gst_buffer_straw_get_buffer (bin, pad); - check_buffer_timestamp (buffer, GST_CLOCK_TIME_NONE); - check_buffer_duration (buffer, GST_CLOCK_TIME_NONE); - check_buffer_granulepos (buffer, 0); - check_buffer_is_header (buffer, TRUE); - gst_buffer_unref (buffer); - - buffer = gst_buffer_straw_get_buffer (bin, pad); - check_buffer_timestamp (buffer, GST_CLOCK_TIME_NONE); - check_buffer_duration (buffer, GST_CLOCK_TIME_NONE); - check_buffer_granulepos (buffer, 0); - check_buffer_is_header (buffer, TRUE); - gst_buffer_unref (buffer); - - { - buffer = gst_buffer_straw_get_buffer (bin, pad); - check_buffer_timestamp (buffer, 0); - /* plain division because I know the answer is exact */ - check_buffer_duration (buffer, GST_SECOND / 10); - check_buffer_granulepos (buffer, 1 << GRANULEPOS_SHIFT); - check_buffer_is_header (buffer, FALSE); - fail_if (GST_BUFFER_IS_DISCONT (buffer), "expected continuous buffer yo"); - gst_buffer_unref (buffer); - - /* check discontinuity with the next buffer */ - buffer = gst_buffer_straw_get_buffer (bin, pad); - check_buffer_duration (buffer, GST_SECOND / 10); - /* After a discont, we'll always get a keyframe, so this one should be - * 3<