update for pad probe api changes

This commit is contained in:
Wim Taymans 2011-11-08 11:07:18 +01:00
parent e9629e37b7
commit 308f6301a8
12 changed files with 42 additions and 45 deletions

View file

@ -411,9 +411,10 @@ gst_discoverer_set_timeout (GstDiscoverer * dc, GstClockTime timeout)
} }
static GstPadProbeReturn static GstPadProbeReturn
_event_probe (GstPad * pad, GstPadProbeType type, GstEvent * event, _event_probe (GstPad * pad, GstPadProbeInfo * info, PrivateStream * ps)
PrivateStream * ps)
{ {
GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
if (GST_EVENT_TYPE (event) == GST_EVENT_TAG) { if (GST_EVENT_TYPE (event) == GST_EVENT_TAG) {
GstTagList *tl = NULL, *tmp; GstTagList *tl = NULL, *tmp;
@ -1043,8 +1044,8 @@ discoverer_collect (GstDiscoverer * dc)
gst_caps_get_structure (dc->priv->current_info->stream_info->caps, 0); gst_caps_get_structure (dc->priv->current_info->stream_info->caps, 0);
if (g_str_has_prefix (gst_structure_get_name (st), "image/")) if (g_str_has_prefix (gst_structure_get_name (st), "image/"))
((GstDiscovererVideoInfo *) dc->priv->current_info->stream_info)-> ((GstDiscovererVideoInfo *) dc->priv->current_info->
is_image = TRUE; stream_info)->is_image = TRUE;
} }
} }

View file

@ -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_decode_pad_set_blocked (GstDecodePad * dpad, gboolean blocked);
static void gst_pending_pad_free (GstPendingPad * ppad); static void gst_pending_pad_free (GstPendingPad * ppad);
static GstPadProbeReturn pad_event_cb (GstPad * pad, GstPadProbeType type, static GstPadProbeReturn pad_event_cb (GstPad * pad, GstPadProbeInfo * info,
gpointer type_data, gpointer data); gpointer data);
/******************************** /********************************
* Standard GObject boilerplate * * Standard GObject boilerplate *
@ -2288,10 +2288,9 @@ exit:
} }
static GstPadProbeReturn static GstPadProbeReturn
pad_event_cb (GstPad * pad, GstPadProbeType type, gpointer type_data, pad_event_cb (GstPad * pad, GstPadProbeInfo * info, gpointer data)
gpointer data)
{ {
GstEvent *event = type_data; GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
GstPendingPad *ppad = (GstPendingPad *) data; GstPendingPad *ppad = (GstPendingPad *) data;
GstDecodeChain *chain = ppad->chain; GstDecodeChain *chain = ppad->chain;
GstDecodeBin *dbin = chain->dbin; GstDecodeBin *dbin = chain->dbin;
@ -3723,8 +3722,7 @@ gst_decode_pad_init (GstDecodePad * pad)
} }
static GstPadProbeReturn static GstPadProbeReturn
source_pad_blocked_cb (GstPad * pad, GstPadProbeType type, gpointer type_data, source_pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
gpointer user_data)
{ {
GstDecodePad *dpad = user_data; GstDecodePad *dpad = user_data;
GstDecodeChain *chain; GstDecodeChain *chain;
@ -3748,10 +3746,10 @@ source_pad_blocked_cb (GstPad * pad, GstPadProbeType type, gpointer type_data,
} }
static GstPadProbeReturn static GstPadProbeReturn
source_pad_event_probe (GstPad * pad, GstPadProbeType type, gpointer type_data, source_pad_event_probe (GstPad * pad, GstPadProbeInfo * info,
gpointer user_data) gpointer user_data)
{ {
GstEvent *event = type_data; GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
GstDecodePad *dpad = user_data; GstDecodePad *dpad = user_data;
gboolean res = TRUE; gboolean res = TRUE;

View file

@ -2411,9 +2411,9 @@ selector_active_pad_changed (GObject * selector, GParamSpec * pspec,
/* this callback sends a delayed event once the pad becomes unblocked */ /* this callback sends a delayed event once the pad becomes unblocked */
static GstPadProbeReturn static GstPadProbeReturn
stream_changed_data_probe (GstPad * pad, GstPadProbeType type, stream_changed_data_probe (GstPad * pad, GstPadProbeInfo * info, gpointer data)
GstMiniObject * object, gpointer data)
{ {
GstMiniObject *object = GST_PAD_PROBE_INFO_DATA (info);
GstSourceSelect *select = (GstSourceSelect *) data; GstSourceSelect *select = (GstSourceSelect *) data;
GstEvent *e; GstEvent *e;
@ -2901,8 +2901,7 @@ no_more_pads_cb (GstElement * decodebin, GstSourceGroup * group)
select->sinkpad_data_probe = select->sinkpad_data_probe =
gst_pad_add_probe (select->sinkpad, gst_pad_add_probe (select->sinkpad,
GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM,
(GstPadProbeCallback) stream_changed_data_probe, (gpointer) select, stream_changed_data_probe, (gpointer) select, NULL);
NULL);
g_mutex_unlock (group->stream_changed_pending_lock); g_mutex_unlock (group->stream_changed_pending_lock);
gst_message_unref (msg); gst_message_unref (msg);

View file

@ -721,8 +721,8 @@ gst_play_sink_get_sink (GstPlaySink * playsink, GstPlaySinkType type)
} }
static GstPadProbeReturn static GstPadProbeReturn
gst_play_sink_vis_blocked (GstPad * tee_pad, GstPadProbeType type, gst_play_sink_vis_blocked (GstPad * tee_pad, GstPadProbeInfo * info,
gpointer type_data, gpointer user_data) gpointer user_data)
{ {
GstPlaySink *playsink; GstPlaySink *playsink;
GstPlayVisChain *chain; GstPlayVisChain *chain;
@ -2928,8 +2928,8 @@ is_raw_pad (GstPad * pad)
} }
static GstPadProbeReturn static GstPadProbeReturn
sinkpad_blocked_cb (GstPad * blockedpad, GstPadProbeType type, sinkpad_blocked_cb (GstPad * blockedpad, GstPadProbeInfo * info,
gpointer type_data, gpointer user_data); gpointer user_data);
static void static void
video_set_blocked (GstPlaySink * playsink, gboolean blocked) video_set_blocked (GstPlaySink * playsink, gboolean blocked)
@ -3000,8 +3000,8 @@ text_set_blocked (GstPlaySink * playsink, gboolean blocked)
} }
static GstPadProbeReturn static GstPadProbeReturn
sinkpad_blocked_cb (GstPad * blockedpad, GstPadProbeType type, sinkpad_blocked_cb (GstPad * blockedpad, GstPadProbeInfo * info,
gpointer type_data, gpointer user_data) gpointer user_data)
{ {
GstPlaySink *playsink = (GstPlaySink *) user_data; GstPlaySink *playsink = (GstPlaySink *) user_data;
GstPad *pad; GstPad *pad;

View file

@ -196,8 +196,7 @@ gst_play_sink_convert_bin_on_element_added (GstElement * element,
} }
static GstPadProbeReturn static GstPadProbeReturn
pad_blocked_cb (GstPad * pad, GstPadProbeType type, gpointer type_data, pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
gpointer user_data)
{ {
GstPlaySinkConvertBin *self = user_data; GstPlaySinkConvertBin *self = user_data;
GstPad *peer; GstPad *peer;

View file

@ -109,8 +109,7 @@ do_async_done (GstSubtitleOverlay * self)
} }
static GstPadProbeReturn static GstPadProbeReturn
_pad_blocked_cb (GstPad * pad, GstPadProbeType type, gpointer type_data, _pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data);
gpointer user_data);
static void static void
block_video (GstSubtitleOverlay * self) block_video (GstSubtitleOverlay * self)
@ -744,8 +743,7 @@ _has_font_desc_property (GstElement * element)
} }
static GstPadProbeReturn static GstPadProbeReturn
_pad_blocked_cb (GstPad * pad, GstPadProbeType type, gpointer type_data, _pad_blocked_cb (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
gpointer user_data)
{ {
GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY_CAST (user_data); GstSubtitleOverlay *self = GST_SUBTITLE_OVERLAY_CAST (user_data);
GstCaps *subcaps; GstCaps *subcaps;

View file

@ -988,10 +988,10 @@ configure_stream_buffering (GstURIDecodeBin * decoder)
} }
static GstPadProbeReturn static GstPadProbeReturn
decoded_pad_event_probe (GstPad * pad, GstPadProbeType type, gpointer type_data, decoded_pad_event_probe (GstPad * pad, GstPadProbeInfo * info,
gpointer user_data) gpointer user_data)
{ {
GstEvent *event = type_data; GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
GstURIDecodeBin *decoder = user_data; GstURIDecodeBin *decoder = user_data;
GST_LOG_OBJECT (pad, "%s, decoder %p", GST_EVENT_TYPE_NAME (event), decoder); 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 static GstPadProbeReturn
source_pad_event_probe (GstPad * pad, GstPadProbeType type, gpointer type_data, source_pad_event_probe (GstPad * pad, GstPadProbeInfo * info,
gpointer user_data) gpointer user_data)
{ {
GstEvent *event = type_data; GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
GstURIDecodeBin *decoder = user_data; GstURIDecodeBin *decoder = user_data;
GST_LOG_OBJECT (pad, "%s, decoder %p", GST_EVENT_TYPE_NAME (event), decoder); GST_LOG_OBJECT (pad, "%s, decoder %p", GST_EVENT_TYPE_NAME (event), decoder);

View file

@ -119,10 +119,12 @@ cleanup_vorbistag (GstElement * vorbistag)
static GstPadProbeReturn static GstPadProbeReturn
buffer_probe (GstPad * pad, GstPadProbeType type, GstBuffer * buffer, buffer_probe (GstPad * pad, GstPadProbeInfo * info, gpointer unused)
gpointer unused)
{ {
GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info);
g_async_queue_push (pending_buffers, gst_buffer_ref (buffer)); g_async_queue_push (pending_buffers, gst_buffer_ref (buffer));
return GST_PAD_PROBE_OK; return GST_PAD_PROBE_OK;
} }

View file

@ -158,9 +158,9 @@ check_chain_final_state (gpointer key, ChainState * state, gpointer data)
} }
static GstPadProbeReturn static GstPadProbeReturn
eos_buffer_probe (GstPad * pad, GstPadProbeType type, GstBuffer * buffer, eos_buffer_probe (GstPad * pad, GstPadProbeInfo * info, gpointer unused)
gpointer unused)
{ {
GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info);
gint ret; gint ret;
gint size; gint size;
gchar *oggbuffer; gchar *oggbuffer;

View file

@ -309,10 +309,10 @@ GST_START_TEST (test_continuity)
GST_END_TEST; GST_END_TEST;
static GstPadProbeReturn static GstPadProbeReturn
drop_second_data_buffer (GstPad * droppad, GstPadProbeType probe_type, drop_second_data_buffer (GstPad * droppad, GstPadProbeInfo * info,
gpointer probe_obj, gpointer unused) gpointer unused)
{ {
GstBuffer *buffer = probe_obj; GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info);
if (GST_BUFFER_OFFSET (buffer) == 1) if (GST_BUFFER_OFFSET (buffer) == 1)
return GST_PAD_PROBE_DROP; return GST_PAD_PROBE_DROP;

View file

@ -262,9 +262,10 @@ GST_START_TEST (test_timestamps)
GST_END_TEST; GST_END_TEST;
static GstPadProbeReturn static GstPadProbeReturn
drop_second_data_buffer (GstPad * droppad, GstPadProbeType type, drop_second_data_buffer (GstPad * droppad, GstPadProbeInfo * info,
GstBuffer * buffer, gpointer unused) gpointer unused)
{ {
GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info);
GstPadProbeReturn res = GST_PAD_PROBE_OK; GstPadProbeReturn res = GST_PAD_PROBE_OK;
if (GST_BUFFER_OFFSET (buffer) == 4096) if (GST_BUFFER_OFFSET (buffer) == 4096)

View file

@ -31,10 +31,9 @@ check_position (GstElement * elem, GstQuery * pos, const gchar * info)
} }
static GstPadProbeReturn static GstPadProbeReturn
print_buffer_ts (GstPad * pad, GstPadProbeType type, gpointer type_data, print_buffer_ts (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
gpointer user_data)
{ {
GstBuffer *buffer = type_data; GstBuffer *buffer = GST_PAD_PROBE_INFO_BUFFER (info);
GST_DEBUG_OBJECT (pad, " ts: %" GST_TIME_FORMAT, GST_DEBUG_OBJECT (pad, " ts: %" GST_TIME_FORMAT,
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer))); GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)));