diff options
author | Timo Rothenpieler <timo@rothenpieler.org> | 2023-06-16 21:35:45 +0200 |
---|---|---|
committer | Timo Rothenpieler <timo@rothenpieler.org> | 2023-06-16 22:10:42 +0200 |
commit | 16fdb48e0dead244bddf3a0ae9d459d02b4443b1 (patch) | |
tree | 4753cd95dd72607e766dc4b2866e10575d8dcd56 /libavcodec/nvenc.h | |
parent | 6c418ae25ede55fa1f896a7449ebaffd18886002 (diff) | |
download | ffmpeg-16fdb48e0dead244bddf3a0ae9d459d02b4443b1.tar.gz |
avcodec/nvenc: handle frame durations and AV_CODEC_CAP_ENCODER_REORDERED_OPAQUE
Diffstat (limited to 'libavcodec/nvenc.h')
-rw-r--r-- | libavcodec/nvenc.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h index 55ec199211..3a4b456a41 100644 --- a/libavcodec/nvenc.h +++ b/libavcodec/nvenc.h @@ -31,6 +31,7 @@ typedef void ID3D11Device; #include <ffnvcodec/nvEncodeAPI.h> #include "compat/cuda/dynlink_loader.h" +#include "libavutil/buffer.h" #include "libavutil/fifo.h" #include "libavutil/opt.h" #include "hwconfig.h" @@ -95,6 +96,18 @@ typedef struct NvencSurface NV_ENC_BUFFER_FORMAT format; } NvencSurface; +typedef struct NvencFrameData +{ + int64_t duration; + +#if FF_API_REORDERED_OPAQUE + int64_t reordered_opaque; +#endif + + void *frame_opaque; + AVBufferRef *frame_opaque_ref; +} NvencFrameData; + typedef struct NvencDynLoadFunctions { CudaFunctions *cuda_dl; @@ -173,6 +186,10 @@ typedef struct NvencContext int nb_surfaces; NvencSurface *surfaces; + NvencFrameData *frame_data_array; + int frame_data_array_nb; + int frame_data_array_pos; + AVFifo *unused_surface_queue; AVFifo *output_surface_queue; AVFifo *output_surface_ready_queue; |