[vlc-devel] [PATCH v2 1/4] macosx: store the vout_window_t in the VLCOpenGLVideoView
Alexandre Janniaux
ajanni at videolabs.io
Tue Nov 3 10:12:23 CET 2020
Hi,
Again storing the window changes nothing to the problem,
you can get an instance of the vout_window from the vout
display and it can disappear just like vout_display can
disappear. Additionally, you cannot wait for an event
coming from the main thread in Close() because the main
thread can be stuck waiting for the vout to close,
without running the main loop.
Regards,
--
Alexandre Janniaux
Videolabs
On Tue, Nov 03, 2020 at 08:46:44AM +0100, Steve Lhomme wrote:
> This value is not going to change the life of the module so doesn't need any
> locking.
> ---
> modules/video_output/macosx.m | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/modules/video_output/macosx.m b/modules/video_output/macosx.m
> index 9ce48deaafc..bcb71579d68 100644
> --- a/modules/video_output/macosx.m
> +++ b/modules/video_output/macosx.m
> @@ -96,8 +96,10 @@ vlc_module_end ()
> @interface VLCOpenGLVideoView : NSOpenGLView
> {
> vout_display_t *vd;
> + vout_window_t *window;
> BOOL _hasPendingReshape;
> }
> +- (void)setVoutWindow:(vout_window_t *)aWindow;
> - (void)setVoutDisplay:(vout_display_t *)vd;
> - (void)setVoutFlushing:(BOOL)flushing;
> @end
> @@ -189,6 +191,7 @@ static int Open (vout_display_t *vd, const vout_display_cfg_t *cfg,
> goto error;
> }
>
> + [sys->glView setVoutWindow:cfg->window];
> [sys->glView setVoutDisplay:vd];
>
> /* We don't wait, that means that we'll have to be careful about releasing
> @@ -528,6 +531,11 @@ static void OpenglSwap (vlc_gl_t *gl)
> [self setFrame:[parentView bounds]];
> }
>
> +- (void)setVoutWindow:(vout_window_t *)aWindow
> +{
> + window = aWindow;
> +}
> +
> /**
> * Gets called by the Close and Open methods.
> * (Non main thread).
> --
> 2.26.2
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list