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 248054909F for ; Thu, 1 Feb 2024 20:01:50 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A5ED268D0B1; Thu, 1 Feb 2024 22:01:47 +0200 (EET) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3A81968C69B for ; Thu, 1 Feb 2024 22:01:41 +0200 (EET) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 9AB39E9D49 for ; Thu, 1 Feb 2024 21:01:39 +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 f_WM-vQ0_83J for ; Thu, 1 Feb 2024 21:01:38 +0100 (CET) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 0E946E95FB for ; Thu, 1 Feb 2024 21:01:38 +0100 (CET) Date: Thu, 1 Feb 2024 21:01:37 +0100 (CET) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <170677781445.8914.8380277934131001805@lain.khirnov.net> Message-ID: References: <20240129232755.9622-1-cus@passwd.hu> <20240129232755.9622-3-cus@passwd.hu> <170677781445.8914.8380277934131001805@lain.khirnov.net> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 3/5] avutil/channel_layout: add av_channel_layout_from_custom() 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 Thu, 1 Feb 2024, Anton Khirnov wrote: > Quoting Marton Balint (2024-01-30 00:27:53) >> Signed-off-by: Marton Balint >> --- >> doc/APIchanges | 3 +++ >> libavutil/channel_layout.c | 20 ++++++++++++++++++++ >> libavutil/channel_layout.h | 13 +++++++++++++ >> libavutil/version.h | 4 ++-- >> 4 files changed, 38 insertions(+), 2 deletions(-) >> >> diff --git a/doc/APIchanges b/doc/APIchanges >> index e477ed78e0..8e8498f803 100644 >> --- a/doc/APIchanges >> +++ b/doc/APIchanges >> @@ -2,6 +2,9 @@ The last version increases of all libraries were on 2023-02-09 >> >> API changes, most recent first: >> >> +2024-02-xx - xxxxxxxxxx - lavu 58.37.100 - channel_layout.h >> + Add av_channel_layout_from_custom(). > > The name seems misleading to me, there is no 'custom' from which a > channel layout is derived. > > It should be something like av_channel_layout_custom_init() instead. The other initializer functions follow the av_channel_layout_from_* pattern. But I can rename of course if that is preferred. > >> +/** >> + * Initialize a custom channel layout with the specified number of channels. >> + * The designation of all channels will be unknown. >> + * >> + * @param channel_layout the layout structure to be initialized >> + * @param nb_channels the number of channels >> + * >> + * @return 0 on success >> + * AVERROR(EINVAL) if the number of channels <= 0 >> + * AVERROR(ENOMEM) if the channel map could not be allocated >> + */ > > It should say that this is a convenience helper, so people don't think > this is the only way to build custom layouts. > It should also explicitly say it allocates the channel map array. Ok, will send v2. 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".