From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 0B62B40511 for ; Mon, 24 Jan 2022 21:09:03 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3A71B68B17E; Mon, 24 Jan 2022 23:09:01 +0200 (EET) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 153E068B0D6 for ; Mon, 24 Jan 2022 23:08:54 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 90E15E66E5 for ; Mon, 24 Jan 2022 22:08:53 +0100 (CET) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6mqrk26E_XbI for ; Mon, 24 Jan 2022 22:08:51 +0100 (CET) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 42951E6618 for ; Mon, 24 Jan 2022 22:08:51 +0100 (CET) Date: Mon, 24 Jan 2022 22:08:51 +0100 (CET) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <20220124204656.48625-1-jamrial@gmail.com> Message-ID: <8a44dca2-4c46-4fcc-5e4f-b2c536a6a28c@passwd.hu> References: <20220124204656.48625-1-jamrial@gmail.com> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 001/293 v8] avutil/channel_layout: Add a new channel layout API X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Mon, 24 Jan 2022, James Almer wrote: > From: Anton Khirnov > > 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 > and James Almer . > Signed-off-by: Vittorio Giovara > Signed-off-by: James Almer > --- > 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-request@ffmpeg.org with subject "unsubscribe".