[FFmpeg-devel] [PATCH] avutil/hwcontext: add flags field to AVHWFramesContext

Mark Thompson sw at jkqxz.net
Tue May 8 00:08:39 EEST 2018

On 07/05/18 21:52, Timo Rothenpieler wrote:
>> Nack.  Implementation-specific details go in the implementation-specific structure (AVHWFramesContext.hwctx).
>> What are you actually thining of using this for?  If you want to add flags which are in common between multiple different implementations then maybe it would be suitable to put it here, but something implementation-specific really shouldn't be.
> I want to add a mapped-frame/dummy mode to the CUDA frame allocator, where it does everything a normal hwframes ctx does, except allocating memory, because the backing memory comes mapped from the cuvid frame.
> Which is a simple flag to set, but there is no way to tell it right now.
> The structures in the struct you mentioned are private to libavutil, so I can't set them from a decoder.

They are public, it's just the frames one for CUDA doesn't currently exist.  You want to make a new AVCUDAFramesContext structure in libavutil/hwcontext_cuda.h.

- Mark

More information about the ffmpeg-devel mailing list