changeset 26363:88f413d12917

merge of '25cc5bdbbd9c509be202ab9847764b104f848577' and '7bc60f1fd2abbf238f52a98f1f26da74ca462705'
author Mike Ruprecht <maiku@soc.pidgin.im>
date Tue, 24 Mar 2009 06:09:35 +0000
parents e9b5d68887ff (diff) df353f24783d (current diff)
children e114ed3c8cfe
files
diffstat 2 files changed, 39 insertions(+), 25 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/media.c	Tue Mar 24 06:09:31 2009 +0000
+++ b/libpurple/media.c	Tue Mar 24 06:09:35 2009 +0000
@@ -1162,31 +1162,6 @@
 }
 #endif
 
-#if 0
-static void 
-purple_media_set_sink(PurpleMedia *media, const gchar *sess_id,
-		const gchar *participant, GstElement *sink)
-{
-	PurpleMediaStream *stream;
-
-	g_return_if_fail(PURPLE_IS_MEDIA(media));
-
-	stream = purple_media_get_stream(media, sess_id, participant);
-
-	if (stream == NULL) {
-		purple_debug_warning("media", "purple_media_set_sink: trying"
-				" to set sink on non-existent stream\n");
-		return;
-	}
-
-	if (stream->sink)
-		gst_object_unref(stream->sink);
-	stream->sink = sink;
-	gst_bin_add(GST_BIN(stream->session->media->priv->confbin),
-		    stream->sink);
-}
-#endif
-
 GstElement *
 purple_media_get_src(PurpleMedia *media, const gchar *sess_id)
 {
--- a/libpurple/mediamanager.h	Tue Mar 24 06:09:31 2009 +0000
+++ b/libpurple/mediamanager.h	Tue Mar 24 06:09:35 2009 +0000
@@ -132,16 +132,55 @@
 				  PurpleMedia *media);
 
 /**
+ * Signals that output windows should be created for the chosen stream.
+ *
  * This shouldn't be called outside of mediamanager.c and media.c
+ *
+ * @param manager Manager the output windows are registered with.
+ * @param media Media session the output windows are registered for.
+ * @param session_id The session the output windows are registered with.
+ * @param participant The participant the output windows are registered with.
+ *
+ * @return TRUE if it succeeded, FALSE if it failed.
  */
 gboolean purple_media_manager_create_output_window(
 		PurpleMediaManager *manager, PurpleMedia *media,
 		const gchar *session_id, const gchar *participant);
+
+/**
+ * Registers a video output window to be created for a given stream.
+ *
+ * @param manager The manager to register the output window with.
+ * @param media The media instance to find the stream in.
+ * @param session_id The session the stream is associated with.
+ * @param participant The participant the stream is associated with.
+ * @param window_id The window ID to embed the video in.
+ *
+ * @return A unique ID to the registered output window, 0 if it failed.
+ */
 gulong purple_media_manager_set_output_window(PurpleMediaManager *manager,
 		PurpleMedia *media, const gchar *session_id,
 		const gchar *participant, gulong window_id);
+
+/**
+ * Remove a previously registerd output window.
+ *
+ * @param manager The manager the output window was registered with.
+ * @param output_window_id The ID of the output window.
+ *
+ * @return TRUE if it found the output window and was successful, else FALSE.
+ */
 gboolean purple_media_manager_remove_output_window(
 		PurpleMediaManager *manager, gulong output_window_id);
+
+/**
+ * Remove all output windows for a given conference/session/participant/stream.
+ *
+ * @param manager The manager the output windows were registered with.
+ * @param media The media instance the output windows were registered for.
+ * @param session_id The session the output windows were registered for.
+ * @param participant The participant the output windows were registered for.
+ */
 void purple_media_manager_remove_output_windows(
 		PurpleMediaManager *manager, PurpleMedia *media,
 		const gchar *session_id, const gchar *participant);