gst1: Replace STATE_CHANGE_* with StateChangeReturn.*
This commit is contained in:
parent
e621d8055a
commit
1911ea0c10
@ -721,7 +721,7 @@ class Audio(pykka.ThreadingActor):
|
||||
gst_logger.debug('State change to %s: result=%s', state.value_name,
|
||||
result.value_name)
|
||||
|
||||
if result == Gst.State.CHANGE_FAILURE:
|
||||
if result == Gst.StateChangeReturn.FAILURE:
|
||||
logger.warning(
|
||||
'Setting GStreamer state to %s failed', state.value_name)
|
||||
return False
|
||||
|
||||
@ -108,7 +108,8 @@ def _pad_added(element, pad, pipeline):
|
||||
|
||||
|
||||
def _start_pipeline(pipeline):
|
||||
if pipeline.set_state(Gst.State.PAUSED) == Gst.State.CHANGE_NO_PREROLL:
|
||||
result = pipeline.set_state(Gst.State.PAUSED)
|
||||
if result == Gst.StateChangeReturn.NO_PREROLL:
|
||||
pipeline.set_state(Gst.State.PLAYING)
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user