From: Edward Hervey Date: Fri, 3 Jun 2011 17:07:44 +0000 (+0200) Subject: check/vorbisenc: Convert to new probe API X-Git-Tag: RELEASE-0.11.0~218 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca5a6a52f49c8c162edf6c837992c0884ae6c3e1;p=platform%2Fupstream%2Fgst-plugins-base.git check/vorbisenc: Convert to new probe API --- diff --git a/tests/check/pipelines/vorbisenc.c b/tests/check/pipelines/vorbisenc.c index 4e35aeb..b079d63 100644 --- a/tests/check/pipelines/vorbisenc.c +++ b/tests/check/pipelines/vorbisenc.c @@ -261,12 +261,15 @@ GST_START_TEST (test_timestamps) GST_END_TEST; -static gboolean -drop_second_data_buffer (GstPad * droppad, GstBuffer * buffer, gpointer unused) +static GstProbeReturn +drop_second_data_buffer (GstPad * droppad, GstProbeType type, + GstBuffer * buffer, gpointer unused) { - gboolean res; + GstProbeReturn res = GST_PROBE_OK; + + if (GST_BUFFER_OFFSET (buffer) == 1024) + res = GST_PROBE_DROP; - res = !(GST_BUFFER_OFFSET (buffer) == 1024); GST_DEBUG ("dropping %d", res); return res; @@ -312,8 +315,8 @@ GST_START_TEST (test_discontinuity) gst_object_unref (sink); } - drop_id = gst_pad_add_buffer_probe (droppad, - G_CALLBACK (drop_second_data_buffer), NULL); + drop_id = gst_pad_add_probe (droppad, GST_PROBE_TYPE_BUFFER, + (GstPadProbeCallback) drop_second_data_buffer, NULL, NULL); gst_buffer_straw_start_pipeline (bin, pad); /* check header packets */ @@ -370,7 +373,7 @@ GST_START_TEST (test_discontinuity) } gst_buffer_straw_stop_pipeline (bin, pad); - gst_pad_remove_buffer_probe (droppad, drop_id); + gst_pad_remove_probe (droppad, drop_id); gst_object_unref (droppad); gst_object_unref (pad);