{channel_layout, ChannelLayoutToChannelCount(channel_layout)},For the es_parser, it seems that `channel_layout` is determined by `adts_parser_.ParseFrameHeader`. Taking a look, this ends up [setting channel_layout](https://source.chromium.org/chromium/chromium/src/+/main:media/formats/mpeg/adts_stream_parser.cc;l=91-92;drc=4544c31a1f99f70e789bf6b278faaa0443d9306e) using [this array](https://source.chromium.org/chromium/chromium/src/+/main:media/formats/mpeg/adts_constants.h;l=27-31;drc=bc7cf067ca6372d86010c2a212dcc28ea0b83df3). I am thinking this is safe, but what do you think?
ChannelLayoutToChannelCount(header.channel_layout)},Similar story, looks like this will [only be mono or stereo](https://source.chromium.org/chromium/chromium/src/+/main:media/formats/mpeg/mpeg1_audio_stream_parser.cc;l=196-197;drc=4544c31a1f99f70e789bf6b278faaa0443d9306e).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
LGTM in general. I would hold off on submitting if you are going to add a `FromLayout` helper.
Update AudioDecoderConfig usage in media/ to provide a ChannelLayoutConfigThe title should be shortened so it at least fits in 80 char, ideally less.
{channel_layout, ChannelLayoutToChannelCount(channel_layout)},For the es_parser, it seems that `channel_layout` is determined by `adts_parser_.ParseFrameHeader`. Taking a look, this ends up [setting channel_layout](https://source.chromium.org/chromium/chromium/src/+/main:media/formats/mpeg/adts_stream_parser.cc;l=91-92;drc=4544c31a1f99f70e789bf6b278faaa0443d9306e) using [this array](https://source.chromium.org/chromium/chromium/src/+/main:media/formats/mpeg/adts_constants.h;l=27-31;drc=bc7cf067ca6372d86010c2a212dcc28ea0b83df3). I am thinking this is safe, but what do you think?
If it's been working so far, this seems ok.
ChannelLayoutToChannelCount(header.channel_layout)},Similar story, looks like this will [only be mono or stereo](https://source.chromium.org/chromium/chromium/src/+/main:media/formats/mpeg/mpeg1_audio_stream_parser.cc;l=196-197;drc=4544c31a1f99f70e789bf6b278faaa0443d9306e).
Acknowledged
{channel_layout, ChannelLayoutToChannelCount(channel_layout)},This pattern occurs a lot. We could potentially add a non templated `FromLayout(ChannelLayout layout)` static helper which does exactly this.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |