[vlc-devel] [PATCH 1/5] macosx: store the vout_window_t in the VLCOpenGLVideoView

Steve Lhomme robux4 at ycbcr.xyz
Mon Nov 2 16:18:11 CET 2020


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



More information about the vlc-devel mailing list