aboutsummaryrefslogtreecommitdiffhomepage
path: root/video/out/gl_hwdec.c
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2015-07-07 14:53:58 +0200
committerGravatar wm4 <wm4@nowhere>2015-07-07 15:05:32 +0200
commit92727e7332cd8c9237552675fd8e8dba9b1a4127 (patch)
treeca66eb301794513652a994eeb3bd0eb56cb4b1c0 /video/out/gl_hwdec.c
parent1d29177c5c150e700cace0c875185c6fa5e92d3c (diff)
vo_opengl_cb, vo_opengl: add option for preloading hwdec context
See manpage additions. This is mainly useful for vo_opengl_cb, but can also be applied to vo_opengl. On a side note, gl_hwdec_load_api() should stop using a name string, and instead always use the IDs. This should be cleaned up another time.
Diffstat (limited to 'video/out/gl_hwdec.c')
-rw-r--r--video/out/gl_hwdec.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/gl_hwdec.c b/video/out/gl_hwdec.c
index ba15950129..f491694e48 100644
--- a/video/out/gl_hwdec.c
+++ b/video/out/gl_hwdec.c
@@ -86,6 +86,12 @@ struct gl_hwdec *gl_hwdec_load_api(struct mp_log *log, GL *gl,
return NULL;
}
+// Like gl_hwdec_load_api(), but use HWDEC_... identifiers.
+struct gl_hwdec *gl_hwdec_load_api_id(struct mp_log *log, GL *gl, int id)
+{
+ return gl_hwdec_load_api(log, gl, m_opt_choice_str(mp_hwdec_names, id));
+}
+
void gl_hwdec_uninit(struct gl_hwdec *hwdec)
{
if (hwdec)