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 6459F495D1 for ; Tue, 13 Feb 2024 20:27:47 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 885B868D17B; Tue, 13 Feb 2024 22:27:45 +0200 (EET) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B2DD968CEBB for ; Tue, 13 Feb 2024 22:27:38 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 2F234E9E1B for ; Tue, 13 Feb 2024 21:27:38 +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 1rQtMDSrGeYu for ; Tue, 13 Feb 2024 21:27:34 +0100 (CET) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 29373E9D44 for ; Tue, 13 Feb 2024 21:27:34 +0100 (CET) Date: Tue, 13 Feb 2024 21:27:34 +0100 (CET) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <68db378c-53a5-4288-a94e-627588d02baa@gmail.com> Message-ID: <791f9b20-d5a9-956e-a68a-15c116c6cd7d@passwd.hu> References: <20240212211537.18468-1-cus@passwd.hu> <20240212211537.18468-2-cus@passwd.hu> <68db378c-53a5-4288-a94e-627588d02baa@gmail.com> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 2/5] avutil/channel_layout: add AV_CHANNEL_ORDER_NB 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 Tue, 13 Feb 2024, James Almer wrote: > On 2/12/2024 6:15 PM, Marton Balint wrote: >> Signed-off-by: Marton Balint >> --- >> libavutil/channel_layout.h | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/libavutil/channel_layout.h b/libavutil/channel_layout.h >> index b8bff6f365..db0c005e87 100644 >> --- a/libavutil/channel_layout.h >> +++ b/libavutil/channel_layout.h >> @@ -146,6 +146,10 @@ enum AVChannelOrder { >> * as defined in AmbiX format $ 2.1. >> */ >> AV_CHANNEL_ORDER_AMBISONIC, >> + /** >> + * Number of channel orders, not part of ABI/API >> + */ >> + AV_CHANNEL_ORDER_NB >> }; > > Is it worth adding this to a public header just to limit a loop in a test? A > loop that fwiw still depends on an array that needs to be updated with more > names if you add new orders. Several other enums also have this. So API consistency can be considered a more important factor. > > IMO, just do FF_ARRAY_ELEMS(channel_order_names) in the test. Then adding a new channel order would not show up as breakage in the test. I have no strong preference though, and can change it if you still want me to. Regards, 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".