Store outputs that have been added in gstreamer class

This commit is contained in:
Thomas Adamcik 2011-05-14 23:54:19 +02:00
parent 0ec662db63
commit fe3f5338dd
2 changed files with 7 additions and 0 deletions

View File

@ -40,6 +40,7 @@ class GStreamer(ThreadingActor):
self._tee = None
self._uridecodebin = None
self._volume = None
self._outputs = {}
def on_start(self):
self._setup_gstreamer()
@ -274,3 +275,8 @@ class GStreamer(ThreadingActor):
self._pipeline.add(output)
output.sync_state_with_parent() # Required to add to running pipe
gst.element_link_many(self._tee, output)
self._outputs[output.get_name()] = output
def list_outputs(self):
return self._outputs.keys()

View File

@ -17,6 +17,7 @@ class BaseOutput(object):
logger.debug('Creating new output: %s', description)
output = gst.parse_bin_from_description(description, True)
output.set_name(self.__class__.__name__)
self.modify_bin(output)
return output