changeset 26421:b2e290e76998

Remove purple_media_get_sink and the sink variables in the media structures. The concept of a single sink per stream is no longer relevant.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Sun, 22 Mar 2009 21:52:20 +0000
parents 754be87047dc
children 5e605a489d53
files libpurple/media.c libpurple/media.h
diffstat 2 files changed, 0 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/media.c	Sun Mar 22 21:43:58 2009 +0000
+++ b/libpurple/media.c	Sun Mar 22 21:52:20 2009 +0000
@@ -56,7 +56,6 @@
 
 	PurpleMediaSessionType type;
 
-	GstElement *sink;
 	gulong window_id;
 };
 
@@ -65,7 +64,6 @@
 	PurpleMediaSession *session;
 	gchar *participant;
 	FsStream *stream;
-	GstElement *sink;
 	GstElement *src;
 	GstElement *tee;
 
@@ -1165,15 +1163,6 @@
 	return (session != NULL) ? session->src : NULL;
 }
 
-GstElement *
-purple_media_get_sink(PurpleMedia *media, const gchar *sess_id, const gchar *participant)
-{
-	PurpleMediaStream *stream;
-	g_return_val_if_fail(PURPLE_IS_MEDIA(media), NULL);
-	stream = purple_media_get_stream(media, sess_id, participant);
-	return (stream != NULL) ? stream->sink : NULL;
-}
-
 static PurpleMediaSession *
 purple_media_session_from_fs_stream(PurpleMedia *media, FsStream *stream)
 {
@@ -1752,7 +1741,6 @@
 					"liveadder", NULL);
 			sink = purple_media_manager_get_element(priv->manager,
 					PURPLE_MEDIA_RECV_AUDIO);
-			stream->sink = sink;
 		} else if (codec->media_type == FS_MEDIA_TYPE_VIDEO) {
 			stream->src = gst_element_factory_make(
 					"fsfunnel", NULL);
@@ -1773,13 +1761,6 @@
 	gst_pad_link(srcpad, sinkpad);
 	gst_object_unref(sinkpad);
 
-	if (codec->media_type == FS_MEDIA_TYPE_VIDEO &&
-			stream->sink != NULL) {
-		gst_bin_add(GST_BIN(priv->confbin), stream->sink);
-		gst_element_set_state(stream->sink, GST_STATE_PLAYING);
-		gst_element_link(stream->tee, stream->sink);
-	}
-
 	stream->connected_cb_id = purple_timeout_add(0,
 			(GSourceFunc)purple_media_connected_cb, stream);
 }
--- a/libpurple/media.h	Sun Mar 22 21:43:58 2009 +0000
+++ b/libpurple/media.h	Sun Mar 22 21:52:20 2009 +0000
@@ -352,17 +352,6 @@
 GstElement *purple_media_get_src(PurpleMedia *media, const gchar *sess_id);
 
 /**
- * Gets the sink from a stream
- *
- * @param media The media object the session is in.
- * @param sess_id The session id the stream belongs to.
- * @param participant The participant the stream is associated with.
- *
- * @return The sink retrieved.
- */
-GstElement *purple_media_get_sink(PurpleMedia *media, const gchar *sess_id, const gchar *participant);
-
-/**
  * Gets the pipeline from the media session.
  *
  * @param media The media session to retrieve the pipeline from.