mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
update for pad probe api changes
This commit is contained in:
parent
e9629e37b7
commit
308f6301a8
12 changed files with 42 additions and 45 deletions
|
@ -411,9 +411,10 @@ gst_discoverer_set_timeout (GstDiscoverer * dc, GstClockTime timeout)
|
|||
}
|
||||
|
||||
static GstPadProbeReturn
|
||||
_event_probe (GstPad * pad, GstPadProbeType type, GstEvent * event,
|
||||
PrivateStream * ps)
|
||||
_event_probe (GstPad * pad, GstPadProbeInfo * info, PrivateStream * ps)
|
||||
{
|
||||
GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
|
||||
|
||||
if (GST_EVENT_TYPE (event) == GST_EVENT_TAG) {
|
||||
GstTagList *tl = NULL, *tmp;
|
||||
|
||||
|
@ -1043,8 +1044,8 @@ discoverer_collect (GstDiscoverer * dc)
|
|||
gst_caps_get_structure (dc->priv->current_info->stream_info->caps, 0);
|
||||
|
||||
if (g_str_has_prefix (gst_structure_get_name (st), "image/"))
|
||||
((GstDiscovererVideoInfo *) dc->priv->current_info->stream_info)->
|
||||
is_image = TRUE;
|
||||
((GstDiscovererVideoInfo *) dc->priv->current_info->
|
||||
stream_info)->is_image = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -486,8 +486,8 @@ 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 GstPadProbeReturn pad_event_cb (GstPad * pad, GstPadProbeType type,
|
||||
gpointer type_data, gpointer data);
|
||||
static GstPadProbeReturn pad_event_cb (GstPad * pad, GstPadProbeInfo * info,
|
||||
gpointer data);
|
||||
|
||||
/********************************
|
||||
* Standard GObject boilerplate *
|
||||
|
@ -2288,10 +2288,9 @@ exit:
|
|||
}
|
||||
|
||||
static GstPadProbeReturn
|
||||
pad_event_cb (GstPad * pad, GstPadProbeType type, gpointer type_data,
|
||||
gpointer data)
|
||||
pad_event_cb (GstPad * pad, GstPadProbeInfo * info, gpointer data)
|
||||
{
|
||||
GstEvent *event = type_data;
|
||||
GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
|
||||
GstPendingPad *ppad = (GstPendingPad *) data;
|
||||
GstDecodeChain *chain = ppad->chain;
|
||||
GstDecodeBin *dbin = chain->dbin;
|
||||
|
@ -3723,8 +3722,7 @@ gst_decode_pad_init (GstDecodePad * pad)
|
|||
}
|
||||
|
||||
static GstPadProbeReturn
|
||||
source_pad_blocked_cb (GstPad * pad, GstPadProbeType type, gpointer type_data,
|
||||
gpointer user_data)
|
||||
source_pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
|
||||
{
|
||||
GstDecodePad *dpad = user_data;
|
||||
GstDecodeChain *chain;
|
||||
|
@ -3748,10 +3746,10 @@ source_pad_blocked_cb (GstPad * pad, GstPadProbeType type, gpointer type_data,
|
|||
}
|
||||
|
||||
static GstPadProbeReturn
|
||||
source_pad_event_probe (GstPad * pad, GstPadProbeType type, gpointer type_data,
|
||||
source_pad_event_probe (GstPad * pad, GstPadProbeInfo * info,
|
||||
gpointer user_data)
|
||||
{
|
||||
GstEvent *event = type_data;
|
||||
GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
|
||||
GstDecodePad *dpad = user_data;
|
||||
gboolean res = TRUE;
|
||||
|
||||
|
|
|
@ -2411,9 +2411,9 @@ selector_active_pad_changed (GObject * selector, GParamSpec * pspec,
|
|||
|
||||
/* this callback sends a delayed event once the pad becomes unblocked */
|
||||
static GstPadProbeReturn
|
||||
stream_changed_data_probe (GstPad * pad, GstPadProbeType type,
|
||||
GstMiniObject * object, gpointer data)
|
||||
stream_changed_data_probe (GstPad * pad, GstPadProbeInfo * info, gpointer data)
|
||||
{
|
||||
GstMiniObject *object = GST_PAD_PROBE_INFO_DATA (info);
|
||||
GstSourceSelect *select = (GstSourceSelect *) data;
|
||||
GstEvent *e;
|
||||
|
||||
|
@ -2901,8 +2901,7 @@ no_more_pads_cb (GstElement * decodebin, GstSourceGroup * group)
|
|||
select->sinkpad_data_probe =
|
||||
gst_pad_add_probe (select->sinkpad,
|
||||
GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM,
|
||||
(GstPadProbeCallback) stream_changed_data_probe, (gpointer) select,
|
||||
NULL);
|
||||
stream_changed_data_probe, (gpointer) select, NULL);
|
||||
|
||||
g_mutex_unlock (group->stream_changed_pending_lock);
|
||||
gst_message_unref (msg);
|
||||
|
|
|
@ -721,8 +721,8 @@ gst_play_sink_get_sink (GstPlaySink * playsink, GstPlaySinkType type)
|
|||
}
|
||||
|
||||
static GstPadProbeReturn
|
||||
gst_play_sink_vis_blocked (GstPad * tee_pad, GstPadProbeType type,
|
||||
gpointer type_data, gpointer user_data)
|
||||
gst_play_sink_vis_blocked (GstPad * tee_pad, GstPadProbeInfo * info,
|
||||
gpointer user_data)
|
||||
{
|
||||
GstPlaySink *playsink;
|
||||
GstPlayVisChain *chain;
|
||||
|
@ -2928,8 +2928,8 @@ is_raw_pad (GstPad * pad)
|
|||
}
|
||||
|
||||
static GstPadProbeReturn
|
||||
sinkpad_blocked_cb (GstPad * blockedpad, GstPadProbeType type,
|
||||
gpointer type_data, gpointer user_data);
|
||||
sinkpad_blocked_cb (GstPad * blockedpad, GstPadProbeInfo * info,
|
||||
gpointer user_data);
|
||||
|
||||
static void
|
||||
video_set_blocked (GstPlaySink * playsink, gboolean blocked)
|
||||
|
@ -3000,8 +3000,8 @@ text_set_blocked (GstPlaySink * playsink, gboolean blocked)
|
|||
}
|
||||
|
||||
static GstPadProbeReturn
|
||||
sinkpad_blocked_cb (GstPad * blockedpad, GstPadProbeType type,
|
||||
gpointer type_data, gpointer user_data)
|
||||
sinkpad_blocked_cb (GstPad * blockedpad, GstPadProbeInfo * info,
|
||||
gpointer user_data)
|
||||
{
|
||||
GstPlaySink *playsink = (GstPlaySink *) user_data;
|
||||
GstPad *pad;
|
||||
|
|
|
@ -196,8 +196,7 @@ gst_play_sink_convert_bin_on_element_added (GstElement * element,
|
|||
}
|
||||
|
||||
static GstPadProbeReturn
|
||||
pad_blocked_cb (GstPad * pad, GstPadProbeType type, gpointer type_data,
|
||||
gpointer user_data)
|
||||
pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
|
||||
{
|
||||
GstPlaySinkConvertBin *self = user_data;
|
||||
GstPad *peer;
|
||||
|
|
|
@ -109,8 +109,7 @@ do_async_done (GstSubtitleOverlay * self)
|
|||
}
|
||||
|
||||
static GstPadProbeReturn
|
||||
_pad_blocked_cb (GstPad * pad, GstPadProbeType type, gpointer type_data,
|
||||
gpointer user_data);
|
||||
_pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data);
|
||||
|
||||
static void
|
||||
block_video (GstSubtitleOverlay * self)
|
||||
|
@ -744,8 +743,7 @@ _has_font_desc_property (GstElement * element)
|
|||
}
|
||||
|
||||
static GstPadProbeReturn
|
||||
_pad_blocked_cb (GstPad * pad, GstPadProbeType type, gpointer type_data,
|
||||
gpointer user_data)
|
||||
_pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
|
||||
{
|
||||
GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY_CAST (user_data);
|
||||
GstCaps *subcaps;
|
||||
|
|
|
@ -988,10 +988,10 @@ configure_stream_buffering (GstURIDecodeBin * decoder)
|
|||
}
|
||||
|
||||
static GstPadProbeReturn
|
||||
decoded_pad_event_probe (GstPad * pad, GstPadProbeType type, gpointer type_data,
|
||||
decoded_pad_event_probe (GstPad * pad, GstPadProbeInfo * info,
|
||||
gpointer user_data)
|
||||
{
|
||||
GstEvent *event = type_data;
|
||||
GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
|
||||
GstURIDecodeBin *decoder = user_data;
|
||||
|
||||
GST_LOG_OBJECT (pad, "%s, decoder %p", GST_EVENT_TYPE_NAME (event), decoder);
|
||||
|
@ -1071,10 +1071,10 @@ new_decoded_pad_added_cb (GstElement * element, GstPad * pad,
|
|||
}
|
||||
|
||||
static GstPadProbeReturn
|
||||
source_pad_event_probe (GstPad * pad, GstPadProbeType type, gpointer type_data,
|
||||
source_pad_event_probe (GstPad * pad, GstPadProbeInfo * info,
|
||||
gpointer user_data)
|
||||
{
|
||||
GstEvent *event = type_data;
|
||||
GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
|
||||
GstURIDecodeBin *decoder = user_data;
|
||||
|
||||
GST_LOG_OBJECT (pad, "%s, decoder %p", GST_EVENT_TYPE_NAME (event), decoder);
|
||||
|
|
|
@ -119,10 +119,12 @@ cleanup_vorbistag (GstElement * vorbistag)
|
|||
|
||||
|
||||
static GstPadProbeReturn
|
||||
buffer_probe (GstPad * pad, GstPadProbeType type, GstBuffer * buffer,
|
||||
gpointer unused)
|
||||
buffer_probe (GstPad * pad, GstPadProbeInfo * info, gpointer unused)
|
||||
{
|
||||
GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info);
|
||||
|
||||
g_async_queue_push (pending_buffers, gst_buffer_ref (buffer));
|
||||
|
||||
return GST_PAD_PROBE_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -158,9 +158,9 @@ check_chain_final_state (gpointer key, ChainState * state, gpointer data)
|
|||
}
|
||||
|
||||
static GstPadProbeReturn
|
||||
eos_buffer_probe (GstPad * pad, GstPadProbeType type, GstBuffer * buffer,
|
||||
gpointer unused)
|
||||
eos_buffer_probe (GstPad * pad, GstPadProbeInfo * info, gpointer unused)
|
||||
{
|
||||
GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info);
|
||||
gint ret;
|
||||
gint size;
|
||||
gchar *oggbuffer;
|
||||
|
|
|
@ -309,10 +309,10 @@ GST_START_TEST (test_continuity)
|
|||
GST_END_TEST;
|
||||
|
||||
static GstPadProbeReturn
|
||||
drop_second_data_buffer (GstPad * droppad, GstPadProbeType probe_type,
|
||||
gpointer probe_obj, gpointer unused)
|
||||
drop_second_data_buffer (GstPad * droppad, GstPadProbeInfo * info,
|
||||
gpointer unused)
|
||||
{
|
||||
GstBuffer *buffer = probe_obj;
|
||||
GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info);
|
||||
|
||||
if (GST_BUFFER_OFFSET (buffer) == 1)
|
||||
return GST_PAD_PROBE_DROP;
|
||||
|
|
|
@ -262,9 +262,10 @@ GST_START_TEST (test_timestamps)
|
|||
GST_END_TEST;
|
||||
|
||||
static GstPadProbeReturn
|
||||
drop_second_data_buffer (GstPad * droppad, GstPadProbeType type,
|
||||
GstBuffer * buffer, gpointer unused)
|
||||
drop_second_data_buffer (GstPad * droppad, GstPadProbeInfo * info,
|
||||
gpointer unused)
|
||||
{
|
||||
GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info);
|
||||
GstPadProbeReturn res = GST_PAD_PROBE_OK;
|
||||
|
||||
if (GST_BUFFER_OFFSET (buffer) == 4096)
|
||||
|
|
|
@ -31,10 +31,9 @@ check_position (GstElement * elem, GstQuery * pos, const gchar * info)
|
|||
}
|
||||
|
||||
static GstPadProbeReturn
|
||||
print_buffer_ts (GstPad * pad, GstPadProbeType type, gpointer type_data,
|
||||
gpointer user_data)
|
||||
print_buffer_ts (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
|
||||
{
|
||||
GstBuffer *buffer = type_data;
|
||||
GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info);
|
||||
|
||||
GST_DEBUG_OBJECT (pad, " ts: %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)));
|
||||
|
|
Loading…
Reference in a new issue