diff options
author | wm4 <wm4@nowhere> | 2015-11-17 21:07:41 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-11-17 21:21:19 +0100 |
commit | 0ec35fa111391b8069640ba2f616746a1b5530a5 (patch) | |
tree | e5356e8ab396e1c370a7784843f3101d3195469f /options/options.c | |
parent | 25fe9e89e7db1658acac84ec8ac0a292b2e86165 (diff) | |
download | mpv-0ec35fa111391b8069640ba2f616746a1b5530a5.tar.bz2 mpv-0ec35fa111391b8069640ba2f616746a1b5530a5.tar.xz |
videotoolbox: make decoder format customizable
Because apparently there's no ideal universally working format.
The weird OpenGL texture format for kCVPixelFormatType_32BGRA is from:
http://stackoverflow.com/questions/22077544/draw-an-iosurface-to-an-opengl-context
(Which apparently got it from the linked Apple example code.)
Diffstat (limited to 'options/options.c')
-rw-r--r-- | options/options.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/options/options.c b/options/options.c index a42d818c83..fb9237938c 100644 --- a/options/options.c +++ b/options/options.c @@ -308,6 +308,9 @@ const m_option_t mp_opts[] = { OPT_CHOICE_C("hwdec", hwdec_api, 0, mp_hwdec_names), OPT_CHOICE_C("hwdec-preload", vo.hwdec_preload_api, 0, mp_hwdec_names), OPT_STRING("hwdec-codecs", hwdec_codecs, 0), +#if HAVE_VIDEOTOOLBOX_HWACCEL + OPT_IMAGEFORMAT("videotoolbox-format", videotoolbox_format, 0), +#endif OPT_SUBSTRUCT("sws", vo.sws_opts, sws_conf, 0), @@ -804,6 +807,7 @@ const struct MPOpts mp_default_opts = { .screenshot_template = "mpv-shot%n", .hwdec_codecs = "h264,vc1,wmv3,hevc,mpeg2video", + .videotoolbox_format = IMGFMT_NV12, .index_mode = 1, |