From c6fafbffaca16959dfa2b4bf1eb97861ad66b5ef Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 10 Aug 2017 17:48:33 +0200 Subject: vo_opengl: separate hwdec context and mapping, port it to use ra This does two separate rather intrusive things: 1. Make the hwdec context (which does initialization, provides the device to the decoder, and other basic state) and frame mapping (getting textures from a mp_image) separate. This is more flexible, and you could map multiple images at once. It will help removing some hwdec special-casing from video.c. 2. Switch all hwdec API use to ra. Of course all code is still GL specific, but in theory it would be possible to support other backends. The most important change is that the hwdec interop returns ra objects, instead of anything GL specific. This removes the last dependency on GL-specific header files from video.c. I'm mixing these separate changes because both requires essentially rewriting all the glue code, so better do them at once. For the same reason, this change isn't done incrementally. hwdec_ios.m is untested, since I can't test it. Apart from superficial mistakes, this also requires dealing with Apple's texture format fuckups: they force you to use GL_LUMINANCE[_ALPHA] instead of GL_RED and GL_RG. We also need to report the correct format via ra_tex to the renderer, which is done by find_la_variant(). It's unknown whether this works correctly. hwdec_rpi.c as well as vo_rpi.c are still broken. (I need to pull my RPI out of a dusty pile of devices and cables, so, later.) --- options/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'options') diff --git a/options/options.c b/options/options.c index b07c576d4f..b13d9e5803 100644 --- a/options/options.c +++ b/options/options.c @@ -179,7 +179,7 @@ static const m_option_t mp_vo_opt_list[] = { #endif #if HAVE_GL OPT_STRING_VALIDATE("opengl-hwdec-interop", gl_hwdec_interop, 0, - gl_hwdec_validate_opt), + ra_hwdec_validate_opt), OPT_REPLACED("hwdec-preload", "opengl-hwdec-interop"), #endif {0} -- cgit v1.2.3