pidgin.vv: 9a0cc005: Use purple_media_manager_get_pipeline in...

maiku at soc.pidgin.im maiku at soc.pidgin.im
Wed Apr 1 00:31:17 EDT 2009


-----------------------------------------------------------------
Revision: 9a0cc005dc2a89f217230784a7ec9065e2b2111f
Ancestor: 2def59e70dc735b2a5a83535098066135cbe323a
Author: maiku at soc.pidgin.im
Date: 2009-04-01T01:05:03
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/9a0cc005dc2a89f217230784a7ec9065e2b2111f

Modified files:
        libpurple/media-gst.h libpurple/media.c libpurple/media.h
        pidgin/gtkmedia.c

ChangeLog: 

Use purple_media_manager_get_pipeline instead.

-------------- next part --------------
============================================================
--- libpurple/media-gst.h	a922978b8ffb607e3984c6d7db83a08704aed0e2
+++ libpurple/media-gst.h	f07cea3efd93baeb01983962f8d4755d0c4c14fb
@@ -84,15 +84,6 @@ GstElement *purple_media_get_src(PurpleM
 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.
============================================================
--- libpurple/media.c	6e6b5a021d52176776e972fbd7eec16b38e7719e
+++ libpurple/media.c	0b7e375acda5b1070e5d786efb3e874c4f5c8747
@@ -1325,18 +1325,6 @@ media_bus_call(GstBus *bus, GstMessage *
 }
 #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 @@ purple_media_add_stream(PurpleMedia *med
 #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)
 {
============================================================
--- libpurple/media.h	b55877538f1fc42a2a5b43bcf23ee11e3117511c
+++ libpurple/media.h	4b10311194f553c089bbc9bda028a92bc0d2cede
@@ -405,6 +405,15 @@ PurpleMediaSessionType purple_media_get_
 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.
============================================================
--- pidgin/gtkmedia.c	77255dd99d409a2e9058516b886dbfca26787e0a
+++ pidgin/gtkmedia.c	da2e6c6611d21572ec773a5fe942ad8262250c67
@@ -389,7 +389,8 @@ pidgin_media_disconnect_levels(PurpleMed
 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 @@ pidgin_media_ready_cb(PurpleMedia *media
 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);


More information about the Commits mailing list