On Mon, 24 Jan 2022, James Almer wrote:
From: Anton Khirnov <an...@khirnov.net> The new API is more extensible and allows for custom layouts. More accurate information is exported, eg for decoders that do not set a channel layout, lavc will not make one up for them. Deprecate the old API working with just uint64_t bitmasks. Expanded and completed by Vittorio Giovara <vittorio.giov...@gmail.com> and James Almer <jamr...@gmail.com>. Signed-off-by: Vittorio Giovara <vittorio.giov...@gmail.com> Signed-off-by: James Almer <jamr...@gmail.com> --- Changes since last version: *Both av_channel_layout_describe() and av_channel_layout_from_string() now support a "2 channels (FL+LFE)" syntax, to signal native (usually non-standard) or custom order layouts. *a single decimal value is now interpreted as a mask by av_channel_layout_from_string(), same as a single hexadecimal value. *De-duplicated code by simplifying av_channel_layout_channel_from_string().
AV_CHAN_UNKWNOWN is fixed in the Amibsonic patch, but it should be fixed in this patch.
+/** + * Check whether a channel layout is valid, i.e. can possibly describe audio + * data. + * + * @param channel_layout input channel layout + * @return 1 if channel_layout is valid, 0 otherwise. + */ +int av_channel_layout_check(const AVChannelLayout *channel_layout);
I still find the name av_channel_layout_valid() more readable, but feel free to keep it as is if you disagree.
Thanks, Marton _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".