[telepathy-ashes/master] Got things working on korma.
David Laban
david.laban at collabora.co.uk
Thu Oct 15 12:19:00 PDT 2009
For some reason, what I was doing before was working on my laptop
but not on korma. Now, it goes a bit fucked a second in, but works
on both machines. Not really planning to debug why right now.
---
ashes/tools/commands.py | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/ashes/tools/commands.py b/ashes/tools/commands.py
index c636e06..af24c98 100644
--- a/ashes/tools/commands.py
+++ b/ashes/tools/commands.py
@@ -171,12 +171,12 @@ class SongPlayer(MediaChannelEchoer):
"""
song_path = os.path.expandvars("${HOME}/data/song.mp3")
- def stream_created(self, channel, stream):
+ def src_pad_added(self, stream, srcpad, codec):
"""
- Overrides MediaChannelEchoer.stream_created() to play media down it.
- Doesn't connect src_pad_added because we don't care about incoming
- media.
+ Overrides MediaChannelEchoer.src_pad_added() to use it as a trigger
+ for starting to send data. We currently ignore incoming data.
"""
+ print "SongPlayer.src_pad_added() called"
srcpad = stream.get_property ("sink-pad")
@@ -185,10 +185,8 @@ class SongPlayer(MediaChannelEchoer):
if type == farsight.MEDIA_TYPE_AUDIO:
# NOTE: identity sync=true stops the song finishing before we
# actually connect, but the remote end still only connects halfway
- # through the song. We could delay it until src-pad-added, because
- # that's closer to when the other side is connected, but that's
- # a massive hack. I'd rather wait until the media spec is less
- # funky and do it properly if possible.
+ # through the song. We currently delay it until src-pad-added, because
+ # that's closer to when the remote end picks up, but this is a hack.
description = "filesrc location=%s ! mad ! audioconvert ! audioresample ! identity sync=true" % self.song_path
src = gst.parse_bin_from_description(description, True)
elif type == farsight.MEDIA_TYPE_VIDEO:
--
1.5.6.5
More information about the telepathy-commits
mailing list