comparison libpurple/media.h @ 23824:bfaad8393463

Added some utility functions to convert PurpleMediaStreamType to and from FsMediaType and FsStreamDirection.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Fri, 06 Jun 2008 19:08:04 +0000
parents 12a16471f94e
children b5a00ddb7077
comparison
equal deleted inserted replaced
23823:9983353706b8 23824:bfaad8393463
49 typedef struct _PurpleMediaClass PurpleMediaClass; 49 typedef struct _PurpleMediaClass PurpleMediaClass;
50 typedef struct _PurpleMediaPrivate PurpleMediaPrivate; 50 typedef struct _PurpleMediaPrivate PurpleMediaPrivate;
51 typedef struct _PurpleMediaSession PurpleMediaSession; 51 typedef struct _PurpleMediaSession PurpleMediaSession;
52 52
53 typedef enum { 53 typedef enum {
54 PURPLE_MEDIA_NONE = 0,
54 PURPLE_MEDIA_RECV_AUDIO = 1 << 0, 55 PURPLE_MEDIA_RECV_AUDIO = 1 << 0,
55 PURPLE_MEDIA_SEND_AUDIO = 1 << 1, 56 PURPLE_MEDIA_SEND_AUDIO = 1 << 1,
56 PURPLE_MEDIA_RECV_VIDEO = 1 << 2, 57 PURPLE_MEDIA_RECV_VIDEO = 1 << 2,
57 PURPLE_MEDIA_SEND_VIDEO = 1 << 3, 58 PURPLE_MEDIA_SEND_VIDEO = 1 << 3,
58 PURPLE_MEDIA_AUDIO = PURPLE_MEDIA_RECV_AUDIO | PURPLE_MEDIA_SEND_AUDIO, 59 PURPLE_MEDIA_AUDIO = PURPLE_MEDIA_RECV_AUDIO | PURPLE_MEDIA_SEND_AUDIO,
69 GObject parent; 70 GObject parent;
70 PurpleMediaPrivate *priv; 71 PurpleMediaPrivate *priv;
71 }; 72 };
72 73
73 GType purple_media_get_type(void); 74 GType purple_media_get_type(void);
75
76 FsMediaType purple_media_to_fs_media_type(PurpleMediaStreamType type);
77 FsStreamDirection purple_media_to_fs_stream_direction(PurpleMediaStreamType type);
78 PurpleMediaStreamType purple_media_from_fs(FsMediaType type, FsStreamDirection direction);
74 79
75 GList *purple_media_get_session_names(PurpleMedia *media); 80 GList *purple_media_get_session_names(PurpleMedia *media);
76 81
77 void purple_media_get_elements(PurpleMedia *media, GstElement **audio_src, GstElement **audio_sink, 82 void purple_media_get_elements(PurpleMedia *media, GstElement **audio_src, GstElement **audio_sink,
78 GstElement **video_src, GstElement **video_sink); 83 GstElement **video_src, GstElement **video_sink);