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

Romain Vimont rom1v at videolabs.io
Thu May 14 15:38:04 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 459ac61b738..15464a23054 100644
--- a/modules/video_output/opengl/renderer.c
+++ b/modules/video_output/opengl/renderer.c
@@ -446,6 +446,8 @@ vlc_gl_renderer_New(vlc_gl_t *gl, const struct vlc_gl_api *api,
     sampler->pl_sh = NULL;
     sampler->pl_sh_res = 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 e4286a2011c..88cf7b4b2f3 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.2



More information about the vlc-devel mailing list