/pidgin/main: 6da7cadb323f: Remove Farsight support (ok'd by elb)

Michael McConville mmcconville at mykolab.com
Wed Jul 29 17:16:16 EDT 2015


Changeset: 6da7cadb323fdf3dff3b6db34dbf53a61045be1a
Author:	 Michael McConville <mmcconville at mykolab.com>
Date:	 2015-07-29 17:15 -0400
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/6da7cadb323f

Description:

Remove Farsight support (ok'd by elb)

diffstat:

 configure.ac                  |    9 +--
 libpurple/media.h             |    6 +-
 libpurple/media/backend-fs2.c |  163 +----------------------------------------
 libpurple/media/backend-fs2.h |    8 +-
 libpurple/mediamanager.c      |    4 -
 libpurple/mediamanager.h      |    4 +-
 6 files changed, 14 insertions(+), 180 deletions(-)

diffs (truncated from 569 to 300 lines):

diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -1153,14 +1153,7 @@ if test "x$enable_farstream" != "xno"; t
 			AC_SUBST(FARSTREAM_CFLAGS)
 			AC_SUBST(FARSTREAM_LIBS)
 		], [
-			# Try farsight.
-			PKG_CHECK_MODULES(FARSTREAM, [farsight2-0.10 >= 0.0.9], [
-			        AC_DEFINE(HAVE_FARSIGHT, 1, [Use Farsight instead of Farstream])
-				AC_SUBST(FARSTREAM_CFLAGS)
-				AC_SUBST(FARSTREAM_LIBS)
-			], [
-			        enable_farstream="no"
-			])
+				enable_farstream="no"
 		])
 	fi
 fi
diff --git a/libpurple/media.h b/libpurple/media.h
--- a/libpurple/media.h
+++ b/libpurple/media.h
@@ -219,8 +219,8 @@ gboolean purple_media_param_is_supported
  * @type: The type of stream to create.
  * @initiator: Whether or not the local user initiated the stream.
  * @transmitter: The transmitter to use for the stream.
- * @num_params: The number of parameters to pass to Farsight.
- * @params: The parameters to pass to Farsight.
+ * @num_params: The number of parameters to pass to Farstream.
+ * @params: The parameters to pass to Farstream.
  *
  * Adds a stream to a session.
  *
@@ -507,4 +507,4 @@ gboolean purple_media_send_dtmf(PurpleMe
 
 G_END_DECLS
 
-#endif  /* _PURPLE_MEDIA_H_ */
\ No newline at end of file
+#endif  /* _PURPLE_MEDIA_H_ */
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
@@ -30,15 +30,10 @@
 #include "network.h"
 #include "media-gst.h"
 
-#ifdef HAVE_FARSIGHT
-#include <gst/farsight/fs-conference-iface.h>
-#include <gst/farsight/fs-element-added-notifier.h>
-#else
 #include <farstream/fs-conference.h>
 #include <farstream/fs-element-added-notifier.h>
 #include <farstream/fs-utils.h>
 #include <gst/gststructure.h>
-#endif
 
 /** @copydoc _PurpleMediaBackendFs2Class */
 typedef struct _PurpleMediaBackendFs2Class PurpleMediaBackendFs2Class;
@@ -131,9 +126,7 @@ struct _PurpleMediaBackendFs2Stream
 	gchar *participant;
 	FsStream *stream;
 
-#ifndef HAVE_FARSIGHT
 	gboolean supports_add;
-#endif
 
 	GstElement *src;
 	GstElement *tee;
@@ -170,9 +163,7 @@ struct _PurpleMediaBackendFs2Private
 	FsConference *conference;
 	gchar *conference_type;
 
-#ifndef HAVE_FARSIGHT
 	FsElementAddedNotifier *notifier;
-#endif
 
 	GHashTable *sessions;
 	GHashTable *participants;
@@ -348,12 +339,10 @@ purple_media_backend_fs2_dispose(GObject
 
 	purple_debug_info("backend-fs2", "purple_media_backend_fs2_dispose\n");
 
-#ifndef HAVE_FARSIGHT
 	if (priv->notifier) {
 		g_object_unref(priv->notifier);
 		priv->notifier = NULL;
 	}
-#endif
 
 	if (priv->confbin) {
 		GstElement *pipeline;
@@ -964,7 +953,7 @@ purple_media_error_fs(PurpleMedia *media
 	const gchar *error_msg = gst_structure_get_string(fs_error, "error-msg");
 
 	purple_media_error(media, "%s%s%s", error,
-	                   error_msg ? _("\n\nMessage from Farsight: ") : "",
+	                   error_msg ? _("\n\nMessage from Farstream: ") : "",
 	                   error_msg ? error_msg : "");
 }
 
@@ -1035,11 +1024,7 @@ gst_handle_message_element(GstBus *bus, 
 			priv->conference != FS_CONFERENCE(src))
 		return;
 
-#ifdef HAVE_FARSIGHT
-	if (gst_structure_has_name(structure, "farsight-error")) {
-#else
 	if (gst_structure_has_name(structure, "farstream-error")) {
-#endif
 		FsError error_no;
 		gboolean error_emitted = FALSE;
 		gst_structure_get_enum(structure, "error-no",
@@ -1049,11 +1034,7 @@ gst_handle_message_element(GstBus *bus, 
 				purple_media_error_fs(priv->media,
 				                      _("Error initializing the call. "
 				                        "This probably denotes problem in "
-#ifdef HAVE_FARSIGHT
-				                        "installation of GStreamer or Farsight."),
-#else
 				                        "installation of GStreamer or Farstream."),
-#endif
 				                      structure);
 				error_emitted = TRUE;
 				break;
@@ -1080,34 +1061,9 @@ gst_handle_message_element(GstBus *bus, 
 				error_emitted = TRUE;
 				purple_media_end(priv->media, NULL, NULL);
 				break;
-#ifdef HAVE_FARSIGHT
-			case FS_ERROR_NO_CODECS_LEFT:
-				purple_media_error(priv->media,
-				                   _("No codecs left. Your codec preferences "
-				                     "in fs-codecs.conf are too strict."));
-				error_emitted = TRUE;
-				purple_media_end(priv->media, NULL, NULL);
-				break;
-			case FS_ERROR_CONNECTION_FAILED:
-				purple_media_error(priv->media,
-				                   _("Could not connect to the remote party"));
-				error_emitted = TRUE;
-				break;
-			case FS_ERROR_UNKNOWN_CNAME:
-				/*
-				 * Unknown CName is only a problem for the
-				 * multicast transmitter which isn't used.
-				 * It is also deprecated.
-				 */
-				break;
-#endif
 			default:
 				purple_debug_error("backend-fs2",
-#ifdef HAVE_FARSIGHT
-						"farsight-error: %i: %s\n",
-#else
 						"farstream-error: %i: %s\n",
-#endif
 						error_no,
 						gst_structure_get_string(structure, "error-msg"));
 				break;
@@ -1115,21 +1071,12 @@ gst_handle_message_element(GstBus *bus, 
 
 		if (FS_ERROR_IS_FATAL(error_no)) {
 			if (!error_emitted)
-#ifdef HAVE_FARSIGHT
-			purple_media_error(priv->media,
-			                   _("A non-recoverable Farsight2 error has occurred."));
-#else
 			purple_media_error(priv->media,
 			                   _("A non-recoverable Farstream error has occurred."));
-#endif
 			purple_media_end(priv->media, NULL, NULL);
 		}
 	} else if (gst_structure_has_name(structure,
-#ifdef HAVE_FARSIGHT
-			"farsight-new-local-candidate")) {
-#else
 			"farstream-new-local-candidate")) {
-#endif
 		const GValue *value;
 		FsStream *stream;
 		FsCandidate *local_candidate;
@@ -1164,11 +1111,7 @@ gst_handle_message_element(GstBus *bus, 
 				session->id, name, candidate);
 		g_object_unref(candidate);
 	} else if (gst_structure_has_name(structure,
-#ifdef HAVE_FARSIGHT
-			"farsight-local-candidates-prepared")) {
-#else
 			"farstream-local-candidates-prepared")) {
-#endif
 		const GValue *value;
 		FsStream *stream;
 		FsParticipant *participant;
@@ -1186,11 +1129,7 @@ gst_handle_message_element(GstBus *bus, 
 		g_signal_emit_by_name(self, "candidates-prepared",
 				session->id, name);
 	} else if (gst_structure_has_name(structure,
-#ifdef HAVE_FARSIGHT
-			"farsight-new-active-candidate-pair")) {
-#else
 			"farstream-new-active-candidate-pair")) {
-#endif
 		const GValue *value;
 		FsStream *stream;
 		FsCandidate *local_candidate;
@@ -1222,11 +1161,7 @@ gst_handle_message_element(GstBus *bus, 
 		g_object_unref(lcandidate);
 		g_object_unref(rcandidate);
 	} else if (gst_structure_has_name(structure,
-#ifdef HAVE_FARSIGHT
-			"farsight-recv-codecs-changed")) {
-#else
 			"farstream-recv-codecs-changed")) {
-#endif
 		const GValue *value;
 		GList *codecs;
 		FsCodec *codec;
@@ -1236,18 +1171,10 @@ gst_handle_message_element(GstBus *bus, 
 		codec = codecs->data;
 
 		purple_debug_info("backend-fs2",
-#ifdef HAVE_FARSIGHT
-				"farsight-recv-codecs-changed: %s\n",
-#else
 				"farstream-recv-codecs-changed: %s\n",
-#endif
 				codec->encoding_name);
 	} else if (gst_structure_has_name(structure,
-#ifdef HAVE_FARSIGHT
-			"farsight-component-state-changed")) {
-#else
 			"farstream-component-state-changed")) {
-#endif
 		const GValue *value;
 		FsStreamState fsstate;
 		guint component;
@@ -1283,19 +1210,11 @@ gst_handle_message_element(GstBus *bus, 
 		}
 
 		purple_debug_info("backend-fs2",
-#ifdef HAVE_FARSIGHT
-				"farsight-component-state-changed: "
-#else
 				"farstream-component-state-changed: "
-#endif
 				"component: %u state: %s\n",
 				component, state);
 	} else if (gst_structure_has_name(structure,
-#ifdef HAVE_FARSIGHT
-			"farsight-send-codec-changed")) {
-#else
 			"farstream-send-codec-changed")) {
-#endif
 		const GValue *value;
 		FsCodec *codec;
 		gchar *codec_str;
@@ -1305,20 +1224,12 @@ gst_handle_message_element(GstBus *bus, 
 		codec_str = fs_codec_to_string(codec);
 
 		purple_debug_info("backend-fs2",
-#ifdef HAVE_FARSIGHT
-				"farsight-send-codec-changed: codec: %s\n",
-#else
 				"farstream-send-codec-changed: codec: %s\n",
-#endif
 				codec_str);
 
 		g_free(codec_str);
 	} else if (gst_structure_has_name(structure,
-#ifdef HAVE_FARSIGHT
-			"farsight-codecs-changed")) {
-#else
 			"farstream-codecs-changed")) {
-#endif
 		const GValue *value;
 		FsSession *fssession;
 		GList *sessions;
@@ -1495,17 +1406,12 @@ stream_info_cb(PurpleMedia *media, Purpl
 				purple_media_is_initiator(media, sid, name))
 			return;
 
-#ifdef HAVE_FARSIGHT
-		fs_stream_set_remote_candidates(stream->stream,
-				stream->remote_candidates, &err);
-#else
 		if (stream->supports_add)
 			fs_stream_add_remote_candidates(stream->stream,
 					stream->remote_candidates, &err);
 		else
 			fs_stream_force_remote_candidates(stream->stream,
 					stream->remote_candidates, &err);
-#endif
 
 		if (err == NULL)
 			return;
@@ -1585,9 +1491,7 @@ init_conference(PurpleMediaBackendFs2 *s
 	GstElement *pipeline;
 	GstBus *bus;
 	gchar *name;



More information about the Commits mailing list