diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-03-04 23:57:30 +0000 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2017-06-14 22:26:32 +0100 |
commit | 06043cc0bc72b530db352a67776392cf61a54104 (patch) | |
tree | a231ad41bad12b7ab393981b59a0eee1accb5b44 /ffmpeg.h | |
parent | 0b1794a43e1083644aa3db2a09323681cfe080ec (diff) | |
download | ffmpeg-06043cc0bc72b530db352a67776392cf61a54104.tar.gz |
ffmpeg: Generic device setup
Not yet enabled for any hwaccels.
(cherry picked from commit d2e6dd32a445b5744a51d090c0822dbd7e434592)
(cherry picked from commit 9203aac22874c7259e155b7d00f1f33bb1355129)
Diffstat (limited to 'ffmpeg.h')
-rw-r--r-- | ffmpeg.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -42,6 +42,7 @@ #include "libavutil/dict.h" #include "libavutil/eval.h" #include "libavutil/fifo.h" +#include "libavutil/hwcontext.h" #include "libavutil/pixfmt.h" #include "libavutil/rational.h" #include "libavutil/threadmessage.h" @@ -74,8 +75,15 @@ typedef struct HWAccel { int (*init)(AVCodecContext *s); enum HWAccelID id; enum AVPixelFormat pix_fmt; + enum AVHWDeviceType device_type; } HWAccel; +typedef struct HWDevice { + char *name; + enum AVHWDeviceType type; + AVBufferRef *device_ref; +} HWDevice; + /* select an input stream for an output stream */ typedef struct StreamMap { int disabled; /* 1 is this mapping is disabled by a negative map */ @@ -661,4 +669,13 @@ int vaapi_decode_init(AVCodecContext *avctx); int vaapi_device_init(const char *device); int cuvid_init(AVCodecContext *s); +HWDevice *hw_device_get_by_name(const char *name); +int hw_device_init_from_string(const char *arg, HWDevice **dev); +void hw_device_free_all(void); + +int hw_device_setup_for_decode(InputStream *ist); +int hw_device_setup_for_encode(OutputStream *ost); + +int hwaccel_decode_init(AVCodecContext *avctx); + #endif /* FFMPEG_H */ |