gst1: Replace STATE_CHANGE_* with StateChangeReturn.*

This commit is contained in:
Stein Magnus Jodal 2015-09-02 01:34:20 +02:00
parent e621d8055a
commit 1911ea0c10
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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)