[vlc-commits] opengl: expose video format in sampler

Romain Vimont git at videolan.org
Thu Jun 4 11:04:41 CEST 2020


vlc | branch: master | Romain Vimont <rom1v at videolabs.io> | Thu Feb  6 12:02:15 2020 +0100| [84625efcfe3342bca0e43e6e4699c5b2564abfce] | committer: Alexandre Janniaux

opengl: expose video format in sampler

For convenience, expose the video format directly in sampler.

Signed-off-by: Alexandre Janniaux <ajanni at videolabs.io>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=84625efcfe3342bca0e43e6e4699c5b2564abfce
---

 modules/video_output/opengl/sampler.c | 2 ++
 modules/video_output/opengl/sampler.h | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/modules/video_output/opengl/sampler.c b/modules/video_output/opengl/sampler.c
index 6f3ab54c49..ed8c97f462 100644
--- a/modules/video_output/opengl/sampler.c
+++ b/modules/video_output/opengl/sampler.c
@@ -56,6 +56,8 @@ vlc_gl_sampler_New(struct vlc_gl_interop *interop)
     sampler->gl = interop->gl;
     sampler->vt = interop->vt;
 
+    sampler->fmt = &interop->sw_fmt;
+
     sampler->shader.extensions = NULL;
     sampler->shader.body = NULL;
 
diff --git a/modules/video_output/opengl/sampler.h b/modules/video_output/opengl/sampler.h
index 8451cd4298..dd40692843 100644
--- a/modules/video_output/opengl/sampler.h
+++ b/modules/video_output/opengl/sampler.h
@@ -53,6 +53,9 @@ struct vlc_gl_sampler {
     struct vlc_gl_t *gl;
     const opengl_vtable_t *vt;
 
+    /* Input format */
+    const video_format_t *fmt;
+
     struct {
         GLfloat OrientationMatrix[4*4];
         GLfloat TexCoordsMap[PICTURE_PLANE_MAX][3*3];



More information about the vlc-commits mailing list