Revert "Fix set_state method in GStreamerOutput"

This reverts commit dc27434df9.
This commit is contained in:
Stein Magnus Jodal 2010-08-14 16:42:46 +02:00
parent 0882011a71
commit 473c31fec8

View File

@ -159,10 +159,10 @@ class GStreamerProcess(BaseProcess):
:type state_name: string
:rtype: :class:`True` or :class:`False`
"""
state = getattr(gst, 'STATE_' + state_name)
self.gst_pipeline.set_state(state)
new_state = self.gst_pipeline.get_state()[1]
if new_state == state:
# XXX Setting state to PLAYING often returns False even if it works
result = self.gst_pipeline.set_state(
getattr(gst, 'STATE_' + state_name))
if result == gst.STATE_CHANGE_SUCCESS:
logger.debug('Setting GStreamer state to %s: OK', state_name)
return True
else: