lavc: vdpau: Add support for new hw_frames_ctx and hw_device_ctx API

This supports retrieving the device from a provided hw_frames_ctx, and
automatically creating a hw_frames_ctx if hw_device_ctx is set.

The old API is not deprecated yet. The user can still use
av_vdpau_bind_context() (with or without setting hw_frames_ctx), or use
the API before that by allocating and setting hwaccel_context manually.

Cherry-picked from Libav commit 1a7ddba5.
(Adds missing APIchanges entry to the Libav version.)

Reviewed-by: Mark Thompson <sw@jkqxz.net>
This commit is contained in:
wm4
2017-03-04 23:57:33 +00:00
parent 156bd8278f
commit 7e4ba776a2
4 changed files with 80 additions and 28 deletions

View File

@ -15,6 +15,11 @@ libavutil: 2015-08-28
API changes, most recent first:
2017-03-xx - xxxxxxx - lavc 57.85.101 - avcodec.h
vdpau hardware accelerated decoding now supports the new hwaccel API, which
can create the decoder context and allocate hardware frame automatically.
See AVCodecContext.hw_device_ctx and AVCodecContext.hw_frames_ctx.
2017-03-xx - xxxxxxx - lavc 57.85.100 - avcodec.h
Add AVCodecContext.hwaccel_flags field. This will control some hwaccels at
a later point.