pidgin.vv: 7c43abd9: Added PurpleMediaElementType enum and ad...

maiku at soc.pidgin.im maiku at soc.pidgin.im
Wed Feb 4 19:20:28 EST 2009


-----------------------------------------------------------------
Revision: 7c43abd95fc65dd744e15aa03505ec6914da27be
Ancestor: 74fbda391dc83de12c1b07902b833104635899da
Author: maiku at soc.pidgin.im
Date: 2009-02-03T23:34:53
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/7c43abd95fc65dd744e15aa03505ec6914da27be

Modified files:
        libpurple/mediamanager.h pidgin/gtkmedia.c

ChangeLog: 

Added PurpleMediaElementType enum and added type to PurpleMediaElementInfo.

-------------- next part --------------
============================================================
--- libpurple/mediamanager.h	cb1ec9bd4df19e95752f0e2c13024ef0742cd413
+++ libpurple/mediamanager.h	6528c68bdcdaacd4f4e85fdbf0cf277444cd3648
@@ -66,9 +66,31 @@ struct _PurpleMediaManager
 	PurpleMediaManagerPrivate *priv; /**< Private data for the manager. */
 };
 
+typedef enum {
+	PURPLE_MEDIA_ELEMENT_AUDIO = 1,			/** supports audio */
+	PURPLE_MEDIA_ELEMENT_VIDEO = 1 << 1,		/** supports video */
+	PURPLE_MEDIA_ELEMENT_AUDIO_VIDEO = PURPLE_MEDIA_ELEMENT_AUDIO
+			| PURPLE_MEDIA_ELEMENT_VIDEO, 	/** supports audio and video */
+
+	PURPLE_MEDIA_ELEMENT_NO_SRCS = 0,		/** has no src pads */
+	PURPLE_MEDIA_ELEMENT_ONE_SRC = 1 << 2,		/** has one src pad */
+	PURPLE_MEDIA_ELEMENT_MULTI_SRC = 1 << 3, 	/** has multiple src pads */
+	PURPLE_MEDIA_ELEMENT_REQUEST_SRC = 1 << 4, 	/** src pads must be requested */
+
+	PURPLE_MEDIA_ELEMENT_NO_SINKS = 0,		/** has no sink pads */
+	PURPLE_MEDIA_ELEMENT_ONE_SINK = 1 << 5, 	/** has one sink pad */
+	PURPLE_MEDIA_ELEMENT_MULTI_SINK = 1 << 6, 	/** has multiple sink pads */
+	PURPLE_MEDIA_ELEMENT_REQUEST_SINK = 1 << 7, 	/** sink pads must be requested */
+
+	PURPLE_MEDIA_ELEMENT_UNIQUE = 1 << 8,		/** This element is unique and
+							 only one instance of it should
+							 be created at a time */
+} PurpleMediaElementType;
+
 struct _PurpleMediaElementInfo
 {
 	const gchar *id;
+	PurpleMediaElementType type;
 };
 
 #ifdef __cplusplus
============================================================
--- pidgin/gtkmedia.c	2d533c03d25538e9c3aa16aea374af2d62c9903d
+++ pidgin/gtkmedia.c	a1609b25a9f99a90f043063e44044648080fa753
@@ -788,21 +788,31 @@ static PurpleMediaElementInfo default_vi
 static PurpleMediaElementInfo default_video_src =
 {
 	"pidgindefaultvideosrc",	/* id */
+	PURPLE_MEDIA_ELEMENT_VIDEO	/* type */
+			| PURPLE_MEDIA_ELEMENT_ONE_SRC
+			| PURPLE_MEDIA_ELEMENT_UNIQUE,
 };
 
 static PurpleMediaElementInfo default_video_sink =
 {
 	"pidgindefaultvideosink",	/* id */
+	PURPLE_MEDIA_ELEMENT_VIDEO	/* type */
+			| PURPLE_MEDIA_ELEMENT_ONE_SINK,
 };
 
 static PurpleMediaElementInfo default_audio_src =
 {
 	"pidgindefaultaudiosrc",	/* id */
+	PURPLE_MEDIA_ELEMENT_AUDIO	/* type */
+			| PURPLE_MEDIA_ELEMENT_ONE_SRC
+			| PURPLE_MEDIA_ELEMENT_UNIQUE,
 };
 
 static PurpleMediaElementInfo default_audio_sink =
 {
 	"pidgindefaultaudiosink",	/* id */
+	PURPLE_MEDIA_ELEMENT_AUDIO	/* type */
+			| PURPLE_MEDIA_ELEMENT_ONE_SINK,
 };
 
 void


More information about the Commits mailing list