diff options
author | Clément Bœsch <cboesch@gopro.com> | 2017-09-05 15:58:13 +0200 |
---|---|---|
committer | Clément Bœsch <cboesch@gopro.com> | 2017-10-23 11:56:15 +0200 |
commit | 2b320318273b74df6e1b712fb33544d6a1b26be1 (patch) | |
tree | 0cc5c6a275835ef0d56d5b94a26c2287fd347fc0 /fftools | |
parent | 3605b312f65c4a009301d2d165e2db8d68063acb (diff) | |
download | ffmpeg-streaming-2b320318273b74df6e1b712fb33544d6a1b26be1.zip ffmpeg-streaming-2b320318273b74df6e1b712fb33544d6a1b26be1.tar.gz |
lavc: drop VDA
Deprecated (aka removed) in OSX 10.11, and we have a replacement for it
(VideoToolbox).
Diffstat (limited to 'fftools')
-rw-r--r-- | fftools/ffmpeg.h | 2 | ||||
-rw-r--r-- | fftools/ffmpeg_opt.c | 6 | ||||
-rw-r--r-- | fftools/ffmpeg_videotoolbox.c | 45 |
3 files changed, 5 insertions, 48 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 888f772..0db481d 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -63,7 +63,6 @@ enum HWAccelID { HWACCEL_AUTO, HWACCEL_VDPAU, HWACCEL_DXVA2, - HWACCEL_VDA, HWACCEL_VIDEOTOOLBOX, HWACCEL_QSV, HWACCEL_VAAPI, @@ -661,7 +660,6 @@ int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame); int ffmpeg_parse_options(int argc, char **argv); -int vda_init(AVCodecContext *s); int videotoolbox_init(AVCodecContext *s); int qsv_init(AVCodecContext *s); int cuvid_init(AVCodecContext *s); diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 5009203..2fa5d6d 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -78,10 +78,6 @@ const HWAccel hwaccels[] = { { "dxva2", hwaccel_decode_init, HWACCEL_DXVA2, AV_PIX_FMT_DXVA2_VLD, AV_HWDEVICE_TYPE_DXVA2 }, #endif -#if CONFIG_VDA - { "vda", videotoolbox_init, HWACCEL_VDA, AV_PIX_FMT_VDA, - AV_HWDEVICE_TYPE_NONE }, -#endif #if CONFIG_VIDEOTOOLBOX { "videotoolbox", videotoolbox_init, HWACCEL_VIDEOTOOLBOX, AV_PIX_FMT_VIDEOTOOLBOX, AV_HWDEVICE_TYPE_NONE }, @@ -3631,7 +3627,7 @@ const OptionDef options[] = { { "hwaccel_output_format", OPT_VIDEO | OPT_STRING | HAS_ARG | OPT_EXPERT | OPT_SPEC | OPT_INPUT, { .off = OFFSET(hwaccel_output_formats) }, "select output format used with HW accelerated decoding", "format" }, -#if CONFIG_VDA || CONFIG_VIDEOTOOLBOX +#if CONFIG_VIDEOTOOLBOX { "videotoolbox_pixfmt", HAS_ARG | OPT_STRING | OPT_EXPERT, { &videotoolbox_pixfmt}, "" }, #endif { "hwaccels", OPT_EXIT, { .func_arg = show_hwaccels }, diff --git a/fftools/ffmpeg_videotoolbox.c b/fftools/ffmpeg_videotoolbox.c index e903965..b820aec 100644 --- a/fftools/ffmpeg_videotoolbox.c +++ b/fftools/ffmpeg_videotoolbox.c @@ -23,12 +23,7 @@ #endif #include "libavcodec/avcodec.h" -#if CONFIG_VDA -# include "libavcodec/vda.h" -#endif -#if CONFIG_VIDEOTOOLBOX -# include "libavcodec/videotoolbox.h" -#endif +#include "libavcodec/videotoolbox.h" #include "libavutil/imgutils.h" #include "ffmpeg.h" @@ -114,15 +109,7 @@ static void videotoolbox_uninit(AVCodecContext *s) av_frame_free(&vt->tmp_frame); - if (ist->hwaccel_id == HWACCEL_VIDEOTOOLBOX) { -#if CONFIG_VIDEOTOOLBOX - av_videotoolbox_default_free(s); -#endif - } else { -#if CONFIG_VDA - av_vda_default_free(s); -#endif - } + av_videotoolbox_default_free(s); av_freep(&ist->hwaccel_ctx); } @@ -147,8 +134,7 @@ int videotoolbox_init(AVCodecContext *s) goto fail; } - if (ist->hwaccel_id == HWACCEL_VIDEOTOOLBOX) { -#if CONFIG_VIDEOTOOLBOX + // TODO: reindent if (!videotoolbox_pixfmt) { ret = av_videotoolbox_default_init(s); } else { @@ -166,31 +152,8 @@ int videotoolbox_init(AVCodecContext *s) ret = av_videotoolbox_default_init2(s, vtctx); CFRelease(pixfmt_str); } -#endif - } else { -#if CONFIG_VDA - if (!videotoolbox_pixfmt) { - ret = av_vda_default_init(s); - } else { - AVVDAContext *vdactx = av_vda_alloc_context(); - CFStringRef pixfmt_str = CFStringCreateWithCString(kCFAllocatorDefault, - videotoolbox_pixfmt, - kCFStringEncodingUTF8); -#if HAVE_UTGETOSTYPEFROMSTRING - vdactx->cv_pix_fmt_type = UTGetOSTypeFromString(pixfmt_str); -#else - av_log(s, loglevel, "UTGetOSTypeFromString() is not available " - "on this platform, %s pixel format can not be honored from " - "the command line\n", videotoolbox_pixfmt); -#endif - ret = av_vda_default_init2(s, vdactx); - CFRelease(pixfmt_str); - } -#endif - } if (ret < 0) { - av_log(NULL, loglevel, - "Error creating %s decoder.\n", ist->hwaccel_id == HWACCEL_VIDEOTOOLBOX ? "Videotoolbox" : "VDA"); + av_log(NULL, loglevel, "Error creating Videotoolbox decoder.\n"); goto fail; } |