changeset 26043:e5f9cf20c4aa

merge of '6f874569bd42744b784b694f8a44c06ec7d7f468' and 'befd3ff0e7dd20f612c653ad773327de142fa5e9'
author Marcus Lundblad <ml@update.uu.se>
date Sat, 10 Jan 2009 01:32:34 +0000
parents 46434dc43a63 (current diff) ade5b2c51047 (diff)
children b04508e5cc6c
files libpurple/media.c
diffstat 4 files changed, 13 insertions(+), 52 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/media.c	Sat Jan 10 01:27:49 2009 +0000
+++ b/libpurple/media.c	Sat Jan 10 01:32:34 2009 +0000
@@ -413,7 +413,7 @@
 
 }
 
-FsMediaType
+static FsMediaType
 purple_media_to_fs_media_type(PurpleMediaSessionType type)
 {
 	if (type & PURPLE_MEDIA_AUDIO)
@@ -424,7 +424,7 @@
 		return 0;
 }
 
-FsStreamDirection
+static FsStreamDirection
 purple_media_to_fs_stream_direction(PurpleMediaSessionType type)
 {
 	if ((type & PURPLE_MEDIA_AUDIO) == PURPLE_MEDIA_AUDIO ||
@@ -440,7 +440,7 @@
 		return FS_DIRECTION_NONE;
 }
 
-PurpleMediaSessionType
+static PurpleMediaSessionType
 purple_media_from_fs(FsMediaType type, FsStreamDirection direction)
 {
 	PurpleMediaSessionType result = PURPLE_MEDIA_NONE;
--- a/libpurple/media.h	Sat Jan 10 01:27:49 2009 +0000
+++ b/libpurple/media.h	Sat Jan 10 01:32:34 2009 +0000
@@ -109,41 +109,6 @@
  */
 GType purple_media_state_changed_get_type(void);
 
-/**************************************************************************/
-/** @name Media Utility Functions                                         */
-/**************************************************************************/
-/*@{*/
-
-/**
- * Converts a PurpleMediaSessionType to an FsMediaType.
- *
- * @param type The type to derive FsMediaType from
- *
- * @return The FsMediaType derived from type
- */
-FsMediaType purple_media_to_fs_media_type(PurpleMediaSessionType type);
-
-/**
- * Converts a PurpleMediaSessionType to an FsStreamDirection.
- *
- * @param type The type to derive FsMediaType from
- *
- * @return The FsMediaDirection derived from type
- */
-FsStreamDirection purple_media_to_fs_stream_direction(PurpleMediaSessionType type);
-
-/**
- * Converts an FsMediaType and FsStreamDirection into a PurpleMediaSessionType.
- *
- * @param type The type used to construct PurpleMediaSessionType
- * @param direction The direction used to construct PurpleMediaSessionType
- *
- * @return The PurpleMediaSessionType constructed
- */
-PurpleMediaSessionType purple_media_from_fs(FsMediaType type, FsStreamDirection direction);
-
-/*@}*/
-
 /**
  * Combines all the separate session types into a single PurpleMediaSessionType.
  *
--- a/libpurple/protocols/jabber/google.c	Sat Jan 10 01:27:49 2009 +0000
+++ b/libpurple/protocols/jabber/google.c	Sat Jan 10 01:32:34 2009 +0000
@@ -31,7 +31,6 @@
 #include "iq.h"
 
 #ifdef USE_VV
-#include <gst/farsight/fs-conference-iface.h>
 
 typedef struct {
 	char *id;
@@ -124,7 +123,6 @@
 
 	fs_codec_list_destroy(codecs);
 	jabber_iq_send(iq);
-	gst_element_set_state(purple_media_get_pipeline(session->media), GST_STATE_PLAYING);
 }
 
 static void
--- a/libpurple/protocols/jabber/jingle/rtp.c	Sat Jan 10 01:27:49 2009 +0000
+++ b/libpurple/protocols/jabber/jingle/rtp.c	Sat Jan 10 01:32:34 2009 +0000
@@ -372,8 +372,8 @@
 	gchar *senders;
 	gchar *name;
 	const gchar *transmitter;
-	FsMediaType type;
-	FsStreamDirection direction;
+	gboolean is_audio;
+	PurpleMediaSessionType type;
 	JingleTransport *transport;
 
 	/* maybe this create ought to just be in initiate and handle initiate */
@@ -396,23 +396,21 @@
 	else
 		transmitter = "notransmitter";
 
-	if (!strcmp(media_type, "audio"))
-		type = FS_MEDIA_TYPE_AUDIO;
-	else
-		type = FS_MEDIA_TYPE_VIDEO;
+	is_audio = !strcmp(media_type, "audio");
 
 	if (!strcmp(senders, "both"))
-		direction = FS_DIRECTION_BOTH;
+		type = is_audio == TRUE ? PURPLE_MEDIA_AUDIO
+				: PURPLE_MEDIA_VIDEO;
 	else if (!strcmp(senders, "initiator")
 			&& jingle_session_is_initiator(session))
-		direction = FS_DIRECTION_SEND;
+		type = is_audio == TRUE ? PURPLE_MEDIA_SEND_AUDIO
+				: PURPLE_MEDIA_SEND_VIDEO;
 	else
-		direction = FS_DIRECTION_RECV;
+		type = is_audio == TRUE ? PURPLE_MEDIA_RECV_AUDIO
+				: PURPLE_MEDIA_RECV_VIDEO;
 
 	purple_media_add_stream(media, name, remote_jid,
-			purple_media_from_fs(type, direction),
-			transmitter, 0, NULL);
-
+			type, transmitter, 0, NULL);
 
 	g_free(name);
 	g_free(media_type);