On Mon, Mar 21, 2016 at 07:43:20PM +0100, Francois Gouget wrote: > A completely different approach to solving this would be to handle it > all in the GStreamer encoder code: > - Only ref the RedDrawable once but wrap it in a struct with its own > refcount. It's that struct which will track the actual refcounting by > the GstMemory objects. > - When that struct's refcount drops to zero, put the RedDrawable into a > GAsyncQueue. > - encode_frame() is always called from a safe thread, so unref all the > RedDrawables in the async queue whenever we enter / leave > encode_frame() or destroy the GStreamer encoder. > > The drawback is that we could get up to a 1 frame delay before a > RedDrawable is freed. I forgot to mention that this approach is fine for me if fighting with glib mainloop stuff is not going well. Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel