mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 04:31:06 +00:00
check/vorbisenc: Convert to new probe API
This commit is contained in:
parent
e3e4c28b39
commit
ca5a6a52f4
1 changed files with 10 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue