update for probe api changes
authorWim Taymans <wim.taymans@collabora.co.uk>
Tue, 8 Nov 2011 10:28:41 +0000 (11:28 +0100)
committerWim Taymans <wim.taymans@collabora.co.uk>
Tue, 8 Nov 2011 10:28:41 +0000 (11:28 +0100)
sys/dvb/dvbbasebin.c
tests/examples/camerabin/gst-camera-perf.c
tests/examples/camerabin2/gst-camerabin2-test.c
tests/examples/scaletempo/demo-player.c

index 6e32e01af8b75d5671275ec87c87883c37232b8f..4cc015cecdb745cede5d96872fd1001e19cb6fb2 100644 (file)
@@ -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);
 
index 04793ef1ff17016850423591eddcd41645c94303..1b1c9d8684b7876ea9335c016e0a2fd6433bed06 100644 (file)
@@ -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;
index 6ca2ffcee4c7f0eb645d624045efeec3fb0de000..2d511767ecccf7769bc948e9f285a15c126e4476 100644 (file)
@@ -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);
   }
index 1a0bd33b66f2632dcaad22a838c612b52b63ae25..8ff0fc5210e8302c722dfcc943919acde91c758b 100644 (file)
@@ -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);
 }