[Spice-commits] 3 commits - display.js
Jeremy White
jwhite at kemper.freedesktop.org
Fri Jan 20 15:51:22 UTC 2017
display.js | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
New commits:
commit d83dc14e157b23bdc47ec8d4db2e531a4fa41b7c
Author: Jeremy White <jwhite at codeweavers.com>
Date: Mon Dec 19 15:14:06 2016 -0600
Detect video underrun and advance the current time.
This helps us avoid stalled video streams.
diff --git a/display.js b/display.js
index d4baef7..c97f237 100644
--- a/display.js
+++ b/display.js
@@ -1114,6 +1114,14 @@ function handle_append_video_buffer_done(e)
return;
}
+ if (stream.video.buffered.length > 0 &&
+ stream.video.currentTime < stream.video.buffered.start(stream.video.buffered.length - 1))
+ {
+ console.log("Video appears to have fallen behind; advancing to " +
+ stream.video.buffered.start(stream.video.buffered.length - 1));
+ stream.video.currentTime = stream.video.buffered.start(stream.video.buffered.length - 1);
+ }
+
if (STREAM_DEBUG > 1)
console.log(stream.video.currentTime + ":id " + stream.id + " updateend " + dump_media_element(stream.video));
}
commit 001bcc830f0145a4975e43de23b209dd9e54631e
Author: Jeremy White <jwhite at codeweavers.com>
Date: Mon Dec 19 15:12:59 2016 -0600
Add more stream information in high debug situations at an updateend event.
diff --git a/display.js b/display.js
index c124483..d4baef7 100644
--- a/display.js
+++ b/display.js
@@ -1111,7 +1111,11 @@ function handle_append_video_buffer_done(e)
{
if (STREAM_DEBUG > 0)
console.log("Stream id " + stream.id + " received updateend after video is gone.");
+ return;
}
+
+ if (STREAM_DEBUG > 1)
+ console.log(stream.video.currentTime + ":id " + stream.id + " updateend " + dump_media_element(stream.video));
}
function handle_video_buffer_error(e)
commit aa8e9ecb79b839cc6a08d6f8bda0376fb53a4a25
Author: Jeremy White <jwhite at codeweavers.com>
Date: Mon Dec 19 15:11:51 2016 -0600
Catch and note updateend messages after video destruction.
diff --git a/display.js b/display.js
index 40a809e..c124483 100644
--- a/display.js
+++ b/display.js
@@ -1106,6 +1106,12 @@ function handle_append_video_buffer_done(e)
{
stream.append_okay = true;
}
+
+ if (!stream.video)
+ {
+ if (STREAM_DEBUG > 0)
+ console.log("Stream id " + stream.id + " received updateend after video is gone.");
+ }
}
function handle_video_buffer_error(e)
More information about the Spice-commits
mailing list