# HG changeset patch # User Mike Ruprecht # Date 1237874975 0 # Node ID 88f413d129178e1a8a115e9e1f6de28c7b5eb623 # Parent e9b5d68887ff81639584f87c3d27b239b9cd7a73# Parent df353f24783d3e9673d8f20de6518cbb8c6b1962 merge of '25cc5bdbbd9c509be202ab9847764b104f848577' and '7bc60f1fd2abbf238f52a98f1f26da74ca462705' diff -r df353f24783d -r 88f413d12917 libpurple/media.c --- 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) { diff -r df353f24783d -r 88f413d12917 libpurple/mediamanager.h --- 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);