Re: [spice v10 06/27] server: Let the administrator pick the video encoder and codec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 04, 2016 at 12:04:45AM +0100, Francois Gouget wrote:
> On Thu, 3 Mar 2016, Christophe Fergeau wrote:
> [...]
> > > +void display_channel_set_video_codecs(DisplayChannel *display, GArray *video_codecs)
> > > +{
> > > +    spice_return_if_fail(display);
> > > +
> > > +    g_array_set_size(display->video_codecs, 0);
> > > +    g_array_insert_vals(display->video_codecs, 0, video_codecs->data, video_codecs->len);
> > > +}
> > 
> > I would do something like
> > g_array_unref(display->video_codecs);
> > display->video_codecs = g_array_ref(video_codecs);
> 
> This implies treating the video_codecs GArray as an immutable object. 
> The object we pass through the dispatch message is the one 
> reds_set_video_codecs() modifies so this should be changed there too. 
> That could work. Is there a way to indicate we don't want this GArray to 
> be modified?

Ah, I forgot to mention it in the previous email, but indeed, this needs to be changed
both here and in reds_set_video_codecs() at the same time. I don't think
GArray can be marked as immutable to avoid mistakes. If you prefer
to keep explicit copies so that it's clear that the data is not going to
be modified through another pointer, that's fine with me.
> 
> 
> [...]
> > > +SPICE_GNUC_VISIBLE int spice_server_set_video_codecs(SpiceServer *s, const char *video_codecs)
> [...]
> > Regarding the public API this can be tweaked later, but I'm not sure at
> > all this is going to be enough. I suspect when integrating this into
> > QEMU, libvirt will need to know whether gstreamer is supported, and
> > maybe the codecs which are available. If so, this would mean we would
> > get a nicer API than this string based one which coud be used instead.
> > 
> > I haven't done much research on this yet though, so maybe this is
> > enough, will need to check :)
> 
> Yes, they may prefer to split this up at the XML level. Do you know of 
> settings where libvirt queries whether certain values are supported or 
> not?

In general, QEMU is querying what a given binary supports, it's doing it
for disable copy and paste support, Marc-André recently sent patches to
detect the GL parameters, ... This was briefly discussed in
https://lists.freedesktop.org/archives/spice-devel/2015-January/018692.html
and the few mails after this one.

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]