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 0CCDD40417 for ; Wed, 19 Jan 2022 22:56:11 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id F3AED68B18D; Thu, 20 Jan 2022 00:56:08 +0200 (EET) Received: from mail-ot1-f50.google.com (mail-ot1-f50.google.com [209.85.210.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B347B68B0E3 for ; Thu, 20 Jan 2022 00:56:02 +0200 (EET) Received: by mail-ot1-f50.google.com with SMTP id a10-20020a9d260a000000b005991bd6ae3eso5202223otb.11 for ; Wed, 19 Jan 2022 14:56:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :references:from:in-reply-to:content-transfer-encoding; bh=tKbgw4sdJoz/8EHe9ABkK17BrjJD00TP/yPY6ycda2o=; b=S4ngx5WtfNbvmrf4TCHZppVfblYryR/5PsZMtLjEO0fQUXySq4mVyj6em0KmsMAuH0 z9IkK8l1i9iHggyzY1f1PiWDgGQsBnaWDAVzzRXulW/8ssF6GJ2c96WkgtK2UcUWMNq+ ENUyd8CNzQaSIJiOy49lk2Ul0TC7gvEMqMH1GI8Y4ome3XdO25bSF7jZgViuumNyT2Uv hjwIi0Xlb/6lQj6pqBehJ000apWExOGB0W4VR7lfIZ4MU3rLVuh7KHkW9CinJXk/gy+1 5A37bgAvND0Zic1/7R5z/krEMi9D5WQ9ojW6MgfbEeRihjU0hSsAhcgclnm9BibekQCq lisg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:references:from:in-reply-to :content-transfer-encoding; bh=tKbgw4sdJoz/8EHe9ABkK17BrjJD00TP/yPY6ycda2o=; b=f66ARorE+M8d3hW++eiXHcKLYn76bdsxovR9p8rZ2CqBhKHrxauM85bRAL+LBQ4b74 aSmlZsEUg/DTVGD13NSGpPKitiD+SVwhkU9uvKXRwDtHYavJEyamIz5joz+7tVfyKuZR aTpQ3Pc5tUnC8hPcly2UJmH63XZkBmsCm5LFwwJIM/sq7YB3oAzuQubbiOBsqPV7rD3n 7QkV/FCN0m/DuyjZXcRDFTRRvJc3lhFuAKlsYk0xfdjx5EJ7s1VBYYZrpnP/eGBy3i70 7knMkFeHxH9jYAPyxY07/vOgW4czX8MNIQCggbEb0Ogqwo1AkA2EMRj1IhtLm1QhcEiV Ta7g== X-Gm-Message-State: AOAM530f19quRjcywXvYQ6rUSXQL7nLljfaDu2R32bPtHIJs/gDgXHg2 un8YXGs5Wu8ZtdVpQ49eNNGQUSvDs8M= X-Google-Smtp-Source: ABdhPJyHaRyxf680V1dmA54+JGMNNA5K4QanVOs5x96W14I+Qnqwc05E1lpNOiRvZKsjL2SdGFSR1g== X-Received: by 2002:a9d:37a2:: with SMTP id x31mr26125196otb.51.1642632960590; Wed, 19 Jan 2022 14:56:00 -0800 (PST) Received: from [192.168.0.13] ([186.136.131.95]) by smtp.gmail.com with ESMTPSA id q9sm483199otc.78.2022.01.19.14.55.59 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 19 Jan 2022 14:56:00 -0800 (PST) Message-ID: Date: Wed, 19 Jan 2022 19:55:58 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Content-Language: en-US To: ffmpeg-devel@ffmpeg.org References: <20220118220856.34097-1-jamrial@gmail.com> From: James Almer In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 001/289 v6] 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 1/19/2022 5:51 PM, Marton Balint wrote: > > > On Tue, 18 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: >> >> *av_channel_layout_from_string() and av_channel_layout_describe() now >> support >> a "designation@name" syntax, effectively making both functions reciprocal >> when there are custom names in some or all channels. >> It's the syntax suggested by Marton and is both extensible if required >> and >> not too ulgy in human readable output if the string is printed verbatim. >> >> *av_channel_layout_index_from_string() and >> av_channel_layout_channel_from_string() also support this syntax now. > > I have two suggestions. None of them is actually blocking, but since > they concern public syntax and API it might be better to decide now. > > av_channel_layout_index_from_string() without "@" in the string matches > both builtin names (designations) and custom names. I suggest for it to > only match builtin names. If a user wants to match by custom name, > "@name" may be specified without a designation. This keeps the two > namespaces separate. Ok, look into implementing this. > > av_channel_layout_channel_from_string() is an API which is not used in > the codebase. I am not enterely sure about its purpose, so maybe it > should be removed for now, and only added later, if some code actually > needs it. Since you can set custom names and query them without the designation, it can be useful as a shortcut for "idx = av_channel_layout_index_from_string(str) && av_channel_layout_channel_from_index(idx)". If there were no custom names then yeah, there would be no point to it. > > 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". _______________________________________________ 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".