summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2010-03-07 00:08:46 (GMT)
committerOlivier Le Thanh Duong <olivier@lethanh.be>2010-03-09 12:56:58 (GMT)
commit29d427eb34309d4d0b4e65374fca7bb2b84fc2ea (patch)
tree390b4b29d2fa916334f542227a1f13ce525cc3cd
parent5d68f2ea0cf2338de99d4c4a450cc701ca49a68d (diff)
downloadtelepathy-butterfly-29d427eb34309d4d0b4e65374fca7bb2b84fc2ea.tar.gz
telepathy-butterfly-29d427eb34309d4d0b4e65374fca7bb2b84fc2ea.tar.xz
media: implement getters for streamed media channel properties
ButterflyMediaChannel forgot to implement getters for the streamed media properties, meaning that when telepathy.Channel looked at self._prop_getters looking for stremed media properties, it got a KeyError. Fixes: fd.o#26930 Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r--butterfly/channel/media.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/butterfly/channel/media.py b/butterfly/channel/media.py
index 2b5cde4..c2b25cf 100644
--- a/butterfly/channel/media.py
+++ b/butterfly/channel/media.py
@@ -97,10 +97,20 @@ class ButterflyMediaChannel(
'InitialVideo': CHANNEL_TYPE_STREAMED_MEDIA,
})
+ self._initial_video = False
+ self._initial_audio = False
+
if props.get(initial_audio_prop, False):
types.append(MEDIA_STREAM_TYPE_AUDIO)
+ self._initial_audio = True
if props.get(initial_video_prop, False):
types.append(MEDIA_STREAM_TYPE_VIDEO)
+ self._initial_video = True
+
+ self._implement_property_get(CHANNEL_TYPE_STREAMED_MEDIA, {
+ 'InitialAudio': lambda: dbus.Boolean(self._initial_audio),
+ 'InitialVideo': lambda: dbus.Boolean(self._initial_video),
+ })
if types:
self.RequestStreams(handle, types)