[telepathy-gabble/master] Translate the internal media type to the tp media type
Sjoerd Simons
sjoerd.simons at collabora.co.uk
Wed Dec 23 16:06:12 PST 2009
---
src/call-content.c | 12 +++++++++++-
tests/twisted/constants.py | 4 ++--
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/call-content.c b/src/call-content.c
index e5edf30..a80e538 100644
--- a/src/call-content.c
+++ b/src/call-content.c
@@ -130,7 +130,17 @@ gabble_call_content_get_property (GObject *object,
{
JingleMediaType mtype;
g_object_get (priv->content, "media-type", &mtype, NULL);
- g_value_set_uint (value, mtype);
+ switch (mtype)
+ {
+ case JINGLE_MEDIA_TYPE_AUDIO:
+ g_value_set_uint (value, TP_MEDIA_STREAM_TYPE_AUDIO);
+ break;
+ case JINGLE_MEDIA_TYPE_VIDEO:
+ g_value_set_uint (value, TP_MEDIA_STREAM_TYPE_VIDEO);
+ break;
+ default:
+ g_assert_not_reached ();
+ }
break;
}
case PROP_STREAMS:
diff --git a/tests/twisted/constants.py b/tests/twisted/constants.py
index 01df0d6..17e2672 100644
--- a/tests/twisted/constants.py
+++ b/tests/twisted/constants.py
@@ -68,8 +68,8 @@ CALL_STREAM_IFACE_MEDIA = \
CALL_STREAM_ENDPOINT = 'org.freedesktop.Telepathy.Call.Stream.Endpoint.DRAFT'
-CALL_MEDIA_TYPE_AUDIO = 1
-CALL_MEDIA_TYPE_VIDEO = 2
+CALL_MEDIA_TYPE_AUDIO = 0
+CALL_MEDIA_TYPE_VIDEO = 1
CALL_STREAM_TRANSPORT_RAW_UDP = 0
CALL_STREAM_TRANSPORT_ICE = 1
--
1.5.6.5
More information about the telepathy-commits
mailing list