MCPcopy Create free account
hub / github.com/GStreamer/gst-python / on_button_clicked

Method on_button_clicked

old_examples/maemogst.py:85–94  ·  view source on GitHub ↗
(self, widget)

Source from the content-addressed store, hash-verified

83 "Error: %s" % err)
84
85 def on_button_clicked(self, widget):
86 success, state, pending = self.pipeline.get_state(1)
87 # do not listen if in middle of state change
88 if not pending:
89 if state == gst.STATE_PLAYING:
90 self.pipeline.set_state(gst.STATE_PAUSED)
91 self.button.set_label("Play")
92 else:
93 self.pipeline.set_state(gst.STATE_PLAYING)
94 self.button.set_label("Pause")
95
96def main():
97 view = MaemoGstView()

Callers

nothing calls this directly

Calls 1

get_stateMethod · 0.45

Tested by

no test coverage detected