[telepathy-gabble/master] Implement the HardwareStreaming property
Sjoerd Simons
sjoerd.simons at collabora.co.uk
Tue Dec 29 05:35:16 PST 2009
---
src/call-channel.c | 12 ++++++++++++
tests/twisted/jingle/call-basics.py | 4 ++++
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/call-channel.c b/src/call-channel.c
index 8a47b93..f8d8384 100644
--- a/src/call-channel.c
+++ b/src/call-channel.c
@@ -91,6 +91,7 @@ enum
PROP_INITIAL_AUDIO,
PROP_INITIAL_VIDEO,
PROP_MUTABLE_CONTENTS,
+ PROP_HARDWARE_STREAMING,
PROP_CONTENTS,
PROP_SESSION,
@@ -289,6 +290,9 @@ gabble_call_channel_get_property (GObject *object,
g_ptr_array_free (arr, TRUE);
break;
}
+ case PROP_HARDWARE_STREAMING:
+ g_value_set_boolean (value, FALSE);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -363,6 +367,7 @@ gabble_call_channel_class_init (
{ "InitialAudio", "initial-audio", NULL },
{ "InitialVideo", "initial-video", NULL },
{ "Contents", "contents", NULL },
+ { "HardwareStreaming", "hardware-streaming", NULL },
{ NULL }
};
@@ -475,6 +480,13 @@ gabble_call_channel_class_init (
g_object_class_install_property (object_class, PROP_CONTENTS,
param_spec);
+ param_spec = g_param_spec_boolean ("hardware-streaming", "HardwareStreaming",
+ "True if all the streaming is done by hardware",
+ FALSE,
+ G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+ g_object_class_install_property (object_class, PROP_HARDWARE_STREAMING,
+ param_spec);
+
gabble_call_channel_class->dbus_props_class.interfaces = prop_interfaces;
tp_dbus_properties_mixin_class_init (object_class,
G_STRUCT_OFFSET (GabbleCallChannelClass, dbus_props_class));
diff --git a/tests/twisted/jingle/call-basics.py b/tests/twisted/jingle/call-basics.py
index 121503b..01c1d82 100644
--- a/tests/twisted/jingle/call-basics.py
+++ b/tests/twisted/jingle/call-basics.py
@@ -105,6 +105,9 @@ def run_test(jp, q, bus, conn, stream, incoming):
properties = chan.GetAll(cs.CHANNEL_TYPE_CALL,
dbus_interface=dbus.PROPERTIES_IFACE)
+ # No Hardware Streaming for you
+ assertEquals (False, properties["HardwareStreaming"])
+
# Only an audio content
assertLength (1, properties["Contents"])
@@ -121,6 +124,7 @@ def run_test(jp, q, bus, conn, stream, incoming):
# Media type should audio
assertEquals (cs.CALL_MEDIA_TYPE_AUDIO, content_properties["Type"])
+
# Setup codecs
codecs = jt2.get_call_audio_codecs_dbus()
if incoming:
--
1.5.6.5
More information about the telepathy-commits
mailing list