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

Issue 12316131: Moved AudioUtil static functions to AudioManager interfaces (Closed)

Created:
7 years, 9 months ago by no longer working on chromium
Modified:
7 years, 9 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, sail+watch_chromium.org, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Moved AudioUtil static functions: GetAudioHardwareSampleRate GetAudioInputHardwareSampleRate GetAudioHardwareBufferSize GetAudioInputHardwareChannelLayout to AudioManager interfaces: GetDefaultOutputStreamParameters() GetDefaultInputStreamParameters(const std::string& device_id) By doing this, we remove the messy ifdef statements in AudioUtil, allow getting the native sample rate for Pulse, each AudioManager is responsible for providing the optimal audio params to achieve the best audio performance, for example, cras can raise the buffer size to reduce CPU consumption without affecting other Linux products. BUG=178142, 137326, 120319 TEST=media_unittests, content_unittests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=186180

Patch Set 1 : #

Total comments: 17

Patch Set 2 : merged GetPreferredLowLatencyOutputStreamParameters to GetDefaultOutputStreamParameters #

Total comments: 15

Patch Set 3 : addressed Dale and Chris' comments. #

Patch Set 4 : fixed the bots. #

Total comments: 2

Patch Set 5 : made the GetPreferredOutputStreamParameters protected #

Unified diffs Side-by-side diffs Delta from patch set Stats (+493 lines, -340 lines) Patch
M content/browser/renderer_host/media/audio_input_device_manager.cc View 1 2 chunks +5 lines, -7 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.cc View 2 2 chunks +4 lines, -2 lines 0 comments Download
M content/browser/renderer_host/render_message_filter.cc View 1 2 3 4 3 chunks +14 lines, -7 lines 0 comments Download
M content/renderer/media/webrtc_audio_device_unittest.cc View 1 2 3 6 chunks +17 lines, -11 lines 0 comments Download
M media/audio/android/audio_manager_android.h View 1 2 3 4 2 chunks +5 lines, -2 lines 0 comments Download
M media/audio/android/audio_manager_android.cc View 1 2 3 3 chunks +42 lines, -14 lines 0 comments Download
M media/audio/audio_input_volume_unittest.cc View 1 1 chunk +3 lines, -22 lines 0 comments Download
M media/audio/audio_low_latency_input_output_unittest.cc View 1 2 4 chunks +11 lines, -17 lines 0 comments Download
M media/audio/audio_manager.h View 1 2 1 chunk +12 lines, -0 lines 0 comments Download
M media/audio/audio_manager_base.h View 1 2 3 4 2 chunks +12 lines, -9 lines 0 comments Download
M media/audio/audio_manager_base.cc View 1 2 3 3 chunks +11 lines, -17 lines 0 comments Download
M media/audio/audio_output_proxy_unittest.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M media/audio/audio_util.h View 1 chunk +0 lines, -16 lines 0 comments Download
M media/audio/audio_util.cc View 1 chunk +0 lines, -118 lines 0 comments Download
M media/audio/cras/audio_manager_cras.h View 1 2 3 4 2 chunks +5 lines, -2 lines 0 comments Download
M media/audio/cras/audio_manager_cras.cc View 1 2 4 chunks +35 lines, -10 lines 0 comments Download
M media/audio/ios/audio_manager_ios.h View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M media/audio/ios/audio_manager_ios.mm View 1 2 3 3 chunks +30 lines, -0 lines 0 comments Download
M media/audio/linux/audio_manager_linux.h View 1 2 3 4 2 chunks +5 lines, -2 lines 0 comments Download
M media/audio/linux/audio_manager_linux.cc View 1 2 6 chunks +40 lines, -19 lines 0 comments Download
M media/audio/mac/audio_device_listener_mac.cc View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M media/audio/mac/audio_low_latency_input_mac.cc View 1 2 3 4 2 chunks +6 lines, -2 lines 0 comments Download
M media/audio/mac/audio_low_latency_output_mac.cc View 1 2 3 4 2 chunks +6 lines, -2 lines 0 comments Download
M media/audio/mac/audio_manager_mac.h View 1 2 3 4 2 chunks +5 lines, -2 lines 0 comments Download
M media/audio/mac/audio_manager_mac.cc View 1 2 5 chunks +33 lines, -14 lines 0 comments Download
M media/audio/mock_audio_manager.h View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M media/audio/mock_audio_manager.cc View 1 2 2 chunks +10 lines, -0 lines 0 comments Download
M media/audio/openbsd/audio_manager_openbsd.h View 1 2 3 4 2 chunks +5 lines, -0 lines 0 comments Download
M media/audio/openbsd/audio_manager_openbsd.cc View 1 2 5 chunks +38 lines, -0 lines 0 comments Download
M media/audio/pulse/audio_manager_pulse.h View 1 2 3 4 3 chunks +8 lines, -3 lines 0 comments Download
M media/audio/pulse/audio_manager_pulse.cc View 1 2 4 chunks +31 lines, -15 lines 0 comments Download
M media/audio/win/audio_manager_win.h View 1 2 3 4 2 chunks +5 lines, -2 lines 0 comments Download
M media/audio/win/audio_manager_win.cc View 1 2 3 6 chunks +80 lines, -22 lines 0 comments Download
M media/audio/win/audio_output_win_unittest.cc View 1 2 3 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 25 (0 generated)
no longer working on chromium
Dale and Tommi, could you please review this CL? Thanks, SX
7 years, 9 months ago (2013-02-26 18:27:15 UTC) #1
DaleCurtis
Nice work Shijing! We should figure out how to collapse the two methods we have ...
7 years, 9 months ago (2013-02-27 02:46:11 UTC) #2
no longer working on chromium
Hi Dale, I got a visitor from Munich and would work on the UI things ...
7 years, 9 months ago (2013-02-27 19:44:17 UTC) #3
Chris Rogers
+rtoy for Android changes
7 years, 9 months ago (2013-02-27 19:54:37 UTC) #4
Chris Rogers
Looks pretty good! Just to let you know, I'm working on a change which affects ...
7 years, 9 months ago (2013-02-27 20:06:14 UTC) #5
Raymond Toy (Google)
Looks good, except for one small question. https://codereview.chromium.org/12316131/diff/4001/media/audio/android/audio_manager_android.cc File media/audio/android/audio_manager_android.cc (right): https://codereview.chromium.org/12316131/diff/4001/media/audio/android/audio_manager_android.cc#newcode63 media/audio/android/audio_manager_android.cc:63: static const ...
7 years, 9 months ago (2013-02-28 00:30:45 UTC) #6
Chris Rogers
On 2013/02/28 00:30:45, rtoy wrote: > Looks good, except for one small question. > > ...
7 years, 9 months ago (2013-02-28 00:32:50 UTC) #7
tommi (sloooow) - chröme
This is a very welcome change. I've got a few comments (and sorry for the ...
7 years, 9 months ago (2013-03-01 11:29:29 UTC) #8
no longer working on chromium
Hi, I think I have already addressed all the comments. The biggest change in this ...
7 years, 9 months ago (2013-03-01 16:44:33 UTC) #9
DaleCurtis
lgtm % some nits. Though all this passing of AudioParameters around by copy is making ...
7 years, 9 months ago (2013-03-02 01:53:56 UTC) #10
Chris Rogers
Looking very good: https://codereview.chromium.org/12316131/diff/18001/content/browser/renderer_host/media/media_stream_manager.cc File content/browser/renderer_host/media/media_stream_manager.cc (right): https://codereview.chromium.org/12316131/diff/18001/content/browser/renderer_host/media/media_stream_manager.cc#newcode857 content/browser/renderer_host/media/media_stream_manager.cc:857: media::AudioParameters()); It seems clunky to have ...
7 years, 9 months ago (2013-03-04 01:04:11 UTC) #11
no longer working on chromium
https://codereview.chromium.org/12316131/diff/18001/content/renderer/media/webrtc_audio_capturer.cc File content/renderer/media/webrtc_audio_capturer.cc (right): https://codereview.chromium.org/12316131/diff/18001/content/renderer/media/webrtc_audio_capturer.cc#newcode54 content/renderer/media/webrtc_audio_capturer.cc:54: if (sample_rate == 44100) On 2013/03/02 01:53:56, DaleCurtis wrote: ...
7 years, 9 months ago (2013-03-04 14:55:04 UTC) #12
DaleCurtis
still lgtm % interface nit. https://codereview.chromium.org/12316131/diff/12006/media/audio/audio_manager_base.h File media/audio/audio_manager_base.h (right): https://codereview.chromium.org/12316131/diff/12006/media/audio/audio_manager_base.h#newcode91 media/audio/audio_manager_base.h:91: virtual AudioParameters GetPreferredOutputStreamParameters( Move ...
7 years, 9 months ago (2013-03-05 01:40:53 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/12316131/36001
7 years, 9 months ago (2013-03-05 10:09:23 UTC) #14
no longer working on chromium
Landing soon. Thanks for all. SX https://codereview.chromium.org/12316131/diff/12006/media/audio/audio_manager_base.h File media/audio/audio_manager_base.h (right): https://codereview.chromium.org/12316131/diff/12006/media/audio/audio_manager_base.h#newcode91 media/audio/audio_manager_base.h:91: virtual AudioParameters GetPreferredOutputStreamParameters( ...
7 years, 9 months ago (2013-03-05 10:09:35 UTC) #15
commit-bot: I haz the power
Presubmit check for 12316131-36001 failed and returned exit status 1. INFO:root:Found 34 file(s). Running presubmit ...
7 years, 9 months ago (2013-03-05 10:09:36 UTC) #16
no longer working on chromium
Nico, can I have your owner stamp for content/browser/renderer_host/render_message_filter.cc? Thanks, SX
7 years, 9 months ago (2013-03-05 10:16:27 UTC) #17
Nico
lgtm
7 years, 9 months ago (2013-03-05 10:23:19 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/12316131/36001
7 years, 9 months ago (2013-03-05 10:29:16 UTC) #19
no longer working on chromium
On 2013/03/05 10:23:19, Nico wrote: > lgtm Nice! It is super quick one.
7 years, 9 months ago (2013-03-05 10:29:44 UTC) #20
commit-bot: I haz the power
Retried try job too often on win7_aura for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win7_aura&number=16341
7 years, 9 months ago (2013-03-05 11:52:17 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/12316131/36001
7 years, 9 months ago (2013-03-05 12:02:40 UTC) #22
commit-bot: I haz the power
Change committed as 186180
7 years, 9 months ago (2013-03-05 15:31:47 UTC) #23
DaleCurtis
This morning I remembered the --audio-buffer-size flag; your CL breaks its functionality. Can you fix ...
7 years, 9 months ago (2013-03-05 18:26:26 UTC) #24
no longer working on chromium
7 years, 9 months ago (2013-03-06 22:37:40 UTC) #25
Thanks for the message, I will fix it tomorrow.


On Tue, Mar 5, 2013 at 7:26 PM, <dalecurtis@chromium.org> wrote:

> This morning I remembered the --audio-buffer-size flag; your CL breaks its
> functionality.  Can you fix this in a followup CL? On Linux and Mac the
> flag is
> important for compatibility and debugging issues still.
>
> The code to use the flag is still in audio_util.cc too, so that should be
> cleaned up.
>
>
https://codereview.chromium.**org/12316131/<https://codereview.chromium.org/1...
>

Powered by Google App Engine
This is Rietveld 408576698