[Spice-devel] [spice-server v2 8/9] reds: add support to ranks for video codecs
Victor Toso
victortoso at redhat.com
Tue Dec 13 17:56:28 UTC 2016
Hi,
On Tue, Dec 13, 2016 at 06:10:17PM +0100, Francois Gouget wrote:
> On Tue, 13 Dec 2016, Victor Toso wrote:
> [...]
> > > Why do you need a rank?
> >
> > To be able to select video-codecs based on both host and client
> > preferences.
>
> I guess that by client you mean the Spice client (spice-gtk).
Any client.. but yeah, I'll implement things in spice-gtk.
> Assuming that's desired, then what you need is a way for the Spice
> client to express preferences. Currently it cannot because all it
> sends to the server is the list of supported codecs as an unordered
> capabilities set. So you'll need to add some sort of message to send a
> preference list. That list can be in the same format as on the server,
> that is an ordered semi-colon separated list of encoder:codec pairs.
Too complex. Client should not care about the encoders in host, only
about the codecs it can decode and some sort of preference order.
The version that I plan to send tomorrow is just an array with the order
of video codecs that client prefer.
> Then armed with both the server's and client's preferences you
> determine which encoder:codec to use.
>
> So I see no need for a rank.
Given the encoder:codecs we need to say, from host point of view:
1-) which one is enabled/disabled
2-) which one should I try to encode *first*
A rank is super simple for that. Set a encoder:codec to 0 to say it is
disabled. If you say that default rank value is 1, any codec with higher
value then 1 should be tried first.
Not sure what is the problem with rank.
> Then there's the issue of whether to pick an encoder:codec pair based
> on the server administrator's wants, or based on the user of the Spic
> client's wants.
>
> Given that encoding is pretty resource intensive and performed on the
> server I consider that the server administrator's preferences should be
> given priority, hence the current scheme where we have a preference list
> on the server and simple capabilities for the client.
Yes, there were some discussion on IRC about preference for encoding.
The Admin/host will have preference, always. The message about client's
preference will sort without changing the rank in spice-server... an
example is always much easier to follow:
1-) gstreamer:mjpeg:0;gstreamer:h264:1;gstreamer:vp8:1;spice:mjpeg:1
-> gstreamer:mjpeg is disabled
-> h264, vp8, spice:mjpeg has the same rank
2-) client sends: vp8, mjpeg, h264
-> array order in spice: gstreamer:vp8, spice:mjpeg, gstreamer:h264
-> gstreamer:mjpeg is still disabled
Many thanks for your input!
Cheers,
toso
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20161213/0ce17a81/attachment.sig>
More information about the Spice-devel
mailing list