[Spice-devel] [PATCH spice-html5 v2] Refine the debug messages printed at stream debug level 1.
Pavel Grunt
pgrunt at redhat.com
Tue Dec 13 13:11:47 UTC 2016
Hi Jeremy,
imo would be good to split to:
1) fix debug level
2) expand debug messages
3) move timeupdate to a higher debug level
Pavel
On Fri, 2016-12-09 at 14:52 -0600, Jeremy White wrote:
> Signed-off-by: Jeremy White <jwhite at codeweavers.com>
> ---
> v2: Turns out my working copy had a subtly different (and better)
> refinement
> than the version I prepared as a patch.
> ---
>
> display.js | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/display.js b/display.js
> index e26bff8..40a809e 100644
> --- a/display.js
> +++ b/display.js
> @@ -535,7 +535,7 @@
> SpiceDisplayConn.prototype.process_channel_message = function(msg)
> if (msg.type == SPICE_MSG_DISPLAY_STREAM_CREATE)
> {
> var m = new SpiceMsgDisplayStreamCreate(msg.data);
> - STREAM_DEBUG > 1 && console.log(this.type + ":
> MsgStreamCreate id" + m.id +
> + STREAM_DEBUG > 0 && console.log(this.type + ":
> MsgStreamCreate id" + m.id + "; type " + m.codec_type +
> "; width " + m.stream_width
> + "; height " + m.stream_height +
> "; left " + m.dest.left +
> "; top " + m.dest.top
> );
> @@ -639,7 +639,7 @@
> SpiceDisplayConn.prototype.process_channel_message = function(msg)
> if (msg.type == SPICE_MSG_DISPLAY_STREAM_DESTROY)
> {
> var m = new SpiceMsgDisplayStreamDestroy(msg.data);
> - STREAM_DEBUG > 1 && console.log(this.type + ":
> MsgStreamDestroy id" + m.id);
> + STREAM_DEBUG > 0 && console.log(this.type + ":
> MsgStreamDestroy id" + m.id);
>
> if (this.streams[m.id].codec_type ==
> SPICE_VIDEO_CODEC_TYPE_VP8)
> {
> @@ -1185,7 +1185,7 @@ function video_handle_event_debug(e)
> if (STREAM_DEBUG > 1 && s.source_buffer)
> console.log(" source_buffer " +
> dump_source_buffer(s.source_buffer));
>
> - if (STREAM_DEBUG > 0 || s.queue.length > 1)
> + if (STREAM_DEBUG > 1 || s.queue.length > 1)
> console.log(' queue len ' + s.queue.length + ';
> append_okay: ' + s.append_okay);
> }
>
> @@ -1203,10 +1203,11 @@ function listen_for_video_events(stream)
> var video_1_events = [
> "loadstart", "suspend", "emptied", "stalled",
> "loadedmetadata", "loadeddata", "canplay",
> "canplaythrough", "playing", "waiting", "seeking",
> "seeked", "ended", "durationchange",
> - "timeupdate", "play", "pause", "ratechange"
> + "play", "pause", "ratechange"
> ];
>
> var video_2_events = [
> + "timeupdate",
> "progress",
> "resize",
> "volumechange"
More information about the Spice-devel
mailing list