rearrange stream start sequence
This commit is contained in:
parent
7e8b302e7c
commit
e13e871577
13
stream.py
13
stream.py
|
@ -72,12 +72,12 @@ class ThreadedPipeline:
|
|||
stateChange = self._pipeline.set_state(Gst.State.PAUSED)
|
||||
_gstPrintMsg(pName, 'Setting to PAUSED', level=logging.INFO)
|
||||
|
||||
if stateChange == Gst.StateChangeReturn.FAILURE:
|
||||
# we should always end up here because live
|
||||
if stateChange == Gst.StateChangeReturn.NO_PREROLL:
|
||||
_gstPrintMsg(pName, 'Live and does not need preroll')
|
||||
elif stateChange == Gst.StateChangeReturn.FAILURE:
|
||||
_gstPrintMsg(pName, 'Cannot set to PAUSE', level=logging.INFO)
|
||||
self._eventLoop(block=False, doProgress=False, targetState=Gst.State.VOID_PENDING)
|
||||
# we should always end up here because live
|
||||
elif stateChange == Gst.StateChangeReturn.NO_PREROLL:
|
||||
_gstPrintMsg(pName, 'Live and does not need preroll')
|
||||
elif stateChange == Gst.StateChangeReturn.ASYNC:
|
||||
_gstPrintMsg(pName, 'Prerolling')
|
||||
try:
|
||||
|
@ -105,11 +105,8 @@ class ThreadedPipeline:
|
|||
err = self._pipeline.get_bus().pop_filtered(Gst.MessageType.Error)
|
||||
_processErrorMessage(pName, msgSrcName, err)
|
||||
|
||||
# ...we end up here and loop until Tool releases their next album
|
||||
try:
|
||||
# ...we end up here and fork to a child thread
|
||||
self._mainLoop()
|
||||
except:
|
||||
raise GstException
|
||||
|
||||
# TODO: this might not all be necessary
|
||||
def stop(self):
|
||||
|
|
Loading…
Reference in New Issue