qulogic/pidgin

media: Fix GStreamer 0.10 build again
release-2.x.y
2018-04-26, David Woodhouse
7b9456308a5e
Parents 851775a41b4b
Children 57e88ffa6134
media: Fix GStreamer 0.10 build again

Note that one of these isn't mine, but that's only a warning. It was me
that actually broke it, with the aspect ratio thing I threw in at the
last minute.

Bad dwmw2. No biscuit.
--- a/libpurple/mediamanager.c Thu Apr 26 08:41:20 2018 +0100
+++ b/libpurple/mediamanager.c Thu Apr 26 08:42:44 2018 +0100
@@ -1523,11 +1523,17 @@
window_caps_cb_cb(PurpleMediaOutputWindow *ow)
{
GstPad *pad = gst_element_get_static_pad(ow->sink, "sink");
+#if GST_CHECK_VERSION(1,0,0)
GstCaps *caps = gst_pad_get_current_caps(pad);
+#else
+ GstCaps *caps = GST_PAD_CAPS(pad);
+#endif
if (caps) {
g_signal_emit_by_name(ow->media, "video-caps", ow->session_id, ow->participant, caps);
+#if GST_CHECK_VERSION(1,0,0)
gst_caps_unref(caps);
+#endif
}
ow->caps_id = 0;
@@ -1745,7 +1751,7 @@
}
factory = gst_element_get_factory(GST_PAD_PARENT(peer));
- factory_name = gst_plugin_feature_get_name(factory);
+ factory_name = gst_plugin_feature_get_name(GST_PLUGIN_FEATURE(factory));
if (purple_strequal(factory_name, "tee")) {
teepad = peer;
}