Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(360)

Issue 2752323002: Support Opus Ambisonics playback (Closed)

Created:
3 years, 9 months ago by flim-chromium
Modified:
3 years, 7 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, posciak+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Support Opus Ambisonics playback Opus Ambisonics does not have a prescribed layout, so CHANNEL_LAYOUT_DISCRETE is used. In this case, the audio decoders and renderer also need to know the number of channels. BUG=693745 Review-Url: https://codereview.chromium.org/2752323002 Cr-Commit-Position: refs/heads/master@{#475035} Committed: https://chromium.googlesource.com/chromium/src/+/162236743c74fa040e822ea4d846215e4543791e

Patch Set 1 #

Patch Set 2 : FFmpeg test + enable upmix of audio with discrete channel layout #

Patch Set 3 : +tests #

Total comments: 15

Patch Set 4 : Address Dale's comments #

Patch Set 5 : git cl format #

Patch Set 6 : rebase #

Patch Set 7 : Fix channel layout after rebase and ensure channels > 8 for discrete layout #

Patch Set 8 : If WebAudio is not used and the input channel layout is discrete, default to the hardware layout #

Total comments: 14

Patch Set 9 : +pipeline integration tests, +test media, minor fixes #

Total comments: 6

Patch Set 10 : add webaudio check before rendering discrete + address comments #

Patch Set 11 : rebase #

Patch Set 12 : actually add config_ change #

Total comments: 6

Patch Set 13 : Replace IsWebAudioSource with just DISCRETE layout #

Patch Set 14 : rebase #

Patch Set 15 : Fix issues from rebase #

Total comments: 14

Patch Set 16 : Address comments #

Total comments: 8

Patch Set 17 : 8ch comments + kClockless tests #

Patch Set 18 : rebase to get updated DEPS from CL 2901383003 #

Patch Set 19 : another fix for unreliable ffmpeg channels vs layout #

Unified diffs Side-by-side diffs Delta from patch set Stats (+198 lines, -36 lines) Patch
M media/base/audio_decoder_config.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +5 lines, -0 lines 0 comments Download
M media/base/audio_decoder_config.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +12 lines, -3 lines 0 comments Download
M media/base/fake_audio_renderer_sink.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +4 lines, -0 lines 0 comments Download
M media/base/fake_audio_renderer_sink.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +7 lines, -2 lines 0 comments Download
M media/ffmpeg/ffmpeg_common.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +19 lines, -4 lines 0 comments Download
M media/ffmpeg/ffmpeg_common_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +46 lines, -0 lines 0 comments Download
M media/filters/ffmpeg_audio_decoder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 6 chunks +12 lines, -15 lines 0 comments Download
M media/formats/webm/webm_audio_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +9 lines, -1 line 0 comments Download
M media/renderers/audio_renderer_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M media/renderers/audio_renderer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 8 chunks +21 lines, -11 lines 0 comments Download
M media/renderers/audio_renderer_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +23 lines, -0 lines 0 comments Download
A media/test/data/bear-opus-11ch-channelmapping2.ogg View 1 2 3 4 5 6 7 8 Binary file 0 comments Download
A media/test/data/bear-opus-4ch-channelmapping2.ogg View 1 2 3 4 5 6 7 8 Binary file 0 comments Download
A media/test/data/bear-opus-end-trimming-11ch-channelmapping2.webm View 1 2 3 4 5 6 7 8 Binary file 0 comments Download
A media/test/data/bear-opus-end-trimming-4ch-channelmapping2.webm View 1 2 3 4 5 6 7 8 Binary file 0 comments Download
M media/test/pipeline_integration_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +36 lines, -0 lines 0 comments Download

Messages

Total messages: 57 (14 generated)
flim-chromium
3 years, 9 months ago (2017-03-18 00:03:53 UTC) #3
DaleCurtis
https://codereview.chromium.org/2752323002/diff/40001/media/base/audio_decoder_config.h File media/base/audio_decoder_config.h (right): https://codereview.chromium.org/2752323002/diff/40001/media/base/audio_decoder_config.h#newcode66 media/base/audio_decoder_config.h:66: void set_channels_for_discrete(int channels) { Should be SetChannelsForDiscrete(), since hacker_style() ...
3 years, 9 months ago (2017-03-20 17:38:58 UTC) #4
flim-chromium
https://codereview.chromium.org/2752323002/diff/40001/media/base/audio_decoder_config.h File media/base/audio_decoder_config.h (right): https://codereview.chromium.org/2752323002/diff/40001/media/base/audio_decoder_config.h#newcode66 media/base/audio_decoder_config.h:66: void set_channels_for_discrete(int channels) { On 2017/03/20 17:38:58, DaleCurtis wrote: ...
3 years, 9 months ago (2017-03-22 06:20:51 UTC) #5
DaleCurtis
https://codereview.chromium.org/2752323002/diff/40001/media/filters/ffmpeg_audio_decoder.cc File media/filters/ffmpeg_audio_decoder.cc (right): https://codereview.chromium.org/2752323002/diff/40001/media/filters/ffmpeg_audio_decoder.cc#newcode93 media/filters/ffmpeg_audio_decoder.cc:93: ChannelLayout channel_layout = is_opus_ambisonics On 2017/03/22 at 06:20:51, flim-chromium ...
3 years, 9 months ago (2017-03-22 18:56:30 UTC) #6
flim-chromium
Thanks for the review so far. The latest patch (8) also ensures that if the ...
3 years, 8 months ago (2017-03-29 03:15:25 UTC) #7
hongchan
Most of files live in /media and I am not familiar with the code base. ...
3 years, 8 months ago (2017-03-29 16:20:17 UTC) #8
DaleCurtis
https://codereview.chromium.org/2752323002/diff/140001/content/renderer/media/audio_renderer_mixer_manager.cc File content/renderer/media/audio_renderer_mixer_manager.cc (right): https://codereview.chromium.org/2752323002/diff/140001/content/renderer/media/audio_renderer_mixer_manager.cc#newcode73 content/renderer/media/audio_renderer_mixer_manager.cc:73: // If the input has discrete channel layout, the ...
3 years, 8 months ago (2017-03-29 22:46:55 UTC) #9
DaleCurtis
Can you add a media/test/pipeline_integration_test for this? Overall this seems fine.
3 years, 8 months ago (2017-03-29 22:47:43 UTC) #10
flim-chromium
Sure, the pipeline tests have been added. https://codereview.chromium.org/2752323002/diff/140001/content/renderer/media/audio_renderer_mixer_manager.cc File content/renderer/media/audio_renderer_mixer_manager.cc (right): https://codereview.chromium.org/2752323002/diff/140001/content/renderer/media/audio_renderer_mixer_manager.cc#newcode73 content/renderer/media/audio_renderer_mixer_manager.cc:73: // If ...
3 years, 8 months ago (2017-03-30 19:35:13 UTC) #11
DaleCurtis
https://codereview.chromium.org/2752323002/diff/140001/content/renderer/media/audio_renderer_mixer_manager.cc File content/renderer/media/audio_renderer_mixer_manager.cc (right): https://codereview.chromium.org/2752323002/diff/140001/content/renderer/media/audio_renderer_mixer_manager.cc#newcode73 content/renderer/media/audio_renderer_mixer_manager.cc:73: // If the input has discrete channel layout, the ...
3 years, 8 months ago (2017-03-30 20:22:21 UTC) #12
flim-chromium
https://codereview.chromium.org/2752323002/diff/140001/content/renderer/media/audio_renderer_mixer_manager.cc File content/renderer/media/audio_renderer_mixer_manager.cc (right): https://codereview.chromium.org/2752323002/diff/140001/content/renderer/media/audio_renderer_mixer_manager.cc#newcode73 content/renderer/media/audio_renderer_mixer_manager.cc:73: // If the input has discrete channel layout, the ...
3 years, 8 months ago (2017-03-31 00:12:14 UTC) #13
DaleCurtis
https://codereview.chromium.org/2752323002/diff/140001/content/renderer/media/audio_renderer_mixer_manager.cc File content/renderer/media/audio_renderer_mixer_manager.cc (right): https://codereview.chromium.org/2752323002/diff/140001/content/renderer/media/audio_renderer_mixer_manager.cc#newcode73 content/renderer/media/audio_renderer_mixer_manager.cc:73: // If the input has discrete channel layout, the ...
3 years, 8 months ago (2017-03-31 19:06:53 UTC) #14
flim-chromium
https://codereview.chromium.org/2752323002/diff/140001/content/renderer/media/audio_renderer_mixer_manager.cc File content/renderer/media/audio_renderer_mixer_manager.cc (right): https://codereview.chromium.org/2752323002/diff/140001/content/renderer/media/audio_renderer_mixer_manager.cc#newcode73 content/renderer/media/audio_renderer_mixer_manager.cc:73: // If the input has discrete channel layout, the ...
3 years, 8 months ago (2017-04-05 18:19:35 UTC) #15
DaleCurtis
Hmm, this isn't quite what I was expecting. I thought you would intercept the GetOutputDeviceInfo() ...
3 years, 8 months ago (2017-04-05 23:17:15 UTC) #16
DaleCurtis
https://codereview.chromium.org/2752323002/diff/220001/media/base/output_device_info.h File media/base/output_device_info.h (right): https://codereview.chromium.org/2752323002/diff/220001/media/base/output_device_info.h#newcode51 media/base/output_device_info.h:51: void SetIsWebAudioSource(bool value); Sorry skimmed review due to time ...
3 years, 8 months ago (2017-04-06 19:44:42 UTC) #17
flim-chromium
https://codereview.chromium.org/2752323002/diff/220001/media/base/output_device_info.h File media/base/output_device_info.h (right): https://codereview.chromium.org/2752323002/diff/220001/media/base/output_device_info.h#newcode51 media/base/output_device_info.h:51: void SetIsWebAudioSource(bool value); On 2017/04/06 19:44:42, DaleCurtis wrote: > ...
3 years, 8 months ago (2017-04-07 22:01:43 UTC) #18
DaleCurtis
https://codereview.chromium.org/2752323002/diff/220001/media/blink/webaudiosourceprovider_impl.cc File media/blink/webaudiosourceprovider_impl.cc (right): https://codereview.chromium.org/2752323002/diff/220001/media/blink/webaudiosourceprovider_impl.cc#newcode259 media/blink/webaudiosourceprovider_impl.cc:259: info = sink_->GetOutputDeviceInfo(); On 2017/04/07 at 22:01:43, flim-chromium wrote: ...
3 years, 8 months ago (2017-04-10 19:38:52 UTC) #20
Raymond Toy
https://codereview.chromium.org/2752323002/diff/220001/media/blink/webaudiosourceprovider_impl.cc File media/blink/webaudiosourceprovider_impl.cc (right): https://codereview.chromium.org/2752323002/diff/220001/media/blink/webaudiosourceprovider_impl.cc#newcode259 media/blink/webaudiosourceprovider_impl.cc:259: info = sink_->GetOutputDeviceInfo(); On 2017/04/10 19:38:51, DaleCurtis wrote: > ...
3 years, 8 months ago (2017-04-11 21:51:39 UTC) #21
hongchan
On 2017/04/11 21:51:39, Raymond Toy wrote: > https://codereview.chromium.org/2752323002/diff/220001/media/blink/webaudiosourceprovider_impl.cc > File media/blink/webaudiosourceprovider_impl.cc (right): > > https://codereview.chromium.org/2752323002/diff/220001/media/blink/webaudiosourceprovider_impl.cc#newcode259 ...
3 years, 8 months ago (2017-04-13 18:01:53 UTC) #22
flim-chromium
On 2017/04/13 18:01:53, hongchan wrote: > On 2017/04/11 21:51:39, Raymond Toy wrote: > > > ...
3 years, 8 months ago (2017-04-15 01:20:11 UTC) #23
hongchan
On 2017/04/15 01:20:11, flim-chromium wrote: > On 2017/04/13 18:01:53, hongchan wrote: > > On 2017/04/11 ...
3 years, 8 months ago (2017-04-21 21:16:48 UTC) #24
DaleCurtis
On 2017/04/21 at 21:16:48, hongchan wrote: > On 2017/04/15 01:20:11, flim-chromium wrote: > > > ...
3 years, 8 months ago (2017-04-21 21:38:00 UTC) #25
DaleCurtis
On 2017/04/21 at 21:38:00, DaleCurtis wrote: > On 2017/04/21 at 21:16:48, hongchan wrote: > > ...
3 years, 8 months ago (2017-04-21 21:39:31 UTC) #26
flim-chromium
On 2017/04/21 21:39:31, DaleCurtis wrote: > On 2017/04/21 at 21:38:00, DaleCurtis wrote: > > On ...
3 years, 8 months ago (2017-04-24 20:34:15 UTC) #27
DaleCurtis
I'd just change the default signature to take an empty parameter set by default.
3 years, 8 months ago (2017-04-24 20:41:30 UTC) #28
DaleCurtis
(i think that change should probably be done in a different Cl prior to landing ...
3 years, 8 months ago (2017-04-24 20:41:57 UTC) #29
flim-chromium
On 2017/04/24 20:41:57, DaleCurtis wrote: > (i think that change should probably be done in ...
3 years, 8 months ago (2017-04-24 20:45:59 UTC) #30
flim-chromium
On 2017/04/24 20:45:59, flim-chromium wrote: > On 2017/04/24 20:41:57, DaleCurtis wrote: > > (i think ...
3 years, 7 months ago (2017-05-24 00:25:13 UTC) #32
DaleCurtis
https://codereview.chromium.org/2752323002/diff/300001/media/base/audio_decoder_config.h File media/base/audio_decoder_config.h (right): https://codereview.chromium.org/2752323002/diff/300001/media/base/audio_decoder_config.h#newcode66 media/base/audio_decoder_config.h:66: void SetChannelsForDiscrete(int channels) { should be in .cc file. ...
3 years, 7 months ago (2017-05-24 00:49:59 UTC) #33
flim-chromium
Thanks for looking! I'd also realized the check for webaudio in ARI wasn't narrow enough ...
3 years, 7 months ago (2017-05-25 00:04:26 UTC) #34
DaleCurtis
https://codereview.chromium.org/2752323002/diff/300001/media/ffmpeg/ffmpeg_common.cc File media/ffmpeg/ffmpeg_common.cc (right): https://codereview.chromium.org/2752323002/diff/300001/media/ffmpeg/ffmpeg_common.cc#newcode333 media/ffmpeg/ffmpeg_common.cc:333: is_opus_discrete && codec_context->channels > 8 On 2017/05/25 at 00:04:25, ...
3 years, 7 months ago (2017-05-25 00:29:16 UTC) #35
flim-chromium
https://codereview.chromium.org/2752323002/diff/300001/media/test/pipeline_integration_test.cc File media/test/pipeline_integration_test.cc (right): https://codereview.chromium.org/2752323002/diff/300001/media/test/pipeline_integration_test.cc#newcode569 media/test/pipeline_integration_test.cc:569: TEST_F(PipelineIntegrationTest, BasicPlaybackOpusOgg_4ch_ChannelMapping2) { On 2017/05/25 00:29:16, DaleCurtis wrote: > ...
3 years, 7 months ago (2017-05-25 00:46:06 UTC) #36
DaleCurtis
https://codereview.chromium.org/2752323002/diff/300001/media/test/pipeline_integration_test.cc File media/test/pipeline_integration_test.cc (right): https://codereview.chromium.org/2752323002/diff/300001/media/test/pipeline_integration_test.cc#newcode569 media/test/pipeline_integration_test.cc:569: TEST_F(PipelineIntegrationTest, BasicPlaybackOpusOgg_4ch_ChannelMapping2) { On 2017/05/25 at 00:46:06, flim-chromium wrote: ...
3 years, 7 months ago (2017-05-25 00:53:38 UTC) #37
flim-chromium
https://codereview.chromium.org/2752323002/diff/300001/media/test/pipeline_integration_test.cc File media/test/pipeline_integration_test.cc (right): https://codereview.chromium.org/2752323002/diff/300001/media/test/pipeline_integration_test.cc#newcode569 media/test/pipeline_integration_test.cc:569: TEST_F(PipelineIntegrationTest, BasicPlaybackOpusOgg_4ch_ChannelMapping2) { On 2017/05/25 00:53:38, DaleCurtis wrote: > ...
3 years, 7 months ago (2017-05-25 02:16:42 UTC) #38
DaleCurtis
https://codereview.chromium.org/2752323002/diff/320001/media/ffmpeg/ffmpeg_common.cc File media/ffmpeg/ffmpeg_common.cc (right): https://codereview.chromium.org/2752323002/diff/320001/media/ffmpeg/ffmpeg_common.cc#newcode333 media/ffmpeg/ffmpeg_common.cc:333: is_opus_discrete && codec_context->channels > 8 Add a note about ...
3 years, 7 months ago (2017-05-25 18:51:01 UTC) #39
DaleCurtis
lgtm % those fixes.
3 years, 7 months ago (2017-05-25 18:51:17 UTC) #40
flim-chromium
Thanks for your patient review! https://codereview.chromium.org/2752323002/diff/300001/media/test/pipeline_integration_test.cc File media/test/pipeline_integration_test.cc (right): https://codereview.chromium.org/2752323002/diff/300001/media/test/pipeline_integration_test.cc#newcode569 media/test/pipeline_integration_test.cc:569: TEST_F(PipelineIntegrationTest, BasicPlaybackOpusOgg_4ch_ChannelMapping2) { On ...
3 years, 7 months ago (2017-05-25 22:00:40 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2752323002/360001
3 years, 7 months ago (2017-05-25 22:01:52 UTC) #44
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/435147)
3 years, 7 months ago (2017-05-25 22:43:38 UTC) #46
flim-chromium
Sorry Dale, one more small change in ffmpeg_audio_decoder.cc to fix the case when there is ...
3 years, 7 months ago (2017-05-26 16:16:19 UTC) #51
DaleCurtis
lgtm
3 years, 7 months ago (2017-05-26 16:48:44 UTC) #52
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2752323002/380001
3 years, 7 months ago (2017-05-26 16:50:45 UTC) #54
commit-bot: I haz the power
3 years, 7 months ago (2017-05-26 16:55:48 UTC) #57
Message was sent while issue was closed.
Committed patchset #19 (id:380001) as
https://chromium.googlesource.com/chromium/src/+/162236743c74fa040e822ea4d846...

Powered by Google App Engine
This is Rietveld 408576698