Mercurial > pidgin
comparison libpurple/mediamanager.c @ 24950:431c59a6959d
Add purple_media_manager_get_element.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Thu, 06 Nov 2008 01:32:58 +0000 |
parents | 0baeafee93be |
children | 18b71033ea6e |
comparison
equal
deleted
inserted
replaced
24949:1a2d446cb8a0 | 24950:431c59a6959d |
---|---|
197 if (list) | 197 if (list) |
198 manager->priv->medias = | 198 manager->priv->medias = |
199 g_list_delete_link(manager->priv->medias, list); | 199 g_list_delete_link(manager->priv->medias, list); |
200 } | 200 } |
201 | 201 |
202 GstElement * | |
203 purple_media_manager_get_element(PurpleMediaManager *manager, | |
204 PurpleMediaSessionType type) | |
205 { | |
206 GstElement *ret = NULL; | |
207 GstElement *level = NULL; | |
208 | |
209 /* TODO: If src, retrieve current src */ | |
210 /* TODO: Send a signal here to allow for overriding the source/sink */ | |
211 | |
212 if (type & PURPLE_MEDIA_SEND_AUDIO) | |
213 purple_media_audio_init_src(&ret, &level); | |
214 else if (type & PURPLE_MEDIA_RECV_AUDIO) | |
215 purple_media_audio_init_recv(&ret, &level); | |
216 else if (type & PURPLE_MEDIA_SEND_VIDEO) | |
217 purple_media_video_init_src(&ret); | |
218 else if (type & PURPLE_MEDIA_RECV_VIDEO) | |
219 purple_media_video_init_recv(&ret); | |
220 | |
221 if (ret == NULL) | |
222 purple_debug_error("media", "Error creating source or sink\n"); | |
223 | |
224 return ret; | |
225 } | |
226 | |
202 #endif /* USE_VV */ | 227 #endif /* USE_VV */ |