On Thursday 09 June 2011 17:36:16 Stefano Sabatini wrote:
> On date Thursday 2011-06-09 13:25:25 +0300, Mina Nagy Zaki encoded:
> > The list type was changed to int64_t to be able to hold
> > channel layouts.
> > 
> > Usage of avfilter_make_format_list for PixelFromats/[AV]SampleFormats
> > had to be changed to use int64_t[] instead of enums, as they are 32bit.
> 
> I discussed this with Mina and this looked like the best solution for
> avoiding separate int/int64_t functions. If you have reasons to think
> there are better solutions, please comment.
> 
[...]

Ok, I just realized there's a *third* option. Keep all the 32 bit ints and 
drop support for any channel layouts that have more than 32 channels. I was 
told that it was originally int64 to support formats that can do more than 32 
channels. Right now though, the only value defined that's outside the int32 
range is the value for AV_CH_LAYOUT_NATIVE which is unapplicable to channel 
layout negotiation anyway.

This way, no breaking ABI/API, no losing type-safety. It's just that filters 
will not support more than 32 channels. FFmpeg itself doesn't support it, and 
int64 is only there for *possibly* supporting it. So I don't see what's wrong. 
If we ever support it in FFmpeg, we can make the int64 change in lavfi then. 

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

Reply via email to