On 5/8/17 8:44 AM, wm4 wrote:
> This is mostly for convenience, so that API users (including possibly
> libavcodec) don't have to duplicate native format mapping tables.
> 
> Not sure if these should really have a device_ctx as argument. hw_format
> is probably enough, but I wasn't sure whether future implementations
> might possibly depend on runtime state. The intention is not to return
> _supported_ formats only, so I don't foresee any actual need for a
> device_ctx, but it might also be short-sighted to require one.

Probably it is safer to keep the argument and maybe it is better to not
take it as AVBufferRef but ask for the unwrapped pointer directly.

> There is also the question what to do if multiple hwcontext
> implementations support the same hw_format. Should (hw_format,
> sw_format) be enough to uniquely map to a native format?

You might want to just return the first or alternatively you could
populate an array, but maybe it is overkill.

lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to