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);
}
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);
}
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,
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) {
DISCO_UNLOCK (ps->dc);
}
- return GST_PROBE_OK;
+ return GST_PAD_PROBE_OK;
}
static gboolean
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);
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);
/********************************
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);
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;
default:
break;
}
- return GST_PROBE_OK;
+ return GST_PAD_PROBE_OK;
}
static void
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;
}
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;
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
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 {
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);
}
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);
}
/* 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;
/* 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)
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;
}
}
* 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);
}
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);
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;
GST_PLAY_SINK_UNLOCK (playsink);
/* remove the probe and unblock the pad */
- return GST_PROBE_REMOVE;
+ return GST_PAD_PROBE_REMOVE;
}
void
* 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);
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)
(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);
(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);
(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);
}
}
-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;
GST_PLAY_SINK_UNLOCK (playsink);
- return GST_PROBE_OK;
+ return GST_PAD_PROBE_OK;
}
static void
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);
}
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;
self->sink_proxypad_block_id = 0;
GST_PLAY_SINK_AUDIO_CONVERT_UNLOCK (self);
- return GST_PROBE_REMOVE;
+ return GST_PAD_PROBE_REMOVE;
link_failed:
{
self->sink_proxypad_block_id = 0;
GST_PLAY_SINK_AUDIO_CONVERT_UNLOCK (self);
- return GST_PROBE_REMOVE;
+ return GST_PAD_PROBE_REMOVE;
}
}
{
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);
}
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;
self->sink_proxypad_block_id = 0;
GST_PLAY_SINK_VIDEO_CONVERT_UNLOCK (self);
- return GST_PROBE_REMOVE;
+ return GST_PAD_PROBE_REMOVE;
link_failed:
{
self->sink_proxypad_block_id = 0;
GST_PLAY_SINK_VIDEO_CONVERT_UNLOCK (self);
- return GST_PROBE_REMOVE;
+ return GST_PAD_PROBE_REMOVE;
}
}
{
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);
}
}
}
-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
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);
}
}
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);
}
}
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);
gst_plugin_feature_list_free (factories);
GST_SUBTITLE_OVERLAY_UNLOCK (self);
- return GST_PROBE_OK;
+ return GST_PAD_PROBE_OK;
}
static GstStateChangeReturn
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;
}
/* 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 */
/* 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);
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;
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
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);
}
}
-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 ();
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;
}
}
- return GST_PROBE_OK;
+ return GST_PAD_PROBE_OK;
}
static void
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);
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)
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);
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);
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);
}
}
-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;
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
}
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);