[Spice-devel] [spice-html5 1/6] Give the playback channel a separate debug control.

Jeremy White jwhite at codeweavers.com
Fri Jul 1 20:03:01 UTC 2016


Signed-off-by: Jeremy White <jwhite at codeweavers.com>
---
 playback.js | 6 +++---
 utils.js    | 1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/playback.js b/playback.js
index 9659381..36e6611 100644
--- a/playback.js
+++ b/playback.js
@@ -46,7 +46,7 @@ SpicePlaybackConn.prototype.process_channel_message = function(msg)
     {
         var start = new SpiceMsgPlaybackStart(msg.data);
 
-        DEBUG > 0 && console.log("PlaybackStart; frequency " + start.frequency);
+        PLAYBACK_DEBUG > 0 && console.log("PlaybackStart; frequency " + start.frequency);
 
         if (start.frequency != OPUS_FREQUENCY)
         {
@@ -95,7 +95,7 @@ SpicePlaybackConn.prototype.process_channel_message = function(msg)
         {
             // FIXME - this is arguably wrong.  But delaying the transmission was worse,
             //          in initial testing.  Could use more research.
-            DEBUG > 1 && console.log("Hacking time of " + data.time + " to " + this.last_data_time + 1);
+            PLAYBACK_DEBUG > 1 && console.log("Hacking time of " + data.time + " to " + this.last_data_time + 1);
             data.time = this.last_data_time + 1;
         }
 
@@ -117,7 +117,7 @@ SpicePlaybackConn.prototype.process_channel_message = function(msg)
         this.last_data_time = data.time;
 
 
-        DEBUG > 1 && console.log("PlaybackData; time " + data.time + "; length " + data.data.byteLength);
+        PLAYBACK_DEBUG > 1 && console.log("PlaybackData; time " + data.time + "; length " + data.data.byteLength);
 
         if (! this.source_buffer)
             return true;
diff --git a/utils.js b/utils.js
index f1a5748..44f9679 100644
--- a/utils.js
+++ b/utils.js
@@ -22,6 +22,7 @@
 **  Utility settings and functions for Spice
 **--------------------------------------------------------------------------*/
 var DEBUG = 0;
+var PLAYBACK_DEBUG = 0;
 var DUMP_DRAWS = false;
 var DUMP_CANVASES = false;
 
-- 
2.1.4



More information about the Spice-devel mailing list