[vlc-devel] [PATCH 1/2] vout: add a resize acknowledgement callback
Alexandre Janniaux
ajanni at videolabs.io
Wed Feb 10 08:35:45 UTC 2021
On Wed, Feb 10, 2021 at 07:38:11AM +0100, Steve Lhomme wrote:
> On 2021-02-09 18:04, remi at remlab.net wrote:
> > @@ -214,13 +228,16 @@ typedef struct vout_display_window
> > } vout_display_window_t;
> > static void vout_display_window_ResizeNotify(vout_window_t *window,
> > - unsigned width, unsigned height)
> > + unsigned width, unsigned height,
> > + vout_window_ack_cb cb,
> > + void *opaque)
> > {
> > vout_display_window_t *state = window->owner.sys;
> > vout_thread_t *vout = state->vout;
> > + struct vout_window_ack_data data = { window, cb, opaque };
> > msg_Dbg(window, "resized to %ux%u", width, height);
> > - vout_ChangeDisplaySize(vout, width, height);
> > + vout_ChangeDisplaySize(vout, width, height, vout_window_Ack, &data);
>
> Using a local stack structure forces vout_ChangeDisplaySize() to be
> synchronous. Which is kind of contradictory to using a callback that look
> asynchronous (but is not).
>
> To paraphrase your commit log, that is "leaking the internal
> implementation".
>
I'mn not sure why we need to have vout_ChangeDisplaySize be
asynchronous, since the production of content to the surface
is already asynchronous and vout_Change* functions are all
synchronous. This is just setting the state of the future
rendering.
Regards,
--
Alexandre Janniaux
Videolabs
More information about the vlc-devel
mailing list