Beispiel #1
0
 def __init__(self, elementname="fsrtpconference"):
     self.pipeline = gst.Pipeline()
     notifier = farsight.ElementAddedNotifier()
     notifier.connect("element-added", self.element_added_cb)
     notifier.add(self.pipeline)
     self.pipeline.get_bus().set_sync_handler(self.sync_handler)
     self.pipeline.get_bus().add_watch(self.async_handler)
     self.conf = gst.element_factory_make(elementname)
     # Sets lets our own cname
     #self.conf.set_property("sdes-cname", mycname)
     self.pipeline.add(self.conf)
     if VIDEO:
         self.videosource = FsVideoSource(self.pipeline)
         self.videosession = FsSession(self.conf, self.videosource)
     if AUDIO:
         self.audiosource = FsAudioSource(self.pipeline)
         self.audiosession = FsSession(self.conf, self.audiosource)
         self.adder = None
     self.pipeline.set_state(gst.STATE_PLAYING)
Beispiel #2
0
def create_notifier(pipeline, filename):
    notifier = farsight.ElementAddedNotifier()
    notifier.add(pipeline)
    notifier.set_properties_from_file(filename)
    return notifier