[vlc-devel] [PATCH 03/24] opengl: add interop close() callback

Steve Lhomme robux4 at ycbcr.xyz
Tue Jan 28 09:01:33 CET 2020


On 2020-01-27 21:19, Romain Vimont wrote:
> Use a callback to close an interop instead of relying on closing the
> module.
> 
> This allows to properly close interop_sw, which is not a module.
> ---
>   modules/video_output/opengl/interop.h         |  6 +++++
>   modules/video_output/opengl/interop_android.c |  6 ++---
>   modules/video_output/opengl/interop_cvpx.c    |  6 ++---
>   modules/video_output/opengl/interop_sw.c      | 22 ++++++++++---------
>   modules/video_output/opengl/interop_vaapi.c   |  6 ++---
>   modules/video_output/opengl/interop_vdpau.c   |  8 +++----
>   modules/video_output/opengl/vout_helper.c     |  4 ++--
>   7 files changed, 33 insertions(+), 25 deletions(-)
> 
> diff --git a/modules/video_output/opengl/interop.h b/modules/video_output/opengl/interop.h
> index 3aa19adf71..4d4667efa6 100644
> --- a/modules/video_output/opengl/interop.h
> +++ b/modules/video_output/opengl/interop.h
> @@ -92,6 +92,12 @@ struct vlc_gl_interop_ops {
>        */
>       const float *
>       (*get_transform_matrix)(const struct vlc_gl_interop *interoporter);
> +
> +    /**
> +     * Called before the interop is destroyed

You should tell if it can be NULL or not like other callbacks. If it 
can't you need an assert in opengl_init_program().

> +     */
> +    void
> +    (*close)(struct vlc_gl_interop *interop);
>   };
>   
>   struct vlc_gl_interop {


More information about the vlc-devel mailing list