check/vorbistag: Convert to new probe API
This commit is contained in:
parent
ca5a6a52f4
commit
4857f50aa4
@ -118,17 +118,19 @@ cleanup_vorbistag (GstElement * vorbistag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static gboolean
|
static GstProbeReturn
|
||||||
buffer_probe (GstPad * pad, GstBuffer * buffer, gpointer unused)
|
buffer_probe (GstPad * pad, GstProbeType type, GstBuffer * buffer,
|
||||||
|
gpointer unused)
|
||||||
{
|
{
|
||||||
g_async_queue_push (pending_buffers, gst_buffer_ref (buffer));
|
g_async_queue_push (pending_buffers, gst_buffer_ref (buffer));
|
||||||
return TRUE;
|
return GST_PROBE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
start_pipeline (GstElement * element)
|
start_pipeline (GstElement * element)
|
||||||
{
|
{
|
||||||
id = gst_pad_add_buffer_probe (mysinkpad, G_CALLBACK (buffer_probe), NULL);
|
id = gst_pad_add_probe (mysinkpad, GST_PROBE_TYPE_BUFFER,
|
||||||
|
(GstPadProbeCallback) buffer_probe, NULL, NULL);
|
||||||
|
|
||||||
pending_buffers = g_async_queue_new ();
|
pending_buffers = g_async_queue_new ();
|
||||||
gst_element_set_state (element, GST_STATE_PLAYING);
|
gst_element_set_state (element, GST_STATE_PLAYING);
|
||||||
@ -148,7 +150,7 @@ stop_pipeline (GstElement * element)
|
|||||||
while ((buf = g_async_queue_try_pop (pending_buffers)))
|
while ((buf = g_async_queue_try_pop (pending_buffers)))
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
|
|
||||||
gst_pad_remove_buffer_probe (mysinkpad, (guint) id);
|
gst_pad_remove_probe (mysinkpad, id);
|
||||||
id = 0;
|
id = 0;
|
||||||
|
|
||||||
gst_element_set_state (element, GST_STATE_NULL);
|
gst_element_set_state (element, GST_STATE_NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user