/pidgin/main: 1fac43b39e83: Fix compile error on GStreamer-0.10 ...

Elliott Sales de Andrade qulogic at pidgin.im
Mon Nov 5 18:16:01 EST 2012


Changeset: 1fac43b39e83b8ab2949e4d7ce1e4b416c8df03d
Author:	 Elliott Sales de Andrade <qulogic at pidgin.im>
Date:	 2012-09-15 04:05 -0400
Branch:	 default
URL: http://hg.pidgin.im/pidgin/main/rev/1fac43b39e83

Description:

Fix compile error on GStreamer-0.10 with event probes.

diffstat:

 libpurple/media/backend-fs2.c |  23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diffs (61 lines):

diff --git a/libpurple/media/backend-fs2.c b/libpurple/media/backend-fs2.c
--- a/libpurple/media/backend-fs2.c
+++ b/libpurple/media/backend-fs2.c
@@ -179,10 +179,17 @@ static void
 purple_media_backend_fs2_init(PurpleMediaBackendFs2 *self)
 {}
 
+#if GST_CHECK_VERSION(1,0,0)
 static GstPadProbeReturn
 event_probe_cb(GstPad *srcpad, GstPadProbeInfo *info, gpointer unused)
+#else
+static gboolean
+event_probe_cb(GstPad *srcpad, GstEvent *event, gboolean release_pad)
+#endif
 {
+#if GST_CHECK_VERSION(1,0,0)
 	GstEvent *event = GST_PAD_PROBE_INFO_EVENT(info);
+#endif
 	if (GST_EVENT_TYPE(event) == GST_EVENT_CUSTOM_DOWNSTREAM
 		&& gst_event_has_name(event, "purple-unlink-tee")) {
 
@@ -190,23 +197,39 @@ event_probe_cb(GstPad *srcpad, GstPadPro
 
 		gst_pad_unlink(srcpad, gst_pad_get_peer(srcpad));
 
+#if GST_CHECK_VERSION(1,0,0)
 		gst_pad_remove_probe(srcpad,
+#else
+		gst_pad_remove_event_probe(srcpad,
+#endif
 			g_value_get_uint(gst_structure_get_value(s, "handler-id")));
 
 		if (g_value_get_boolean(gst_structure_get_value(s, "release-pad")))
 			gst_element_release_request_pad(GST_ELEMENT_PARENT(srcpad), srcpad);
 
+#if GST_CHECK_VERSION(1,0,0)
 		return GST_PAD_PROBE_DROP;
+#else
+		return FALSE;
+#endif
 	}
 
+#if GST_CHECK_VERSION(1,0,0)
 	return GST_PAD_PROBE_OK;
+#else
+	return TRUE;
+#endif
 }
 
 static void
 unlink_teepad_dynamic(GstPad *srcpad, gboolean release_pad)
 {
+#if GST_CHECK_VERSION(1,0,0)
 	guint id = gst_pad_add_probe(srcpad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
 	                             event_probe_cb, NULL, NULL);
+#else
+	guint id = gst_pad_add_event_probe(srcpad, G_CALLBACK(event_probe_cb), NULL);
+#endif
 
 	if (GST_IS_GHOST_PAD(srcpad))
 		srcpad = gst_ghost_pad_get_target(GST_GHOST_PAD(srcpad));



More information about the Commits mailing list