videotoolbox: add hwcontext support
authorwm4 <nfxjfg@googlemail.com>
Mon, 15 May 2017 09:27:24 +0000 (11:27 +0200)
committerwm4 <nfxjfg@googlemail.com>
Mon, 15 May 2017 09:30:36 +0000 (11:30 +0200)
commit532b23f079b52f4789be1f20ce232286ce4ffa13
tree2d826fd0046a1c4f2feeb072971292348812b93b
parent2c6179aa829e6f50eea6faf47b2b6efd7650a41d
videotoolbox: add hwcontext support

This adds tons of code for no other benefit than making VideoToolbox
support conform with the new hwaccel API (using hw_device_ctx and
hw_frames_ctx).

Since VideoToolbox decoding does not actually require the user to
allocate frames, the new code does mostly nothing.

One benefit is that ffmpeg_videotoolbox.c can be dropped once generic
hwaccel support for ffmpeg.c is merged from Libav.

Does not consider VDA or VideoToolbox encoding.

Fun fact: the frame transfer functions are copied from vaapi, as the
mapping makes copying generic boilerplate. Mapping itself is not
exported by the VT code, because I don't know how to test.
doc/APIchanges
libavcodec/vda_vt_internal.h
libavcodec/version.h
libavcodec/videotoolbox.c
libavutil/Makefile
libavutil/hwcontext.c
libavutil/hwcontext.h
libavutil/hwcontext_internal.h
libavutil/hwcontext_videotoolbox.c [new file with mode: 0644]
libavutil/hwcontext_videotoolbox.h [new file with mode: 0644]
libavutil/version.h