[Telepathy-commits] [mingle/master] Keep track of all candidates and add a possibility to hook custom sink creation into ConferenceStreams
Sjoerd Simons
sjoerd at luon.net
Sat Nov 8 14:07:30 PST 2008
---
fs2.py | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/fs2.py b/fs2.py
index 5fe08be..14b81c6 100644
--- a/fs2.py
+++ b/fs2.py
@@ -121,11 +121,15 @@ class ConferenceStream:
self.fsstream = fsstream
self.newLocalCandidate = CallbackList()
self.componentStateChanged = CallbackList()
+ self.candidates = []
+
+ self.src_pad_hook = self.default_src_pad_added
self.fsstream.connect("src-pad-added",
self.src_pad_added)
def new_local_candidate(self, candidate):
+ self.candidates.append(candidate)
self.newLocalCandidate.callback(candidate)
def component_state_changed(self, component, state):
@@ -137,8 +141,7 @@ class ConferenceStream:
def set_remote_codecs(self, codecs):
self.fsstream.set_remote_codecs(codecs)
- def src_pad_added(self, stream, pad, codec):
- print "ADDING SINK"
+ def default_src_pad_added (self, session, stream, pad, codec):
if self.session.type == farsight.MEDIA_TYPE_VIDEO:
sink = gst.element_factory_make("xvimagesink")
@@ -149,6 +152,9 @@ class ConferenceStream:
sink.set_state(gst.STATE_PLAYING)
pad.link(sink.get_pad("sink"))
+ def src_pad_added(self, stream, pad, codec):
+ self.src_pad_hook (self, stream, pad, codec)
+
def set_direction(self, direction):
self.fsstream.set_property("direction", direction)
--
1.5.6.5
More information about the Telepathy-commits
mailing list