aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-08-15 17:23:35 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-08-15 20:38:12 +0800
commitbe5274444c54eb5c529e592d130e362fd1728b4d (patch)
tree3bc8d766c10532db66761b963864b2c379980fa2 /libempathy-gtk
parent7e9166e6711d15a28bb679a1aeed3223134f2388 (diff)
downloadgsoc2013-empathy-be5274444c54eb5c529e592d130e362fd1728b4d.tar
gsoc2013-empathy-be5274444c54eb5c529e592d130e362fd1728b4d.tar.gz
gsoc2013-empathy-be5274444c54eb5c529e592d130e362fd1728b4d.tar.bz2
gsoc2013-empathy-be5274444c54eb5c529e592d130e362fd1728b4d.tar.lz
gsoc2013-empathy-be5274444c54eb5c529e592d130e362fd1728b4d.tar.xz
gsoc2013-empathy-be5274444c54eb5c529e592d130e362fd1728b4d.tar.zst
gsoc2013-empathy-be5274444c54eb5c529e592d130e362fd1728b4d.zip
Use gst_parse_bin_from_description() when EMPATHY_AUDIO_* vars are set
Also factor out empathy_call_set_stream_properties().
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-call-utils.c11
-rw-r--r--libempathy-gtk/empathy-call-utils.h4
2 files changed, 15 insertions, 0 deletions
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 <gst/gst.h>
+
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__ */