diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-03-04 23:57:28 +0000 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2017-06-14 22:25:57 +0100 |
commit | b22172f6f3530b8bd9d1d2c38a31b1e9c3729e42 (patch) | |
tree | 481a74e995b2bd82dba7eebee805eac5e2708598 /libavutil/hwcontext_internal.h | |
parent | 92bd08974541611731b2d58723826ea26ecbe47d (diff) | |
download | ffmpeg-b22172f6f3530b8bd9d1d2c38a31b1e9c3729e42.tar.gz |
hwcontext: Add device derivation
Creates a new device context from another of a different type which
refers to the same underlying hardware.
(cherry picked from commit b266ad56fe0e4ce5bb70118ba2e2b1dabfaf76ce)
Diffstat (limited to 'libavutil/hwcontext_internal.h')
-rw-r--r-- | libavutil/hwcontext_internal.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavutil/hwcontext_internal.h b/libavutil/hwcontext_internal.h index cf05323e15..6451c0e2c5 100644 --- a/libavutil/hwcontext_internal.h +++ b/libavutil/hwcontext_internal.h @@ -66,6 +66,8 @@ typedef struct HWContextType { int (*device_create)(AVHWDeviceContext *ctx, const char *device, AVDictionary *opts, int flags); + int (*device_derive)(AVHWDeviceContext *dst_ctx, + AVHWDeviceContext *src_ctx, int flags); int (*device_init)(AVHWDeviceContext *ctx); void (*device_uninit)(AVHWDeviceContext *ctx); @@ -95,6 +97,12 @@ typedef struct HWContextType { struct AVHWDeviceInternal { const HWContextType *hw_type; void *priv; + + /** + * For a derived device, a reference to the original device + * context it was derived from. + */ + AVBufferRef *source_device; }; struct AVHWFramesInternal { |