From 95cd0b3ba8718037ab544f88a03829adac0d8c3c Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 8 Nov 2011 11:28:41 +0100 Subject: [PATCH] update for probe api changes --- sys/dvb/dvbbasebin.c | 6 +++--- tests/examples/camerabin/gst-camera-perf.c | 3 +-- tests/examples/camerabin2/gst-camerabin2-test.c | 17 +++++++---------- tests/examples/scaletempo/demo-player.c | 12 ++++++------ 4 files changed, 17 insertions(+), 21 deletions(-) diff --git a/sys/dvb/dvbbasebin.c b/sys/dvb/dvbbasebin.c index 6e32e01af8..4cc015cecd 100644 --- a/sys/dvb/dvbbasebin.c +++ b/sys/dvb/dvbbasebin.c @@ -100,7 +100,7 @@ static void dvb_base_bin_dispose (GObject * object); static void dvb_base_bin_finalize (GObject * object); static GstPadProbeReturn dvb_base_bin_ts_pad_probe_cb (GstPad * pad, - GstPadProbeType type, gpointer data, gpointer user_data); + GstPadProbeInfo * info, gpointer user_data); static GstStateChangeReturn dvb_base_bin_change_state (GstElement * element, GstStateChange transition); static void dvb_base_bin_handle_message (GstBin * bin, GstMessage * message); @@ -528,8 +528,8 @@ dvb_base_bin_reset_pmtlist (DvbBaseBin * dvbbasebin) } static GstPadProbeReturn -dvb_base_bin_ts_pad_probe_cb (GstPad * pad, GstPadProbeType type, - gpointer data, gpointer user_data) +dvb_base_bin_ts_pad_probe_cb (GstPad * pad, GstPadProbeInfo * info, + gpointer user_data) { DvbBaseBin *dvbbasebin = GST_DVB_BASE_BIN (user_data); diff --git a/tests/examples/camerabin/gst-camera-perf.c b/tests/examples/camerabin/gst-camera-perf.c index 04793ef1ff..1b1c9d8684 100644 --- a/tests/examples/camerabin/gst-camera-perf.c +++ b/tests/examples/camerabin/gst-camera-perf.c @@ -179,8 +179,7 @@ static gboolean setup_add_pad_probe (GstElement * elem, const gchar * pad_name, */ static GstPadProbeReturn -pad_has_buffer (GstPad * pad, GstPadProbeType type, gpointer type_data, - gpointer user_data) +pad_has_buffer (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) { gboolean *signal_sink = (gboolean *) user_data; gboolean print_and_restart = FALSE; diff --git a/tests/examples/camerabin2/gst-camerabin2-test.c b/tests/examples/camerabin2/gst-camerabin2-test.c index 6ca2ffcee4..2d511767ec 100644 --- a/tests/examples/camerabin2/gst-camerabin2-test.c +++ b/tests/examples/camerabin2/gst-camerabin2-test.c @@ -312,8 +312,8 @@ create_host_window (void) } static GstPadProbeReturn -camera_src_get_timestamp_probe (GstPad * pad, GstPadProbeType type, - GstMiniObject * obj, gpointer udata) +camera_src_get_timestamp_probe (GstPad * pad, GstPadProbeInfo * info, + gpointer udata) { CaptureTiming *timing; @@ -323,8 +323,8 @@ camera_src_get_timestamp_probe (GstPad * pad, GstPadProbeType type, return GST_PAD_PROBE_REMOVE; } -static gboolean -viewfinder_get_timestamp_probe (GstPad * pad, GstMiniObject * obj, +static GstPadProbeReturn +viewfinder_get_timestamp_probe (GstPad * pad, GstPadProbeInfo * info, gpointer udata) { CaptureTiming *timing; @@ -332,9 +332,7 @@ viewfinder_get_timestamp_probe (GstPad * pad, GstMiniObject * obj, timing = (CaptureTiming *) g_list_first (capture_times)->data; timing->precapture = gst_util_get_timestamp (); - gst_pad_remove_probe (pad, viewfinder_probe_id); - - return TRUE; + return GST_PAD_PROBE_REMOVE; } static GstBusSyncReply @@ -375,8 +373,7 @@ sync_bus_callback (GstBus * bus, GstMessage * message, gpointer data) viewfinder_probe_id = gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER, - (GstPadProbeCallback) viewfinder_get_timestamp_probe, NULL, - NULL); + viewfinder_get_timestamp_probe, NULL, NULL); gst_object_unref (pad); } @@ -950,7 +947,7 @@ run_pipeline (gpointer user_data) pad = gst_element_get_static_pad (video_source, "imgsrc"); camera_probe_id = gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_BUFFER, - (GstPadProbeCallback) camera_src_get_timestamp_probe, NULL, NULL); + camera_src_get_timestamp_probe, NULL, NULL); gst_object_unref (pad); } diff --git a/tests/examples/scaletempo/demo-player.c b/tests/examples/scaletempo/demo-player.c index 1a0bd33b66..8ff0fc5210 100644 --- a/tests/examples/scaletempo/demo-player.c +++ b/tests/examples/scaletempo/demo-player.c @@ -69,9 +69,9 @@ no_pipeline (DemoPlayer * player) } static GstPadProbeReturn -demo_player_event_listener (GstPad * pad, GstPadProbeType type, - GstEvent * event, gpointer data) +demo_player_event_listener (GstPad * pad, GstPadProbeInfo * info, gpointer data) { + GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info); DemoPlayer *player = DEMO_PLAYER (data); DemoPlayerPrivate *priv = DEMO_PLAYER_GET_PRIVATE (player); @@ -175,8 +175,8 @@ demo_player_build_pipeline (DemoPlayer * player) LINK_ELEMENTS (resample, asink); gst_pad_add_probe (gst_element_get_static_pad (asink, "sink"), - GST_PAD_PROBE_TYPE_EVENT, - (GstPadProbeCallback) demo_player_event_listener, player, NULL); + GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM, + demo_player_event_listener, player, NULL); ghostpad = gst_element_get_static_pad (filter, "sink"); gst_element_add_pad (audioline, gst_ghost_pad_new ("sink", ghostpad)); @@ -198,8 +198,8 @@ demo_player_build_pipeline (DemoPlayer * player) MAKE_ELEMENT (NULL, priv->scalerate_line, audiosink_name, "scaling_audio_sink"); gst_pad_add_probe (gst_element_get_static_pad (priv->scalerate_line, - "sink"), GST_PAD_PROBE_TYPE_EVENT, - (GstPadProbeCallback) demo_player_event_listener, player, NULL); + "sink"), GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM, + demo_player_event_listener, player, NULL); g_object_ref (priv->scaletempo_line); g_object_ref (priv->scalerate_line); }