/soc/2015/mmcc/main: 277cbe183101: remove useless '#if HAVE_FARS...
Michael McConville <[email protected]>
| Newsgroups | gmane.comp.gnome.gaim.cvs |
|---|---|
| Message-ID | <[email protected]> |
Changeset: 277cbe183101a1df9754e2543d834f22505bd25d Author: Michael McConville <[email protected]> Date: 2015-06-19 12:54 -0400 Branch: default URL: https://hg.pidgin.im/soc/2015/mmcc/main/rev/277cbe183101 Description: remove useless '#if HAVE_FARSIGHT' preproc conditions' diffstat: libpurple/media/backend-fs2.c | 161 ------------------------------------------ libpurple/mediamanager.c | 4 - 2 files changed, 0 insertions(+), 165 deletions(-) diffs (truncated from 467 to 300 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 @@ -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; @@ -129,9 +124,7 @@ struct _PurpleMediaBackendFs2Stream gchar *participant; FsStream *stream; -#ifndef HAVE_FARSIGHT gboolean supports_add; -#endif GstElement *src; GstElement *tee; @@ -168,9 +161,7 @@ struct _PurpleMediaBackendFs2Private FsConference *conference; gchar *conference_type; -#ifndef HAVE_FARSIGHT FsElementAddedNotifier *notifier; -#endif GHashTable *sessions; GHashTable *participants; @@ -312,15 +303,10 @@ purple_media_backend_fs2_dispose(GObject purple_debug_info("backend-fs2", "purple_media_backend_fs2_dispose\n"); -/* XXX: This condition should probably go. - * If we're compiling V/V, we should have Farstream. - */ -#ifndef HAVE_FARSIGHT if (priv->notifier) { g_object_unref(priv->notifier); priv->notifier = NULL; } -#endif if (priv->confbin) { GstElement *pipeline; @@ -998,11 +984,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", @@ -1012,11 +994,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; @@ -1043,34 +1021,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; @@ -1078,21 +1031,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; @@ -1127,11 +1071,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; @@ -1149,11 +1089,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; @@ -1185,11 +1121,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; @@ -1199,18 +1131,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; @@ -1246,19 +1170,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; @@ -1268,20 +1184,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; @@ -1458,17 +1366,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; @@ -1548,9 +1451,7 @@ init_conference(PurpleMediaBackendFs2 *s GstElement *pipeline; GstBus *bus; gchar *name; -#ifndef HAVE_FARSIGHT GKeyFile *default_props; -#endif priv->conference = FS_CONFERENCE( gst_element_factory_make(priv->conference_type, NULL)); @@ -1593,7 +1494,6 @@ init_conference(PurpleMediaBackendFs2 *s return FALSE; } -#ifndef HAVE_FARSIGHT default_props = fs_utils_get_default_element_properties(GST_ELEMENT(priv->conference)); if (default_props != NULL) { priv->notifier = fs_element_added_notifier_new(); @@ -1601,7 +1501,6 @@ init_conference(PurpleMediaBackendFs2 *s GST_BIN(priv->confbin)); fs_element_added_notifier_set_properties_from_keyfile(priv->notifier, default_props); } -#endif g_signal_connect(G_OBJECT(bus), "message", G_CALLBACK(gst_bus_cb), self); @@ -1890,11 +1789,7 @@ create_participant(PurpleMediaBackendFs2 GError *err = NULL; participant = fs_conference_new_participant( -#ifdef HAVE_FARSIGHT - priv->conference, name, &err); -#else priv->conference, &err); -#endif if (err) { purple_debug_error("backend-fs2", @@ -1904,12 +1799,10 @@ create_participant(PurpleMediaBackendFs2 return FALSE; } -#ifndef HAVE_FARSIGHT if (g_object_class_find_property(G_OBJECT_GET_CLASS(participant), "cname")) { g_object_set(participant, "cname", name, NULL); } -#endif if (!priv->participants) { _______________________________________________ Commits mailing list [email protected] https://pidgin.im/cgi-bin/mailman/listinfo/commits