[Spice-devel] [PATCH 2/2] server: Store the opaque pointer in VideoEncoderRateControlCbs

Francois Gouget fgouget at codeweavers.com
Fri Feb 26 17:45:43 UTC 2016


On Fri, 26 Feb 2016, Jonathon Jongsma wrote:

> On Fri, 2016-02-26 at 04:45 -0500, Frediano Ziglio wrote:
> > > 
> > > It has the same lifetime as the corresponding structure so this
> > > simplifies keeping track of it.
> > > 
> > > Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
> > 
> > This it's quite new in the callback style but I quite like.
> > Jonathon pointed out similar issue yesterday (opaque is separate from
> > callbacks).
> 
> Yeah, I think this is an improvement, and could possible be done in a couple
> other places. I wonder if we should make this a little more generic though and
> add a free function to the callback structure in case opaque needs to be freed?

I'm of the opinion of keeping it simple and adding further callbacks 
when / if needed.


-- 
Francois Gouget <fgouget at codeweavers.com>


More information about the Spice-devel mailing list