[pitivi: 7/8] action/sinks: When disabling Sync, also disable QoS.



commit 930bb1019ba6dbdbb1805614029a0e7b9f49bd65
Author: Edward Hervey <bilboed bilboed com>
Date:   Fri May 1 18:27:19 2009 +0200

    action/sinks: When disabling Sync, also disable QoS.
    
    This should fix the 'stuttering' issue when rendering on computers which
    are too slow to do (faster than) real-time rendering.
---
 pitivi/action.py  |    3 ++-
 pitivi/plumber.py |    4 ++++
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/pitivi/action.py b/pitivi/action.py
index 9f6f41e..c009fbf 100644
--- a/pitivi/action.py
+++ b/pitivi/action.py
@@ -742,7 +742,8 @@ class ViewAction(Action):
 
     def setSync(self, sync=True):
         """
-        Whether the sinks should sync against the running clock
+        Whether the sinks should sync against the running clock and
+        emit QoS events upstream.
         """
         self.sync = sync
         if self.videosink:
diff --git a/pitivi/plumber.py b/pitivi/plumber.py
index 5c4e6c6..23fe827 100644
--- a/pitivi/plumber.py
+++ b/pitivi/plumber.py
@@ -45,6 +45,7 @@ class DefaultVideoSink(SinkFactory):
         self._cachedsink = None
         self._realsink = None
         self.sync = True
+        self.qos = True
 
     def _makeBin(self, input_stream=None):
         """ Returns a video sink bin"""
@@ -84,6 +85,7 @@ class DefaultVideoSink(SinkFactory):
                 self._realsink.set_property("force-aspect-ratio", True)
 
             self._realsink.props.sync = self.sync
+            self._realsink.props.qos = self.sync
 
         if self._xid != 0:
             self._realsink.set_xwindow_id(self._xid)
@@ -109,9 +111,11 @@ class DefaultVideoSink(SinkFactory):
         if self.sync == sync:
             return
         self.sync = sync
+        self.qos = sync
         self.debug("_realsink:%r", self._realsink)
         if self._realsink:
             self._realsink.props.sync = self.sync
+            self._realsink.props.qos = self.sync
 
 class DefaultAudioSink(SinkFactory):
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]