Commit ca5a6a52 authored by Edward Hervey's avatar Edward Hervey
Browse files

check/vorbisenc: Convert to new probe API

parent e3e4c28b
...@@ -261,12 +261,15 @@ GST_START_TEST (test_timestamps) ...@@ -261,12 +261,15 @@ GST_START_TEST (test_timestamps)
GST_END_TEST; GST_END_TEST;
static gboolean static GstProbeReturn
drop_second_data_buffer (GstPad * droppad, GstBuffer * buffer, gpointer unused) 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); GST_DEBUG ("dropping %d", res);
return res; return res;
...@@ -312,8 +315,8 @@ GST_START_TEST (test_discontinuity) ...@@ -312,8 +315,8 @@ GST_START_TEST (test_discontinuity)
gst_object_unref (sink); gst_object_unref (sink);
} }
drop_id = gst_pad_add_buffer_probe (droppad, drop_id = gst_pad_add_probe (droppad, GST_PROBE_TYPE_BUFFER,
G_CALLBACK (drop_second_data_buffer), NULL); (GstPadProbeCallback) drop_second_data_buffer, NULL, NULL);
gst_buffer_straw_start_pipeline (bin, pad); gst_buffer_straw_start_pipeline (bin, pad);
/* check header packets */ /* check header packets */
...@@ -370,7 +373,7 @@ GST_START_TEST (test_discontinuity) ...@@ -370,7 +373,7 @@ GST_START_TEST (test_discontinuity)
} }
gst_buffer_straw_stop_pipeline (bin, pad); 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 (droppad);
gst_object_unref (pad); gst_object_unref (pad);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment