diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-10-26 00:18:40 +0100 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2017-11-26 21:35:53 +0000 |
commit | 758fbc54fef2f31957b5c5f22e05e5fd9b04f631 (patch) | |
tree | 45b66ac7797cec7968add561498acf75cc4871c2 /libavcodec/mpeg4videodec.c | |
parent | 24cc0a53e99e281b0ff502e82e7cf857111eca3f (diff) | |
download | ffmpeg-758fbc54fef2f31957b5c5f22e05e5fd9b04f631.tar.gz |
lavc: Add hardware config metadata for decoders supporting hardware output
This includes a pointer to the associated hwaccel for decoders using
hwaccels - these will be used later to implement the hwaccel setup
without needing a global list.
Also added is a new file listing all hwaccels as external declarations -
this will be used later to generate the hwaccel list at configure time.
Diffstat (limited to 'libavcodec/mpeg4videodec.c')
-rw-r--r-- | libavcodec/mpeg4videodec.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index 69f455e226..19fcc1bc8f 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -25,6 +25,7 @@ #include "libavutil/internal.h" #include "libavutil/opt.h" #include "error_resilience.h" +#include "hwaccel.h" #include "idctdsp.h" #include "internal.h" #include "mpegutils.h" @@ -2855,4 +2856,19 @@ AVCodec ff_mpeg4_decoder = { .profiles = NULL_IF_CONFIG_SMALL(ff_mpeg4_video_profiles), .update_thread_context = ONLY_IF_THREADS_ENABLED(mpeg4_update_thread_context), .priv_class = &mpeg4_class, + .hw_configs = (const AVCodecHWConfigInternal*[]) { +#if CONFIG_MPEG2_NVDEC_HWACCEL + HWACCEL_NVDEC(mpeg4), +#endif +#if CONFIG_MPEG4_VAAPI_HWACCEL + HWACCEL_VAAPI(mpeg4), +#endif +#if CONFIG_MPEG4_VDPAU_HWACCEL + HWACCEL_VDPAU(mpeg4), +#endif +#if CONFIG_MPEG4_VIDEOTOOLBOX_HWACCEL + HWACCEL_VIDEOTOOLBOX(mpeg4), +#endif + NULL + }, }; |