diff options
-rw-r--r-- | glive.py | 5 | ||||
-rw-r--r-- | model.py | 7 |
2 files changed, 11 insertions, 1 deletions
@@ -277,8 +277,11 @@ class Glive: def _thumb_element(self, name): return self._thumb_pipes[-1].get_by_name(name) + def is_using_xv(self): + return self._pipeline.get_by_name("xsink") == self._xvsink + def _configure_xv(self): - if self._pipeline.get_by_name("xsink") == self._xvsink: + if self.is_using_xv(): # nothing to do, Xv already configured return self._xvsink @@ -126,6 +126,13 @@ class Model: if state == constants.STATE_READY: self.gplay.stop() + + # if we aren't using Xv (e.g. glive is playing as PIP in video + # mode), then stop the pipeline so that we switch back to Xv + # in the call that follows. + if not self.glive.is_using_xv(): + self.glive.stop() + self.glive.play() self.activity.set_state(state) |