Update for pad API changes

GstProbeType, GstProbeReturn and GstActivateMode -> GstPad*
This commit is contained in:
Tim-Philipp Müller 2011-11-01 00:34:28 +00:00
parent edc7b45dc6
commit b52c5819fb
14 changed files with 95 additions and 93 deletions

View file

@ -741,7 +741,7 @@ gst_base_audio_sink_setcaps (GstBaseSink * bsink, GstCaps * caps)
if (!gst_ring_buffer_acquire (sink->ringbuffer, spec))
goto acquire_error;
if (bsink->pad_mode == GST_ACTIVATE_PUSH) {
if (bsink->pad_mode == GST_PAD_ACTIVATE_PUSH) {
GST_DEBUG_OBJECT (sink, "activate ringbuffer");
gst_ring_buffer_activate (sink->ringbuffer, TRUE);
}
@ -1912,7 +1912,7 @@ gst_base_audio_sink_async_play (GstBaseSink * basesink)
GST_DEBUG_OBJECT (sink, "ringbuffer may start now");
sink->priv->sync_latency = TRUE;
gst_ring_buffer_may_start (sink->ringbuffer, TRUE);
if (basesink->pad_mode == GST_ACTIVATE_PULL) {
if (basesink->pad_mode == GST_PAD_ACTIVATE_PULL) {
/* we always start the ringbuffer in pull mode immediatly */
gst_ring_buffer_start (sink->ringbuffer);
}
@ -1965,7 +1965,7 @@ gst_base_audio_sink_change_state (GstElement * element,
GST_OBJECT_UNLOCK (sink);
gst_ring_buffer_may_start (sink->ringbuffer, TRUE);
if (GST_BASE_SINK_CAST (sink)->pad_mode == GST_ACTIVATE_PULL ||
if (GST_BASE_SINK_CAST (sink)->pad_mode == GST_PAD_ACTIVATE_PULL ||
g_atomic_int_get (&sink->eos_rendering) || eos) {
/* we always start the ringbuffer in pull mode immediatly */
/* sync rendering on eos needs running clock,

View file

@ -410,8 +410,8 @@ gst_discoverer_set_timeout (GstDiscoverer * dc, GstClockTime timeout)
DISCO_UNLOCK (dc);
}
static GstProbeReturn
_event_probe (GstPad * pad, GstProbeType type, GstEvent * event,
static GstPadProbeReturn
_event_probe (GstPad * pad, GstPadProbeType type, GstEvent * event,
PrivateStream * ps)
{
if (GST_EVENT_TYPE (event) == GST_EVENT_TAG) {
@ -436,7 +436,7 @@ _event_probe (GstPad * pad, GstProbeType type, GstEvent * event,
DISCO_UNLOCK (ps->dc);
}
return GST_PROBE_OK;
return GST_PAD_PROBE_OK;
}
static gboolean
@ -506,7 +506,7 @@ uridecodebin_pad_added_cb (GstElement * uridecodebin, GstPad * pad,
gst_object_unref (sinkpad);
/* Add an event probe */
gst_pad_add_probe (pad, GST_PROBE_TYPE_EVENT,
gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT,
(GstPadProbeCallback) _event_probe, ps, NULL);
DISCO_LOCK (dc);

View file

@ -486,7 +486,7 @@ static void gst_decode_pad_unblock (GstDecodePad * dpad);
static void gst_decode_pad_set_blocked (GstDecodePad * dpad, gboolean blocked);
static void gst_pending_pad_free (GstPendingPad * ppad);
static GstProbeReturn pad_event_cb (GstPad * pad, GstProbeType type,
static GstPadProbeReturn pad_event_cb (GstPad * pad, GstPadProbeType type,
gpointer type_data, gpointer data);
/********************************
@ -1685,7 +1685,8 @@ setup_caps_delay:
ppad->pad = gst_object_ref (pad);
ppad->chain = chain;
ppad->event_probe_id =
gst_pad_add_probe (pad, GST_PROBE_TYPE_EVENT, pad_event_cb, ppad, NULL);
gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT, pad_event_cb, ppad,
NULL);
chain->pending_pads = g_list_prepend (chain->pending_pads, ppad);
g_signal_connect (G_OBJECT (pad), "notify::caps",
G_CALLBACK (caps_notify_cb), chain);
@ -2286,8 +2287,8 @@ exit:
return;
}
static GstProbeReturn
pad_event_cb (GstPad * pad, GstProbeType type, gpointer type_data,
static GstPadProbeReturn
pad_event_cb (GstPad * pad, GstPadProbeType type, gpointer type_data,
gpointer data)
{
GstEvent *event = type_data;
@ -2312,7 +2313,7 @@ pad_event_cb (GstPad * pad, GstProbeType type, gpointer type_data,
default:
break;
}
return GST_PROBE_OK;
return GST_PAD_PROBE_OK;
}
static void
@ -3702,8 +3703,8 @@ gst_decode_pad_init (GstDecodePad * pad)
gst_object_ref_sink (pad);
}
static GstProbeReturn
source_pad_blocked_cb (GstPad * pad, GstProbeType type, gpointer type_data,
static GstPadProbeReturn
source_pad_blocked_cb (GstPad * pad, GstPadProbeType type, gpointer type_data,
gpointer user_data)
{
GstDecodePad *dpad = user_data;
@ -3724,11 +3725,11 @@ source_pad_blocked_cb (GstPad * pad, GstProbeType type, gpointer type_data,
}
EXPOSE_UNLOCK (dbin);
return GST_PROBE_OK;
return GST_PAD_PROBE_OK;
}
static GstProbeReturn
source_pad_event_probe (GstPad * pad, GstProbeType type, gpointer type_data,
static GstPadProbeReturn
source_pad_event_probe (GstPad * pad, GstPadProbeType type, gpointer type_data,
gpointer user_data)
{
GstEvent *event = type_data;
@ -3750,9 +3751,9 @@ source_pad_event_probe (GstPad * pad, GstProbeType type, gpointer type_data,
res = gst_decode_pad_handle_eos (dpad);
}
if (res)
return GST_PROBE_OK;
return GST_PAD_PROBE_OK;
else
return GST_PROBE_DROP;
return GST_PAD_PROBE_DROP;
}
static void
@ -3774,7 +3775,7 @@ gst_decode_pad_set_blocked (GstDecodePad * dpad, gboolean blocked)
if (!blocked || !dbin->shutdown) {
if (blocked) {
if (dpad->block_id == 0)
dpad->block_id = gst_pad_add_probe (opad, GST_PROBE_TYPE_BLOCK,
dpad->block_id = gst_pad_add_probe (opad, GST_PAD_PROBE_TYPE_BLOCK,
source_pad_blocked_cb, gst_object_ref (dpad),
(GDestroyNotify) gst_object_unref);
} else {
@ -3813,7 +3814,7 @@ out:
static void
gst_decode_pad_add_drained_check (GstDecodePad * dpad)
{
gst_pad_add_probe (GST_PAD_CAST (dpad), GST_PROBE_TYPE_EVENT,
gst_pad_add_probe (GST_PAD_CAST (dpad), GST_PAD_PROBE_TYPE_EVENT,
source_pad_event_probe, dpad, NULL);
}

View file

@ -1671,7 +1671,7 @@ gst_play_bin_suburidecodebin_block (GstSourceGroup * group,
sinkpad = g_value_get_object (&item);
if (block) {
group->block_id =
gst_pad_add_probe (sinkpad, GST_PROBE_TYPE_BLOCK, NULL, NULL,
gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_BLOCK, NULL, NULL,
NULL);
} else if (group->block_id) {
gst_pad_remove_probe (sinkpad, group->block_id);
@ -2410,8 +2410,8 @@ selector_active_pad_changed (GObject * selector, GParamSpec * pspec,
}
/* this callback sends a delayed event once the pad becomes unblocked */
static GstProbeReturn
stream_changed_data_probe (GstPad * pad, GstProbeType type,
static GstPadProbeReturn
stream_changed_data_probe (GstPad * pad, GstPadProbeType type,
GstMiniObject * object, gpointer data)
{
GstSourceSelect *select = (GstSourceSelect *) data;
@ -2426,7 +2426,7 @@ stream_changed_data_probe (GstPad * pad, GstProbeType type,
/* really, this should not happen */
if (!e) {
GST_WARNING ("Data probed called, but no delayed event");
return GST_PROBE_OK;
return GST_PAD_PROBE_OK;
}
if (GST_IS_EVENT (object)
@ -2435,11 +2435,11 @@ stream_changed_data_probe (GstPad * pad, GstProbeType type,
gst_event_ref (GST_EVENT_CAST (object));
gst_pad_send_event (pad, GST_EVENT_CAST (object));
gst_pad_send_event (pad, e);
return GST_PROBE_DROP;
return GST_PAD_PROBE_DROP;
} else {
/* send delayed event, then allow the caller to go on */
gst_pad_send_event (pad, e);
return GST_PROBE_OK;
return GST_PAD_PROBE_OK;
}
}
@ -2589,7 +2589,7 @@ pad_added_cb (GstElement * decodebin, GstPad * pad, GstSourceGroup * group)
* configured the sinks we will unblock them all. */
GST_DEBUG_OBJECT (playbin, "blocking %" GST_PTR_FORMAT, select->srcpad);
select->block_id =
gst_pad_add_probe (select->srcpad, GST_PROBE_TYPE_BLOCK, NULL, NULL,
gst_pad_add_probe (select->srcpad, GST_PAD_PROBE_TYPE_BLOCK, NULL, NULL,
NULL);
}
@ -2899,7 +2899,7 @@ no_more_pads_cb (GstElement * decodebin, GstSourceGroup * group)
pad might not be linked yet. Additionally, sending it here
apparently would be on the wrong thread */
select->sinkpad_data_probe =
gst_pad_add_probe (select->sinkpad, GST_PROBE_TYPE_DATA,
gst_pad_add_probe (select->sinkpad, GST_PAD_PROBE_TYPE_DATA,
(GstPadProbeCallback) stream_changed_data_probe, (gpointer) select,
NULL);

View file

@ -720,8 +720,8 @@ gst_play_sink_get_sink (GstPlaySink * playsink, GstPlaySinkType type)
return result;
}
static GstProbeReturn
gst_play_sink_vis_blocked (GstPad * tee_pad, GstProbeType type,
static GstPadProbeReturn
gst_play_sink_vis_blocked (GstPad * tee_pad, GstPadProbeType type,
gpointer type_data, gpointer user_data)
{
GstPlaySink *playsink;
@ -762,7 +762,7 @@ done:
GST_PLAY_SINK_UNLOCK (playsink);
/* remove the probe and unblock the pad */
return GST_PROBE_REMOVE;
return GST_PAD_PROBE_REMOVE;
}
void
@ -799,7 +799,7 @@ gst_play_sink_set_vis_plugin (GstPlaySink * playsink, GstElement * vis)
* function returns FALSE but the previous pad block will do the right thing
* anyway. */
GST_DEBUG_OBJECT (playsink, "blocking vis pad");
gst_pad_add_probe (chain->blockpad, GST_PROBE_TYPE_BLOCK,
gst_pad_add_probe (chain->blockpad, GST_PAD_PROBE_TYPE_BLOCK,
gst_play_sink_vis_blocked, playsink, NULL);
done:
GST_PLAY_SINK_UNLOCK (playsink);
@ -2926,9 +2926,9 @@ is_raw_pad (GstPad * pad)
return raw;
}
static GstProbeReturn
sinkpad_blocked_cb (GstPad * blockedpad, GstProbeType type, gpointer type_data,
gpointer user_data);
static GstPadProbeReturn
sinkpad_blocked_cb (GstPad * blockedpad, GstPadProbeType type,
gpointer type_data, gpointer user_data);
static void
video_set_blocked (GstPlaySink * playsink, gboolean blocked)
@ -2939,7 +2939,7 @@ video_set_blocked (GstPlaySink * playsink, gboolean blocked)
(playsink->video_pad)));
if (blocked && playsink->video_block_id == 0) {
playsink->video_block_id =
gst_pad_add_probe (opad, GST_PROBE_TYPE_BLOCK, sinkpad_blocked_cb,
gst_pad_add_probe (opad, GST_PAD_PROBE_TYPE_BLOCK, sinkpad_blocked_cb,
gst_object_ref (playsink), (GDestroyNotify) gst_object_unref);
} else if (!blocked && playsink->video_block_id) {
gst_pad_remove_probe (opad, playsink->video_block_id);
@ -2961,7 +2961,7 @@ audio_set_blocked (GstPlaySink * playsink, gboolean blocked)
(playsink->audio_pad)));
if (blocked && playsink->audio_block_id == 0) {
playsink->audio_block_id =
gst_pad_add_probe (opad, GST_PROBE_TYPE_BLOCK, sinkpad_blocked_cb,
gst_pad_add_probe (opad, GST_PAD_PROBE_TYPE_BLOCK, sinkpad_blocked_cb,
gst_object_ref (playsink), (GDestroyNotify) gst_object_unref);
} else if (!blocked && playsink->audio_block_id) {
gst_pad_remove_probe (opad, playsink->audio_block_id);
@ -2983,7 +2983,7 @@ text_set_blocked (GstPlaySink * playsink, gboolean blocked)
(playsink->text_pad)));
if (blocked && playsink->text_block_id == 0) {
playsink->text_block_id =
gst_pad_add_probe (opad, GST_PROBE_TYPE_BLOCK, sinkpad_blocked_cb,
gst_pad_add_probe (opad, GST_PAD_PROBE_TYPE_BLOCK, sinkpad_blocked_cb,
gst_object_ref (playsink), (GDestroyNotify) gst_object_unref);
} else if (!blocked && playsink->text_block_id) {
gst_pad_remove_probe (opad, playsink->text_block_id);
@ -2995,9 +2995,9 @@ text_set_blocked (GstPlaySink * playsink, gboolean blocked)
}
}
static GstProbeReturn
sinkpad_blocked_cb (GstPad * blockedpad, GstProbeType type, gpointer type_data,
gpointer user_data)
static GstPadProbeReturn
sinkpad_blocked_cb (GstPad * blockedpad, GstPadProbeType type,
gpointer type_data, gpointer user_data)
{
GstPlaySink *playsink = (GstPlaySink *) user_data;
GstPad *pad;
@ -3052,7 +3052,7 @@ sinkpad_blocked_cb (GstPad * blockedpad, GstProbeType type, gpointer type_data,
GST_PLAY_SINK_UNLOCK (playsink);
return GST_PROBE_OK;
return GST_PAD_PROBE_OK;
}
static void
@ -3205,8 +3205,9 @@ gst_play_sink_request_pad (GstPlaySink * playsink, GstPlaySinkType type)
GST_PAD_CAST (gst_proxy_pad_get_internal (GST_PROXY_PAD (res)));
*block_id =
gst_pad_add_probe (blockpad, GST_PROBE_TYPE_BLOCK, sinkpad_blocked_cb,
gst_object_ref (playsink), (GDestroyNotify) gst_object_unref);
gst_pad_add_probe (blockpad, GST_PAD_PROBE_TYPE_BLOCK,
sinkpad_blocked_cb, gst_object_ref (playsink),
(GDestroyNotify) gst_object_unref);
PENDING_FLAG_SET (playsink, type);
gst_object_unref (blockpad);
}

View file

@ -72,8 +72,8 @@ post_missing_element_message (GstPlaySinkAudioConvert * self,
gst_element_post_message (GST_ELEMENT_CAST (self), msg);
}
static GstProbeReturn
pad_blocked_cb (GstPad * pad, GstProbeType type, gpointer type_data,
static GstPadProbeReturn
pad_blocked_cb (GstPad * pad, GstPadProbeType type, gpointer type_data,
gpointer user_data)
{
GstPlaySinkAudioConvert *self = user_data;
@ -208,7 +208,7 @@ unblock:
self->sink_proxypad_block_id = 0;
GST_PLAY_SINK_AUDIO_CONVERT_UNLOCK (self);
return GST_PROBE_REMOVE;
return GST_PAD_PROBE_REMOVE;
link_failed:
{
@ -219,7 +219,7 @@ link_failed:
self->sink_proxypad_block_id = 0;
GST_PLAY_SINK_AUDIO_CONVERT_UNLOCK (self);
return GST_PROBE_REMOVE;
return GST_PAD_PROBE_REMOVE;
}
}
@ -228,7 +228,7 @@ block_proxypad (GstPlaySinkAudioConvert * self)
{
if (self->sink_proxypad_block_id == 0) {
self->sink_proxypad_block_id =
gst_pad_add_probe (self->sink_proxypad, GST_PROBE_TYPE_BLOCK,
gst_pad_add_probe (self->sink_proxypad, GST_PAD_PROBE_TYPE_BLOCK,
pad_blocked_cb, gst_object_ref (self),
(GDestroyNotify) gst_object_unref);
}

View file

@ -72,8 +72,8 @@ post_missing_element_message (GstPlaySinkVideoConvert * self,
gst_element_post_message (GST_ELEMENT_CAST (self), msg);
}
static GstProbeReturn
pad_blocked_cb (GstPad * pad, GstProbeType type, gpointer type_data,
static GstPadProbeReturn
pad_blocked_cb (GstPad * pad, GstPadProbeType type, gpointer type_data,
gpointer user_data)
{
GstPlaySinkVideoConvert *self = user_data;
@ -189,7 +189,7 @@ unblock:
self->sink_proxypad_block_id = 0;
GST_PLAY_SINK_VIDEO_CONVERT_UNLOCK (self);
return GST_PROBE_REMOVE;
return GST_PAD_PROBE_REMOVE;
link_failed:
{
@ -200,7 +200,7 @@ link_failed:
self->sink_proxypad_block_id = 0;
GST_PLAY_SINK_VIDEO_CONVERT_UNLOCK (self);
return GST_PROBE_REMOVE;
return GST_PAD_PROBE_REMOVE;
}
}
@ -209,7 +209,7 @@ block_proxypad (GstPlaySinkVideoConvert * self)
{
if (self->sink_proxypad_block_id == 0) {
self->sink_proxypad_block_id =
gst_pad_add_probe (self->sink_proxypad, GST_PROBE_TYPE_BLOCK,
gst_pad_add_probe (self->sink_proxypad, GST_PAD_PROBE_TYPE_BLOCK,
pad_blocked_cb, gst_object_ref (self),
(GDestroyNotify) gst_object_unref);
}

View file

@ -108,8 +108,8 @@ do_async_done (GstSubtitleOverlay * self)
}
}
static GstProbeReturn
_pad_blocked_cb (GstPad * pad, GstProbeType type, gpointer type_data,
static GstPadProbeReturn
_pad_blocked_cb (GstPad * pad, GstPadProbeType type, gpointer type_data,
gpointer user_data);
static void
@ -120,7 +120,7 @@ block_video (GstSubtitleOverlay * self)
if (self->video_block_pad) {
self->video_block_id =
gst_pad_add_probe (self->video_block_pad, GST_PROBE_TYPE_BLOCK,
gst_pad_add_probe (self->video_block_pad, GST_PAD_PROBE_TYPE_BLOCK,
_pad_blocked_cb, self, NULL);
}
}
@ -143,7 +143,7 @@ block_subtitle (GstSubtitleOverlay * self)
if (self->subtitle_block_pad) {
self->subtitle_block_id =
gst_pad_add_probe (self->subtitle_block_pad, GST_PROBE_TYPE_BLOCK,
gst_pad_add_probe (self->subtitle_block_pad, GST_PAD_PROBE_TYPE_BLOCK,
_pad_blocked_cb, self, NULL);
}
}
@ -753,8 +753,8 @@ _has_font_desc_property (GstElement * element)
return (pspec && pspec->value_type == G_TYPE_STRING);
}
static GstProbeReturn
_pad_blocked_cb (GstPad * pad, GstProbeType type, gpointer type_data,
static GstPadProbeReturn
_pad_blocked_cb (GstPad * pad, GstPadProbeType type, gpointer type_data,
gpointer user_data)
{
GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY_CAST (user_data);
@ -1357,7 +1357,7 @@ out:
gst_plugin_feature_list_free (factories);
GST_SUBTITLE_OVERLAY_UNLOCK (self);
return GST_PROBE_OK;
return GST_PAD_PROBE_OK;
}
static GstStateChangeReturn

View file

@ -987,8 +987,8 @@ configure_stream_buffering (GstURIDecodeBin * decoder)
gst_object_unref (queue);
}
static GstProbeReturn
decoded_pad_event_probe (GstPad * pad, GstProbeType type, gpointer type_data,
static GstPadProbeReturn
decoded_pad_event_probe (GstPad * pad, GstPadProbeType type, gpointer type_data,
gpointer user_data)
{
GstEvent *event = type_data;
@ -1029,7 +1029,7 @@ decoded_pad_event_probe (GstPad * pad, GstProbeType type, gpointer type_data,
}
/* never drop */
return GST_PROBE_OK;
return GST_PAD_PROBE_OK;
}
/* Called by the signal handlers when a decodebin has found a new raw pad */
@ -1060,7 +1060,7 @@ new_decoded_pad_added_cb (GstElement * element, GstPad * pad,
/* add event probe to monitor tags */
stream = g_slice_alloc0 (sizeof (GstURIDecodeBinStream));
stream->probe_id =
gst_pad_add_probe (pad, GST_PROBE_TYPE_EVENT, decoded_pad_event_probe,
gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT, decoded_pad_event_probe,
decoder, NULL);
GST_URI_DECODE_BIN_LOCK (decoder);
g_hash_table_insert (decoder->streams, pad, stream);
@ -1070,8 +1070,8 @@ new_decoded_pad_added_cb (GstElement * element, GstPad * pad,
gst_element_add_pad (GST_ELEMENT_CAST (decoder), newpad);
}
static GstProbeReturn
source_pad_event_probe (GstPad * pad, GstProbeType type, gpointer type_data,
static GstPadProbeReturn
source_pad_event_probe (GstPad * pad, GstPadProbeType type, gpointer type_data,
gpointer user_data)
{
GstEvent *event = type_data;
@ -1086,7 +1086,7 @@ source_pad_event_probe (GstPad * pad, GstProbeType type, gpointer type_data,
gst_uri_decode_bin_signals[SIGNAL_DRAINED], 0, NULL);
}
/* never drop events */
return GST_PROBE_OK;
return GST_PAD_PROBE_OK;
}
/* called when we found a raw pad on the source element. We need to set up a
@ -1095,8 +1095,8 @@ static void
expose_decoded_pad (GstElement * element, GstPad * pad,
GstURIDecodeBin * decoder)
{
gst_pad_add_probe (pad, GST_PROBE_TYPE_EVENT, source_pad_event_probe, decoder,
NULL);
gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT, source_pad_event_probe,
decoder, NULL);
new_decoded_pad_added_cb (element, pad, decoder);
}

View file

@ -118,18 +118,18 @@ cleanup_vorbistag (GstElement * vorbistag)
}
static GstProbeReturn
buffer_probe (GstPad * pad, GstProbeType type, GstBuffer * buffer,
static GstPadProbeReturn
buffer_probe (GstPad * pad, GstPadProbeType type, GstBuffer * buffer,
gpointer unused)
{
g_async_queue_push (pending_buffers, gst_buffer_ref (buffer));
return GST_PROBE_OK;
return GST_PAD_PROBE_OK;
}
static void
start_pipeline (GstElement * element)
{
id = gst_pad_add_probe (mysinkpad, GST_PROBE_TYPE_BUFFER,
id = gst_pad_add_probe (mysinkpad, GST_PAD_PROBE_TYPE_BUFFER,
(GstPadProbeCallback) buffer_probe, NULL, NULL);
pending_buffers = g_async_queue_new ();

View file

@ -157,8 +157,8 @@ check_chain_final_state (gpointer key, ChainState * state, gpointer data)
return TRUE;
}
static GstProbeReturn
eos_buffer_probe (GstPad * pad, GstProbeType type, GstBuffer * buffer,
static GstPadProbeReturn
eos_buffer_probe (GstPad * pad, GstPadProbeType type, GstBuffer * buffer,
gpointer unused)
{
gint ret;
@ -196,7 +196,7 @@ eos_buffer_probe (GstPad * pad, GstProbeType type, GstBuffer * buffer,
}
}
return GST_PROBE_OK;
return GST_PAD_PROBE_OK;
}
static void
@ -209,7 +209,7 @@ start_pipeline (GstElement * bin, GstPad * pad)
eos_chain_states =
g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL, g_free);
probe_id =
gst_pad_add_probe (pad, GST_PROBE_TYPE_BUFFER,
gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER,
(GstPadProbeCallback) eos_buffer_probe, NULL, NULL);
ret = gst_element_set_state (bin, GST_STATE_PLAYING);

View file

@ -308,16 +308,16 @@ GST_START_TEST (test_continuity)
GST_END_TEST;
static GstProbeReturn
drop_second_data_buffer (GstPad * droppad, GstProbeType probe_type,
static GstPadProbeReturn
drop_second_data_buffer (GstPad * droppad, GstPadProbeType probe_type,
gpointer probe_obj, gpointer unused)
{
GstBuffer *buffer = probe_obj;
if (GST_BUFFER_OFFSET (buffer) == 1)
return GST_PROBE_DROP;
return GST_PAD_PROBE_DROP;
else
return GST_PROBE_OK;
return GST_PAD_PROBE_OK;
}
GST_START_TEST (test_discontinuity)
@ -361,7 +361,7 @@ GST_START_TEST (test_discontinuity)
gst_object_unref (sink);
}
drop_id = gst_pad_add_probe (droppad, GST_PROBE_TYPE_BUFFER,
drop_id = gst_pad_add_probe (droppad, GST_PAD_PROBE_TYPE_BUFFER,
drop_second_data_buffer, NULL, NULL);
gst_buffer_straw_start_pipeline (bin, pad);

View file

@ -261,14 +261,14 @@ GST_START_TEST (test_timestamps)
GST_END_TEST;
static GstProbeReturn
drop_second_data_buffer (GstPad * droppad, GstProbeType type,
static GstPadProbeReturn
drop_second_data_buffer (GstPad * droppad, GstPadProbeType type,
GstBuffer * buffer, gpointer unused)
{
GstProbeReturn res = GST_PROBE_OK;
GstPadProbeReturn res = GST_PAD_PROBE_OK;
if (GST_BUFFER_OFFSET (buffer) == 4096)
res = GST_PROBE_DROP;
res = GST_PAD_PROBE_DROP;
GST_DEBUG ("dropping %d", res);
@ -317,7 +317,7 @@ GST_START_TEST (test_discontinuity)
gst_object_unref (sink);
}
drop_id = gst_pad_add_probe (droppad, GST_PROBE_TYPE_BUFFER,
drop_id = gst_pad_add_probe (droppad, GST_PAD_PROBE_TYPE_BUFFER,
(GstPadProbeCallback) drop_second_data_buffer, NULL, NULL);
gst_buffer_straw_start_pipeline (bin, pad);

View file

@ -31,8 +31,8 @@ check_position (GstElement * elem, GstQuery * pos, const gchar * info)
}
}
static GstProbeReturn
print_buffer_ts (GstPad * pad, GstProbeType type, gpointer type_data,
static GstPadProbeReturn
print_buffer_ts (GstPad * pad, GstPadProbeType type, gpointer type_data,
gpointer user_data)
{
GstBuffer *buffer = type_data;
@ -40,7 +40,7 @@ print_buffer_ts (GstPad * pad, GstProbeType type, gpointer type_data,
GST_DEBUG_OBJECT (pad, " ts: %" GST_TIME_FORMAT,
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)));
return GST_PROBE_OK;
return GST_PAD_PROBE_OK;
}
gint
@ -123,7 +123,7 @@ main (gint argc, gchar ** argv)
}
src_pad = gst_element_get_static_pad (src, "src");
gst_pad_add_probe (src_pad, GST_PROBE_TYPE_BUFFER, print_buffer_ts, NULL,
gst_pad_add_probe (src_pad, GST_PAD_PROBE_TYPE_BUFFER, print_buffer_ts, NULL,
NULL);
gst_object_unref (src_pad);