[Spice-devel] [spice v8] dcc: handle preferred video codec message
Victor Toso
victortoso at redhat.com
Mon Feb 20 09:55:16 UTC 2017
Hi,
On Fri, Feb 10, 2017 at 02:14:11PM +0100, Victor Toso wrote:
> Hi,
>
> On Fri, Feb 10, 2017 at 07:51:05AM -0500, Frediano Ziglio wrote:
> > > [0] SPICE_MSGC_DISPLAY_PREFERRED_VIDEO_CODEC_TYPE
> > >
> > > This message provides a list of video codecs based on client's order
> > > of preference.
> > >
> > > We duplicate the video codecs array from reds.c and sort it using the
> > > order of codecs as reference.
> > >
> > > This message will not change an ongoing streaming but it could change
> > > newly created streams depending the rank value of each video codec
> > > that can be set by spice_server_set_video_codecs()
> > >
> > > Signed-off-by: Victor Toso <victortoso at redhat.com>
> > > ---
> > > server/dcc-private.h | 5 ++
> > > server/dcc.c | 126
> > > +++++++++++++++++++++++++++++++++++++++++++++++
> > > server/dcc.h | 1 +
> > > server/display-channel.c | 2 +
> > > server/stream.c | 5 +-
> > > 5 files changed, 138 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/server/dcc-private.h b/server/dcc-private.h
> > > index 64b32a7..dd54c70 100644
> > > --- a/server/dcc-private.h
> > > +++ b/server/dcc-private.h
> > > @@ -51,6 +51,11 @@ struct DisplayChannelClientPrivate
> > > int num_pixmap_cache_items;
> > > } send_data;
> > >
> > > + /* Host prefererred video-codec order sorted with client preferred */
> > > + GArray *preferred_video_codecs;
> >
> > I know this patch is important but every time I arrive here I ask
> > "array of what?" and I close the email.
>
> Ah :(
>
> >
> > C has type[] or type*... GArray is an array of everything you want...
> > I don't like it!
>
> I used GArray here to keep consistency as we already use GArray for this
> RedVideoCodec struct in other places and this code actually interact
> with it.
>
> I don't mind moving it to GPtrArray, at least you know that it will be
> an array of pointers.
>
> Let me know what you think as while I was discussion with Pavel this
> morning, he find out another issue in the patch, which I plan to fix it
> in a followup patch later on.
Ping
>
> PS: You do read the spice code tons of time more then I do, so I might
> not agree but I would do the change for what you think is more legible
> here (unless others disagree, of course)
>
> Cheers,
> toso
>
> >
> > Frediano
> > _______________________________________________
> > Spice-devel mailing list
> > Spice-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- 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/20170220/c71ca40f/attachment.sig>
More information about the Spice-devel
mailing list