# HG changeset patch # User maiku@pidgin.im # Date 1251605422 0 # Node ID 0fc9010081726b02f36c2a6c028fb3cf4d485c8f # Parent 916a4d2aa0b66abe65a487d7e3a3482655d03b1f# Parent 63cb8c4f3c66910fbfc42f08208d2534fab850dd merge of '5d14e84215d9f285f65ff268476a8c9a395e6f7f' and '6aaac4c2ade05169219a85683c8fceda40bf29ca' diff -r 63cb8c4f3c66 -r 0fc901008172 libpurple/media-gst.h --- a/libpurple/media-gst.h Sun Aug 30 04:00:51 2009 +0000 +++ b/libpurple/media-gst.h Sun Aug 30 04:10:22 2009 +0000 @@ -42,7 +42,7 @@ #define PURPLE_IS_MEDIA_ELEMENT_INFO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PURPLE_TYPE_MEDIA_ELEMENT_INFO)) #define PURPLE_MEDIA_ELEMENT_INFO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PURPLE_TYPE_MEDIA_ELEMENT_INFO, PurpleMediaElementInfo)) -/** @copydoc _PurpleMediaElementInfo */ +/** An opaque structure representing an audio/video source/sink. */ typedef struct _PurpleMediaElementInfo PurpleMediaElementInfo; typedef struct _PurpleMediaElementInfoClass PurpleMediaElementInfoClass; typedef GstElement *(*PurpleMediaElementCreateCallback)(PurpleMedia *media, @@ -138,6 +138,9 @@ * * @param manager The media manager to use to obtain the source/sink. * @param type The type of source/sink to get. + * @param media The media call this element is requested for. + * @param session_id The id of the session this element is requested for or NULL. + * @param participant The remote user this element is requested for or NULL. * * @since 2.6.0 */ diff -r 63cb8c4f3c66 -r 0fc901008172 libpurple/media.c --- a/libpurple/media.c Sun Aug 30 04:00:51 2009 +0000 +++ b/libpurple/media.c Sun Aug 30 04:10:22 2009 +0000 @@ -2278,6 +2278,18 @@ purple_media_to_fs_stream_direction( stream->session->type), NULL); stream->accepted = TRUE; + + if (stream->remote_candidates != NULL) { + GError *err = NULL; + fs_stream_set_remote_candidates(stream->stream, + stream->remote_candidates, &err); + + if (err) { + purple_debug_error("media", "Error adding remote" + " candidates: %s\n", err->message); + g_error_free(err); + } + } } } else if (local == TRUE && (type == PURPLE_MEDIA_INFO_MUTE || type == PURPLE_MEDIA_INFO_UNMUTE)) { @@ -2903,13 +2915,15 @@ stream->remote_candidates = g_list_concat(stream->remote_candidates, purple_media_candidate_list_to_fs(remote_candidates)); - fs_stream_set_remote_candidates(stream->stream, - stream->remote_candidates, &err); - - if (err) { - purple_debug_error("media", "Error adding remote" - " candidates: %s\n", err->message); - g_error_free(err); + if (stream->accepted == TRUE) { + fs_stream_set_remote_candidates(stream->stream, + stream->remote_candidates, &err); + + if (err) { + purple_debug_error("media", "Error adding remote" + " candidates: %s\n", err->message); + g_error_free(err); + } } #endif } diff -r 63cb8c4f3c66 -r 0fc901008172 libpurple/media.h --- a/libpurple/media.h Sun Aug 30 04:00:51 2009 +0000 +++ b/libpurple/media.h Sun Aug 30 04:10:22 2009 +0000 @@ -59,11 +59,11 @@ #define PURPLE_MEDIA_TYPE_STATE (purple_media_state_changed_get_type()) #define PURPLE_MEDIA_TYPE_INFO_TYPE (purple_media_info_type_get_type()) -/** @copydoc _PurpleMedia */ +/** An opaque structure representing a media call. */ typedef struct _PurpleMedia PurpleMedia; -/** @copydoc _PurpleMediaCandidate */ +/** An opaque structure representing a network candidate (IP Address and port pair). */ typedef struct _PurpleMediaCandidate PurpleMediaCandidate; -/** @copydoc _PurpleMediaCodec */ +/** An opaque structure representing an audio or video codec. */ typedef struct _PurpleMediaCodec PurpleMediaCodec; /** Media caps */ @@ -559,6 +559,7 @@ * @param media The media object to find the session in. * @param sess_id The session id of the session find the stream in. * @param participant The name of the remote user to set the candidates from. + * @param codecs The list of remote codecs to set. * * @return @c TRUE The codecs were set successfully, or @c FALSE otherwise. * diff -r 63cb8c4f3c66 -r 0fc901008172 libpurple/mediamanager.h --- a/libpurple/mediamanager.h Sun Aug 30 04:00:51 2009 +0000 +++ b/libpurple/mediamanager.h Sun Aug 30 04:10:22 2009 +0000 @@ -30,9 +30,9 @@ #include #include -/** @copydoc _PurpleMediaManager */ +/** An opaque structure representing a group of (usually all) media calls. */ typedef struct _PurpleMediaManager PurpleMediaManager; -/** @copydoc _PurpleMediaManagerClass */ +/** The GObject class structure of the PurpleMediaManager object. */ typedef struct _PurpleMediaManagerClass PurpleMediaManagerClass; #include "account.h" @@ -81,6 +81,7 @@ * @param account The account to create the session on. * @param conference_type The conference type to feed into Farsight2. * @param remote_user The remote user to initiate the session with. + * @param initiator TRUE if the local user is the initiator of this media call, FALSE otherwise. * * @return A newly created media session. * diff -r 63cb8c4f3c66 -r 0fc901008172 pidgin/gtkmedia.c --- a/pidgin/gtkmedia.c Sun Aug 30 04:00:51 2009 +0000 +++ b/pidgin/gtkmedia.c Sun Aug 30 04:10:22 2009 +0000 @@ -747,10 +747,12 @@ /* set the window icon according to the type */ if (type & PURPLE_MEDIA_VIDEO) { - icon = gtk_widget_render_icon(gtkmedia, PIDGIN_STOCK_TOOLBAR_VIDEO_CALL, + icon = gtk_widget_render_icon(GTK_WIDGET(gtkmedia), + PIDGIN_STOCK_TOOLBAR_VIDEO_CALL, gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_LARGE), NULL); } else if (type & PURPLE_MEDIA_AUDIO) { - icon = gtk_widget_render_icon(gtkmedia, PIDGIN_STOCK_TOOLBAR_AUDIO_CALL, + icon = gtk_widget_render_icon(GTK_WIDGET(gtkmedia), + PIDGIN_STOCK_TOOLBAR_AUDIO_CALL, gtk_icon_size_from_name(PIDGIN_ICON_SIZE_TANGO_LARGE), NULL); }