# HG changeset patch # User Mike Ruprecht # Date 1238547903 0 # Node ID 462e5c27dbd79e430592547cc10a886d20ce976e # Parent 9c671fc1b35190ad37041a01812ac6066e0739ab Use purple_media_manager_get_pipeline instead. diff -r 9c671fc1b351 -r 462e5c27dbd7 libpurple/media-gst.h --- a/libpurple/media-gst.h Tue Mar 31 23:53:03 2009 +0000 +++ b/libpurple/media-gst.h Wed Apr 01 01:05:03 2009 +0000 @@ -84,15 +84,6 @@ GstElement *purple_media_get_src(PurpleMedia *media, const gchar *sess_id); /** - * Gets the pipeline from the media session. - * - * @param media The media session to retrieve the pipeline from. - * - * @return The pipeline retrieved. - */ -GstElement *purple_media_get_pipeline(PurpleMedia *media); - -/** * Gets the tee from a given session/stream. * * @param media The instance to get the tee from. diff -r 9c671fc1b351 -r 462e5c27dbd7 libpurple/media.c --- a/libpurple/media.c Tue Mar 31 23:53:03 2009 +0000 +++ b/libpurple/media.c Wed Apr 01 01:05:03 2009 +0000 @@ -1325,18 +1325,6 @@ } #endif -GstElement * -purple_media_get_pipeline(PurpleMedia *media) -{ -#ifdef USE_VV - g_return_val_if_fail(PURPLE_IS_MEDIA(media), NULL); - - return purple_media_manager_get_pipeline(media->priv->manager); -#else - return NULL; -#endif -} - PurpleConnection * purple_media_get_connection(PurpleMedia *media) { @@ -1892,6 +1880,15 @@ #endif /* USE_VV */ } +PurpleMediaManager * +purple_media_get_manager(PurpleMedia *media) +{ + PurpleMediaManager *ret; + g_return_val_if_fail(PURPLE_IS_MEDIA(media), NULL); + g_object_get(media, "manager", &ret, NULL); + return ret; +} + PurpleMediaSessionType purple_media_get_session_type(PurpleMedia *media, const gchar *sess_id) { diff -r 9c671fc1b351 -r 462e5c27dbd7 libpurple/media.h --- a/libpurple/media.h Tue Mar 31 23:53:03 2009 +0000 +++ b/libpurple/media.h Wed Apr 01 01:05:03 2009 +0000 @@ -405,6 +405,15 @@ PurpleMediaSessionType purple_media_get_session_type(PurpleMedia *media, const gchar *sess_id); /** + * Gets the PurpleMediaManager this media session is a part of. + * + * @param media The media object to get the manager instance from. + * + * @return The PurpleMediaManager instance retrieved. + */ +struct _PurpleMediaManager *purple_media_get_manager(PurpleMedia *media); + +/** * Gets the codecs from a session. * * @param media The media object to find the session in. diff -r 9c671fc1b351 -r 462e5c27dbd7 pidgin/gtkmedia.c --- a/pidgin/gtkmedia.c Tue Mar 31 23:53:03 2009 +0000 +++ b/pidgin/gtkmedia.c Wed Apr 01 01:05:03 2009 +0000 @@ -389,7 +389,8 @@ static void pidgin_media_disconnect_levels(PurpleMedia *media, PidginMedia *gtkmedia) { - GstElement *element = purple_media_get_pipeline(media); + PurpleMediaManager *manager = purple_media_get_manager(media); + GstElement *element = purple_media_manager_get_pipeline(manager); gulong handler_id = g_signal_handler_find(G_OBJECT(gst_pipeline_get_bus(GST_PIPELINE(element))), G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, 0, 0, NULL, G_CALLBACK(level_message_cb), gtkmedia); @@ -584,7 +585,8 @@ static void pidgin_media_ready_cb(PurpleMedia *media, PidginMedia *gtkmedia, const gchar *sid) { - GstElement *pipeline = purple_media_get_pipeline(media); + PurpleMediaManager *manager = purple_media_get_manager(media); + GstElement *pipeline = purple_media_manager_get_pipeline(manager); GtkWidget *send_widget = NULL, *recv_widget = NULL; PurpleMediaSessionType type = purple_media_get_session_type(media, sid);