Store outputs that have been added in gstreamer class
This commit is contained in:
parent
0ec662db63
commit
fe3f5338dd
@ -40,6 +40,7 @@ class GStreamer(ThreadingActor):
|
|||||||
self._tee = None
|
self._tee = None
|
||||||
self._uridecodebin = None
|
self._uridecodebin = None
|
||||||
self._volume = None
|
self._volume = None
|
||||||
|
self._outputs = {}
|
||||||
|
|
||||||
def on_start(self):
|
def on_start(self):
|
||||||
self._setup_gstreamer()
|
self._setup_gstreamer()
|
||||||
@ -274,3 +275,8 @@ class GStreamer(ThreadingActor):
|
|||||||
self._pipeline.add(output)
|
self._pipeline.add(output)
|
||||||
output.sync_state_with_parent() # Required to add to running pipe
|
output.sync_state_with_parent() # Required to add to running pipe
|
||||||
gst.element_link_many(self._tee, output)
|
gst.element_link_many(self._tee, output)
|
||||||
|
|
||||||
|
self._outputs[output.get_name()] = output
|
||||||
|
|
||||||
|
def list_outputs(self):
|
||||||
|
return self._outputs.keys()
|
||||||
|
|||||||
@ -17,6 +17,7 @@ class BaseOutput(object):
|
|||||||
logger.debug('Creating new output: %s', description)
|
logger.debug('Creating new output: %s', description)
|
||||||
|
|
||||||
output = gst.parse_bin_from_description(description, True)
|
output = gst.parse_bin_from_description(description, True)
|
||||||
|
output.set_name(self.__class__.__name__)
|
||||||
self.modify_bin(output)
|
self.modify_bin(output)
|
||||||
|
|
||||||
return output
|
return output
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user