[vlc-devel] [PATCH 06/17] opengl: reference interop from sampler

Romain Vimont rom1v at videolabs.io
Thu Apr 2 14:24:19 CEST 2020


This allows to use an interop instance without a renderer.
---
 modules/video_output/opengl/renderer.c | 2 ++
 modules/video_output/opengl/sampler.h  | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/modules/video_output/opengl/renderer.c b/modules/video_output/opengl/renderer.c
index a588b57c33..874490ac96 100644
--- a/modules/video_output/opengl/renderer.c
+++ b/modules/video_output/opengl/renderer.c
@@ -441,6 +441,8 @@ vlc_gl_renderer_New(vlc_gl_t *gl, const struct vlc_gl_api *api,
     if (!sampler)
         return NULL;
 
+    sampler->interop = interop;
+
     struct vlc_gl_renderer *renderer = calloc(1, sizeof(*renderer));
     if (!renderer)
     {
diff --git a/modules/video_output/opengl/sampler.h b/modules/video_output/opengl/sampler.h
index e4286a2011..88cf7b4b2f 100644
--- a/modules/video_output/opengl/sampler.h
+++ b/modules/video_output/opengl/sampler.h
@@ -85,6 +85,8 @@ struct vlc_gl_sampler {
         unsigned int i_visible_width;
         unsigned int i_visible_height;
     } last_source;
+
+    struct vlc_gl_interop *interop;
 };
 
 #endif
-- 
2.26.0



More information about the vlc-devel mailing list