[Spice-devel] [PATCH 1/2] server: Remove the width and height parameters of encode_frame()
Francois Gouget
fgouget at codeweavers.com
Fri Feb 26 18:20:26 UTC 2016
On Fri, 26 Feb 2016, Frediano Ziglio wrote:
[...]
> Personally I don't understand the "sized" thing. If mjpeg is just a sequence
> of jpeg and if we can't have a single stream (I never saw a video changing
> frame size every frame...) looks like we just compress the images we are
> sending with jpeg... just using crazy protocol and code!
> But as I said I'm far from full comprehension but I won't be surprised that's
> something really wrong.
Videos typically 'change size' when the video player pops up/down a
progress bar at the bottom.
This typically happens with YouTube videos. They typically start with
the progress bar covering the bottom of the video. Then YouTube
progressively 'retracts' the progress bar uncovering the previously
hidden video portion. This causes Spice to detect larger and larger
frames.
Without 'sized stream' support it sends the larger frames independently
of any stream, until it closes the old stream (since it never sees
frames of the right size) and creates a new stream for the larger
frames. This causes it to ignore network bandwidth issues during the
transition, and to rediscover that information from scratch when the new
stream starts. So this can cause dropped frames, stuttering, etc
whenever it happens.
With 'sized streams' it will send frames with the larger size as part of
the existing stream, trying to avoid network congestion the whole time.
If I remember correctly another case where this typically happens is
when SpiceDeferredFPS is set. In that case the server computes the
display changes bounding box and sends that as a video stream so the
frame size changes with the bounding box. Jeremy is the expert on that
one.
--
Francois Gouget <fgouget at codeweavers.com>
More information about the Spice-devel
mailing list