[vlc-commits] opengl: pass decoder_device to glconv modules
Thomas Guillem
git at videolan.org
Sun Feb 24 15:21:43 CET 2019
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Sun Feb 24 15:12:53 2019 +0100| [c7a8caf725d9df84651dba1a9d19685b47da6d4d] | committer: Thomas Guillem
opengl: pass decoder_device to glconv modules
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c7a8caf725d9df84651dba1a9d19685b47da6d4d
---
modules/video_output/opengl/converter.h | 4 ++++
modules/video_output/opengl/vout_helper.c | 10 ++++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/modules/video_output/opengl/converter.h b/modules/video_output/opengl/converter.h
index a1dd68c767..ce8846d52d 100644
--- a/modules/video_output/opengl/converter.h
+++ b/modules/video_output/opengl/converter.h
@@ -23,6 +23,7 @@
#include <vlc_plugin.h>
#include <vlc_common.h>
+#include <vlc_codec.h>
#include <vlc_picture_pool.h>
#include <vlc_opengl.h>
@@ -258,6 +259,9 @@ struct opengl_tex_converter_t
/* Pointer to object gl, set by the caller */
vlc_gl_t *gl;
+ /* Pointer to decoder device, set by the caller (can be NULL) */
+ vlc_decoder_device *dec_device;
+
/* libplacebo context, created by the caller (optional) */
struct pl_context *pl_ctx;
diff --git a/modules/video_output/opengl/vout_helper.c b/modules/video_output/opengl/vout_helper.c
index 21e9a57cfe..30283419a3 100644
--- a/modules/video_output/opengl/vout_helper.c
+++ b/modules/video_output/opengl/vout_helper.c
@@ -580,8 +580,9 @@ opengl_deinit_program(vout_display_opengl_t *vgl, struct prgm *prgm)
}
static int
-opengl_init_program(vout_display_opengl_t *vgl, struct prgm *prgm,
- const char *glexts, const video_format_t *fmt, bool subpics,
+opengl_init_program(vout_display_opengl_t *vgl, vlc_video_context *context,
+ struct prgm *prgm, const char *glexts,
+ const video_format_t *fmt, bool subpics,
bool b_dump_shaders)
{
opengl_tex_converter_t *tc =
@@ -646,6 +647,7 @@ opengl_init_program(vout_display_opengl_t *vgl, struct prgm *prgm,
if (desc->plane_count == 0)
{
/* Opaque chroma: load a module to handle it */
+ tc->dec_device = context ? context->device : NULL;
tc->p_module = module_need_var(tc, "glconv", "glconv");
}
@@ -869,7 +871,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
GL_ASSERT_NOERROR();
int ret;
- ret = opengl_init_program(vgl, vgl->prgm, extensions, fmt, false,
+ ret = opengl_init_program(vgl, context, vgl->prgm, extensions, fmt, false,
b_dump_shaders);
if (ret != VLC_SUCCESS)
{
@@ -880,7 +882,7 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
}
GL_ASSERT_NOERROR();
- ret = opengl_init_program(vgl, vgl->sub_prgm, extensions, fmt, true,
+ ret = opengl_init_program(vgl, context, vgl->sub_prgm, extensions, fmt, true,
b_dump_shaders);
if (ret != VLC_SUCCESS)
{
More information about the vlc-commits
mailing list