print 'on_state_changed'
old_state, new_state, pending = msg.parse_state_changed()
print "%s -> %s" % (old_state, new_state)
- if new_state == gst.STATE_PAUSED:
+ if old_state == gst.STATE_READY and new_state == gst.STATE_PAUSED:
self.set_rate(self._rate)
def set_rate(self, rate):
print 'on_state_changed'
old_state, new_state, pending = msg.parse_state_changed()
print "%s -> %s" % (old_state, new_state)
- if new_state == gst.STATE_PAUSED:
+ if old_state == gst.STATE_READY and new_state == gst.STATE_PAUSED:
self.set_rate(self._rate)
def set_rate(self, rate):
print 'on_state_changed'
old_state, new_state, pending = msg.parse_state_changed()
print "%s -> %s" % (old_state, new_state)
- if new_state == gst.STATE_PAUSED:
+ if old_state == gst.STATE_READY and new_state == gst.STATE_PAUSED:
self.set_rate(self._rate)
def set_rate(self, rate):