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

Jonathon Jongsma jjongsma at redhat.com
Fri Feb 26 17:47:16 UTC 2016


On Fri, 2016-02-26 at 18:45 +0100, Francois Gouget wrote:
> 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.
> 


You're right, it's probably not worth it in this case.



More information about the Spice-devel mailing list