--- a/configure.ac Mon Dec 14 23:48:24 2015 -0800
+++ b/configure.ac Wed Dec 16 00:35:23 2015 -0800
@@ -523,9 +523,6 @@
AC_ARG_ENABLE(consoleui, [AS_HELP_STRING([--disable-consoleui],
[compile without console user interface])],
[enable_consoleui=$enableval force_finch=$enableval], [enable_consoleui=yes force_finch=no])
-AC_ARG_ENABLE(gstreamer,
- [AS_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])],
- enable_gst="$enableval", enable_gst="yes")
dnl #######################################################################
dnl # Check for GTK+ 2.18 and other things used by the GTK UI
@@ -596,13 +593,12 @@
elif test "x$with_gtk" = "xauto"; then
- if test "x$enable_gst" != "xno"; then
- gst10_pkg="gstreamer-1.0"
- gst010_pkg="gstreamer-0.10"
+ dnl Leaved this here to simplify changeset. Remove when removing gtk2 support + gst10_pkg="gstreamer-1.0" + gst010_pkg="gstreamer-0.10" PKG_CHECK_MODULES(GTK, [gtk+-3.0 >= 3.0.0 $gst10_pkg], [with_gtk=3], [
- PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.18.0 $gst010_pkg], [with_gtk=2], [
+ PKG_CHECK_MODULES(GTK, [gtk+-2.0 >= 2.18.0 $gst10_pkg], [with_gtk=2], [ You must have GTK+ 2.18.0 or newer and GStreamer development headers installed to compile
@@ -1011,93 +1007,32 @@
dnl #######################################################################
dnl # Check for GStreamer
dnl #######################################################################
+AC_ARG_ENABLE(gstreamer, + [AS_HELP_STRING([--disable-gstreamer], [compile without GStreamer audio support])], + enable_gst="$enableval", enable_gst="yes") -dnl AC_ARG_ENABLE is declared near GTK2/3 configuration
-AC_ARG_WITH(gstreamer, [AS_HELP_STRING([--with-gstreamer=<version>],
- [compile with GStreamer 0.10 or 1.0 interface (default: auto)])],
- with_gstreamer="$withval", with_gstreamer="auto")
-if test "x$enable_gst" != "xno"; then
- if test "x$with_gstreamer" == "xauto" -a "x$with_gtk" = "x3"; then
- elif test "x$with_gstreamer" == "xauto" -a "x$with_gtk" = "x2"; then
- if test "x$with_gstreamer" == "xauto"; then
- PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0], [
- AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
- AC_SUBST(GSTREAMER_CFLAGS)
- AC_SUBST(GSTREAMER_LIBS)
- dnl Check whether forking stuff is required for this version.
- PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], [
- AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds])
- AC_SUBST(GSTREAMER_CFLAGS)
- AC_SUBST(GSTREAMER_LIBS)
- if test "x$force_deps" = "xyes" ; then
-GStreamer development headers not found.
-Use --disable-gstreamer if you do not need GStreamer (sound) support.
- elif test "x$with_gstreamer" == "x1.0"; then
- PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0], [
- AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer 1.0 for playing sounds])
- AC_SUBST(GSTREAMER_CFLAGS)
- AC_SUBST(GSTREAMER_LIBS)
- if test "x$force_deps" = "xyes" ; then
-GStreamer development headers not found.
-Use --disable-gstreamer if you do not need GStreamer (sound) support.
- elif test "x$with_gstreamer" == "x0.10"; then
- PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10], [
- AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer 0.10 for playing sounds])
- AC_SUBST(GSTREAMER_CFLAGS)
- AC_SUBST(GSTREAMER_LIBS)
- if test "x$force_deps" = "xyes" ; then
-GStreamer development headers not found.
-Use --disable-gstreamer if you do not need GStreamer (sound) support.
- AC_MSG_ERROR([--with-gstreamer must specify one of 0.10, 1.0 or auto.])
-if test "x$with_gtk" == "x3" -a "x$with_gstreamer" == "x0.10"; then
- AC_MSG_ERROR([WebKitGTK+ 3.0 cannot be mixed with GStreamer 0.10.
-Please switch to WebKitGTK+ 2.0 or GStreamer 1.0.])
-elif test "x$with_gtk" == "x2" -a "x$with_gstreamer" == "x1.0"; then
- AC_MSG_ERROR([WebKitGTK+ 2.0 cannot be mixed with GStreamer 1.0.
-Please switch to WebKitGTK+ 3.0 or GStreamer 0.10.])
-if test "x$with_gstreamer" == "x0.10" -o "x$with_gstreamer" == "x1.0"; then
- AC_SUBST(GSTREAMER_VER, [$with_gstreamer])
- AC_SUBST(GSTREAMER_VER, "")
+if test x"$enable_gst" != "xno"; then + PKG_CHECK_MODULES(GSTREAMER, [gstreamer-1.0], [ + AC_DEFINE(USE_GSTREAMER, 1, [Use GStreamer for playing sounds]) + AC_SUBST(GSTREAMER_CFLAGS) + AC_SUBST(GSTREAMER_LIBS) + if test "x$force_deps" = "xyes" ; then + GStreamer development headers not found. + Use --disable-gstreamer if you do not need GStreamer (sound) support. dnl #######################################################################
dnl # Check for GStreamer Video
dnl #######################################################################
-if test "x$enable_gst" != "xno" -a "x$with_gstreamer" == "x1.0"; then
+if test "x$enable_gst" != "xno"; then AC_ARG_ENABLE(gstreamer-video,
[AS_HELP_STRING([--disable-gstreamer-video], [compile without GStreamer 1.0 Video Overlay support])],
enable_gstvideo="$enableval", enable_gstvideo="yes")
@@ -1115,47 +1050,18 @@
dnl #######################################################################
-dnl # Check for GStreamer Interfaces
-dnl #######################################################################
-if test "x$enable_gst" != "xno" -a "x$with_gstreamer" == "x0.10"; then
- AC_ARG_ENABLE(gstreamer-interfaces,
- [AS_HELP_STRING([--disable-gstreamer-interfaces], [compile without GStreamer 0.10 interface support])],
- enable_gstinterfaces="$enableval", enable_gstinterfaces="yes")
- if test "x$enable_gstinterfaces" != "xno"; then
- PKG_CHECK_MODULES(GSTINTERFACES, [gstreamer-interfaces-0.10], [
- AC_DEFINE(USE_GSTINTERFACES, 1, [Use GStreamer 0.10 interfaces for X overlay support])
- AC_SUBST(GSTINTERFACES_CFLAGS)
- AC_SUBST(GSTINTERFACES_LIBS)
- enable_gstinterfaces="no"
- enable_gstinterfaces="no"
-dnl #######################################################################
dnl # Check for Farstream
dnl #######################################################################
[AS_HELP_STRING([--disable-farstream], [compile without farstream support])],
enable_farstream="$enableval", enable_farstream="yes")
if test "x$enable_farstream" != "xno"; then
- if test "x$with_gstreamer" == "x1.0"; then
- PKG_CHECK_MODULES(FARSTREAM, [farstream-0.2 >= 0.2.7], [
- AC_SUBST(FARSTREAM_CFLAGS)
- AC_SUBST(FARSTREAM_LIBS)
- PKG_CHECK_MODULES(FARSTREAM, [farstream-0.1], [
- AC_SUBST(FARSTREAM_CFLAGS)
- AC_SUBST(FARSTREAM_LIBS)
+ PKG_CHECK_MODULES(FARSTREAM, [farstream-0.2 >= 0.2.7], [ + AC_SUBST(FARSTREAM_CFLAGS) + AC_SUBST(FARSTREAM_LIBS) dnl #######################################################################
@@ -1165,9 +1071,7 @@
[AS_HELP_STRING([--disable-vv], [compile without voice and video support])],
enable_vv="$enableval", enable_vv="yes")
if test "x$enable_vv" != "xno"; then
- if test "x$enable_gst" != "xno" -a "x$with_gstreamer" == "x1.0" -a "x$enable_gstvideo" != "xno" -a "x$enable_farstream" != "xno"; then
- AC_DEFINE(USE_VV, 1, [Use voice and video])
- elif test "x$enable_gst" != "xno" -a "x$with_gstreamer" == "x0.10" -a "x$enable_gstinterfaces" != "xno" -a "x$enable_farstream" != "xno"; then
+ if test "x$enable_gst" != "xno" -a "x$enable_gstvideo" != "xno" -a "x$enable_farstream" != "xno"; then AC_DEFINE(USE_VV, 1, [Use voice and video])
@@ -1185,7 +1089,7 @@
dnl #######################################################################
dnl # Check for Raw data streams support in Farstream
dnl #######################################################################
-if test "x$enable_vv" != "xno" -a "x$with_gstreamer" == "x1.0"; then
+if test "x$enable_vv" != "xno"; then PKG_CHECK_MODULES(GSTAPP, [gstreamer-app-1.0], [
AC_DEFINE(USE_GSTAPP, 1, [Use GStreamer Video Overlay support])
--- a/libpurple/media/backend-fs2.c Mon Dec 14 23:48:24 2015 -0800
+++ b/libpurple/media/backend-fs2.c Wed Dec 16 00:35:23 2015 -0800
@@ -76,7 +76,6 @@
static GList *purple_media_backend_fs2_get_local_candidates(
PurpleMediaBackend *self,
const gchar *sess_id, const gchar *participant);
-#if GST_CHECK_VERSION(1,0,0)
static gboolean purple_media_backend_fs2_set_encryption_parameters (
PurpleMediaBackend *self, const gchar *sess_id, const gchar *cipher,
const gchar *auth, const gchar *key, gsize key_len);
@@ -84,7 +83,6 @@
PurpleMediaBackend *self, const gchar *sess_id,
const gchar *participant, const gchar *cipher,
const gchar *auth, const gchar *key, gsize key_len);
static gboolean purple_media_backend_fs2_set_remote_codecs(
PurpleMediaBackend *self,
const gchar *sess_id, const gchar *participant,
@@ -230,14 +228,12 @@
case PURPLE_MEDIA_NETWORK_PROTOCOL_UDP:
return FS_NETWORK_PROTOCOL_UDP;
-#if GST_CHECK_VERSION(1,0,0)
case PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_PASSIVE:
return FS_NETWORK_PROTOCOL_TCP_PASSIVE;
case PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_ACTIVE:
return FS_NETWORK_PROTOCOL_TCP_ACTIVE;
case PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_SO:
return FS_NETWORK_PROTOCOL_TCP_SO;
g_return_val_if_reached(FS_NETWORK_PROTOCOL_TCP);
@@ -249,30 +245,21 @@
case FS_NETWORK_PROTOCOL_UDP:
return PURPLE_MEDIA_NETWORK_PROTOCOL_UDP;
-#if GST_CHECK_VERSION(1,0,0)
case FS_NETWORK_PROTOCOL_TCP_PASSIVE:
return PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_PASSIVE;
case FS_NETWORK_PROTOCOL_TCP_ACTIVE:
return PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_ACTIVE;
case FS_NETWORK_PROTOCOL_TCP_SO:
return PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_SO;
g_return_val_if_reached(PURPLE_MEDIA_NETWORK_PROTOCOL_TCP_PASSIVE);
-#if GST_CHECK_VERSION(1,0,0)
event_probe_cb(GstPad *srcpad, GstPadProbeInfo *info, gpointer unused)
-event_probe_cb(GstPad *srcpad, GstEvent *event, gboolean release_pad)
-#if GST_CHECK_VERSION(1,0,0)
GstEvent *event = GST_PAD_PROBE_INFO_EVENT(info);
if (GST_EVENT_TYPE(event) == GST_EVENT_CUSTOM_DOWNSTREAM
&& gst_event_has_name(event, "purple-unlink-tee")) {
@@ -280,40 +267,23 @@
gst_pad_unlink(srcpad, gst_pad_get_peer(srcpad));
-#if GST_CHECK_VERSION(1,0,0)
gst_pad_remove_probe(srcpad,
g_value_get_ulong(gst_structure_get_value(s, "handler-id")));
- gst_pad_remove_event_probe(srcpad,
- 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;
-#if GST_CHECK_VERSION(1,0,0)
unlink_teepad_dynamic(GstPad *srcpad, gboolean release_pad)
-#if GST_CHECK_VERSION(1,0,0)
gulong id = gst_pad_add_probe(srcpad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
event_probe_cb, NULL, NULL);
- guint id = gst_pad_add_event_probe(srcpad, G_CALLBACK(event_probe_cb), NULL);
if (GST_IS_GHOST_PAD(srcpad))
srcpad = gst_ghost_pad_get_target(GST_GHOST_PAD(srcpad));
@@ -322,11 +292,7 @@
gst_event_new_custom(GST_EVENT_CUSTOM_DOWNSTREAM,
gst_structure_new("purple-unlink-tee",
"release-pad", G_TYPE_BOOLEAN, release_pad,
-#if GST_CHECK_VERSION(1,0,0)
"handler-id", G_TYPE_ULONG, id,
- "handler-id", G_TYPE_UINT, id,
@@ -548,12 +514,10 @@
purple_media_backend_fs2_get_local_candidates;
iface->set_remote_codecs = purple_media_backend_fs2_set_remote_codecs;
iface->set_send_codec = purple_media_backend_fs2_set_send_codec;
-#if GST_CHECK_VERSION(1,0,0)
iface->set_encryption_parameters =
purple_media_backend_fs2_set_encryption_parameters;
iface->set_decryption_parameters =
purple_media_backend_fs2_set_decryption_parameters;
iface->set_params = purple_media_backend_fs2_set_params;
iface->get_available_params = purple_media_backend_fs2_get_available_params;
iface->send_dtmf = purple_media_backend_fs2_send_dtmf;
@@ -934,13 +898,9 @@
list = gst_structure_get_value(gst_message_get_structure(msg), value_name);
-#if GST_CHECK_VERSION(1,0,0)
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
value = g_value_array_get_nth(g_value_get_boxed(list), 0);
G_GNUC_END_IGNORE_DEPRECATIONS
- value = gst_value_list_get_value(list, 0);
value_db = g_value_get_double(value);
percent = pow(10, value_db / 20);
return (percent > 1.0) ? 1.0 : percent;
@@ -1670,11 +1630,7 @@
srcpad = gst_element_get_static_pad(session->srcvalve, "src");
g_object_set(volume, "volume", input_volume, NULL);
-#if GST_CHECK_VERSION(1,0,0)
srcpad = gst_element_get_request_pad(session->tee, "src_%u");
- srcpad = gst_element_get_request_pad(session->tee, "src%d");
purple_debug_info("backend-fs2", "connecting pad: %s\n",
@@ -1926,11 +1882,7 @@
gst_element_link(stream->queue, stream->volume);
} else if (codec->media_type == FS_MEDIA_TYPE_VIDEO) {
-#if GST_CHECK_VERSION(1,0,0)
stream->src = gst_element_factory_make("funnel", NULL);
- stream->src = gst_element_factory_make("fsfunnel", NULL);
sink = gst_element_factory_make("fakesink", NULL);
g_object_set(G_OBJECT(sink), "async", FALSE, NULL);
gst_bin_add(GST_BIN(priv->confbin), sink);
@@ -1938,11 +1890,7 @@
#ifdef HAVE_MEDIA_APPLICATION
} else if (codec->media_type == FS_MEDIA_TYPE_APPLICATION) {
-#if GST_CHECK_VERSION(1,0,0)
stream->src = gst_element_factory_make("funnel", NULL);
- stream->src = gst_element_factory_make("fsfunnel", NULL);
sink = purple_media_manager_get_element(
purple_media_get_manager(priv->media),
PURPLE_MEDIA_RECV_APPLICATION, priv->media,
@@ -1960,11 +1908,7 @@
gst_element_link_many(stream->src, stream->tee, sink, NULL);
-#if GST_CHECK_VERSION(1,0,0)
sinkpad = gst_element_get_request_pad(stream->src, "sink_%u");
- sinkpad = gst_element_get_request_pad(stream->src, "sink%d");
gst_pad_link(srcpad, sinkpad);
gst_object_unref(sinkpad);
@@ -2405,7 +2349,6 @@
-#if GST_CHECK_VERSION(1,0,0)
create_fs2_srtp_structure(const gchar *cipher, const gchar *auth,
const gchar *key, gsize key_len)
@@ -2494,7 +2437,6 @@
gst_structure_free(srtp);
purple_media_backend_fs2_set_send_codec(PurpleMediaBackend *self,
--- a/libpurple/mediamanager.c Mon Dec 14 23:48:24 2015 -0800
+++ b/libpurple/mediamanager.c Wed Dec 16 00:35:23 2015 -0800
@@ -35,11 +35,7 @@
#include <media/backend-fs2.h>
#include <farstream/fs-element-added-notifier.h>
-#if GST_CHECK_VERSION(1,0,0)
#include <gst/video/videooverlay.h>
-#include <gst/interfaces/xoverlay.h>
#ifdef HAVE_MEDIA_APPLICATION
@@ -312,11 +308,7 @@
gst_bus_add_signal_watch(GST_BUS(bus));
g_signal_connect(G_OBJECT(bus), "message",
G_CALLBACK(pipeline_bus_call), manager);
-#if GST_CHECK_VERSION(1,0,0)
gst_bus_set_sync_handler(bus, gst_bus_sync_signal_handler, NULL, NULL);
- gst_bus_set_sync_handler(bus, gst_bus_sync_signal_handler, NULL);
filename = g_build_filename(purple_user_dir(),
@@ -626,9 +618,7 @@
GstElement *parent = GST_ELEMENT_PARENT(pad);
-#if GST_CHECK_VERSION(1,0,0)
GValue tmp = G_VALUE_INIT;
GstIteratorResult result;
@@ -636,21 +626,15 @@
iter = gst_element_iterate_src_pads(parent);
-#if GST_CHECK_VERSION(1,0,0)
result = gst_iterator_next(iter, &tmp);
- result = gst_iterator_next(iter, (gpointer)&remaining_pad);
if (result == GST_ITERATOR_DONE) {
gst_element_set_locked_state(parent, TRUE);
gst_element_set_state(parent, GST_STATE_NULL);
gst_bin_remove(GST_BIN(GST_ELEMENT_PARENT(parent)), parent);
} else if (result == GST_ITERATOR_OK) {
-#if GST_CHECK_VERSION(1,0,0)
remaining_pad = g_value_get_object(&tmp);
gst_object_unref(remaining_pad);
@@ -702,11 +686,7 @@
if (manager->priv->video_caps == NULL)
-#if GST_CHECK_VERSION(1,0,0)
manager->priv->video_caps = gst_caps_from_string("video/x-raw,"
- manager->priv->video_caps = gst_caps_from_string("video/x-raw-yuv,"
"width=[250,352], height=[200,288], framerate=[1/1,20/1]");
return manager->priv->video_caps;
@@ -1159,11 +1139,7 @@
tee = gst_bin_get_by_name(GST_BIN(ret), "tee");
-#if GST_CHECK_VERSION(1,0,0)
pad = gst_element_get_request_pad(tee, "src_%u");
- pad = gst_element_get_request_pad(tee, "src%d");
ghost = gst_ghost_pad_new(NULL, pad);
@@ -1369,11 +1345,7 @@
if (GST_MESSAGE_TYPE(msg) != GST_MESSAGE_ELEMENT
-#if GST_CHECK_VERSION(1,0,0)
|| !gst_is_video_overlay_prepare_window_handle_message(msg))
- || !gst_structure_has_name(msg->structure, "prepare-xwindow-id"))
sink = GST_ELEMENT(GST_MESSAGE_SRC(msg));
@@ -1387,16 +1359,8 @@
| G_SIGNAL_MATCH_DATA, 0, 0, NULL,
-#if GST_CHECK_VERSION(1,0,0)
gst_video_overlay_set_window_handle(GST_VIDEO_OVERLAY(GST_MESSAGE_SRC(msg)),
-#elif GST_CHECK_VERSION(0,10,31)
- gst_x_overlay_set_window_handle(GST_X_OVERLAY(GST_MESSAGE_SRC(msg)),
- gst_x_overlay_set_xwindow_id(GST_X_OVERLAY(GST_MESSAGE_SRC(msg)),
@@ -1429,11 +1393,7 @@
queue = gst_element_factory_make("queue", NULL);
-#if GST_CHECK_VERSION(1,0,0)
convert = gst_element_factory_make("videoconvert", NULL);
- convert = gst_element_factory_make("ffmpegcolorspace", NULL);
ow->sink = purple_media_manager_get_element(
manager, PURPLE_MEDIA_RECV_VIDEO,
ow->media, ow->session_id,