From be5274444c54eb5c529e592d130e362fd1728b4d Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 15 Aug 2011 11:23:35 +0200 Subject: Use gst_parse_bin_from_description() when EMPATHY_AUDIO_* vars are set Also factor out empathy_call_set_stream_properties(). --- libempathy-gtk/empathy-call-utils.c | 11 +++++++++++ libempathy-gtk/empathy-call-utils.h | 4 ++++ 2 files changed, 15 insertions(+) (limited to 'libempathy-gtk') diff --git a/libempathy-gtk/empathy-call-utils.c b/libempathy-gtk/empathy-call-utils.c index 2991784f1..333d90267 100644 --- a/libempathy-gtk/empathy-call-utils.c +++ b/libempathy-gtk/empathy-call-utils.c @@ -192,3 +192,14 @@ empathy_call_new_with_streams (const gchar *contact, g_hash_table_unref (streamed_media_request); g_object_unref (call_req); } + +void +empathy_call_set_stream_properties (GstElement *element) +{ + GstStructure *props; + + props = gst_structure_from_string ( + "props,media.role=phone", NULL); + g_object_set (element, "stream-properties", props, NULL); + gst_structure_free (props); +} diff --git a/libempathy-gtk/empathy-call-utils.h b/libempathy-gtk/empathy-call-utils.h index 99a97f202..87676161c 100644 --- a/libempathy-gtk/empathy-call-utils.h +++ b/libempathy-gtk/empathy-call-utils.h @@ -21,6 +21,8 @@ #ifndef __EMPATHY_CALL_UTILS_H__ #define __EMPATHY_CALL_UTILS_H__ +#include + G_BEGIN_DECLS /* Calls */ @@ -38,6 +40,8 @@ GHashTable * empathy_call_create_streamed_media_request (const gchar *contact, gboolean initial_audio, gboolean initial_video); +void empathy_call_set_stream_properties (GstElement *element); + G_END_DECLS #endif /* __EMPATHY_CALL_UTILS_H__ */ -- cgit v1.2.3