Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 001/289 v6] Add a new channel layout API
Date: Wed, 19 Jan 2022 19:55:58 -0300
Message-ID: <c172bc52-eebd-51c2-3231-206200c8dce3@gmail.com> (raw)
In-Reply-To: <ead4d1ea-d11a-f6b6-9c59-97429e60d874@passwd.hu>



On 1/19/2022 5:51 PM, Marton Balint wrote:
> 
> 
> On Tue, 18 Jan 2022, James Almer wrote:
> 
>> From: Anton Khirnov <anton@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.giovara@gmail.com>
>> and James Almer <jamrial@gmail.com>.
>> Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
>> Signed-off-by: James Almer <jamrial@gmail.com>
>> ---
>> 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".

      reply	other threads:[~2022-01-19 22:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-18 22:08 James Almer
2022-01-19 18:07 ` Andreas Rheinhardt
2022-01-20  0:09   ` James Almer
2022-01-20 12:58     ` Michael Niedermayer
2022-01-20 22:42       ` James Almer
2022-01-19 20:51 ` Marton Balint
2022-01-19 22:55   ` James Almer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c172bc52-eebd-51c2-3231-206200c8dce3@gmail.com \
    --to=jamrial@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git