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

Issue 9570014: Move some generic functions to AudioManagerBase to be inherited by platform-specific AudioManager*** (Closed)

Created:
8 years, 9 months ago by no longer working on chromium
Modified:
8 years, 9 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Moved the implementations of ReleaseOutputStream() and ReleaseInputStream() to AudioManagerBase and let all the AudioManagerPlatforms inherit the same implementations. Also moved the MakeAudioOutputStream() and MakeAudioInputStream() to AudioManagerBase, separate the AUDIO_PCM_LINEAR mode and AUDIO_PCM_LOW_LATENCY mode into two different functions inside the AudioManagerPlatforms. So that the structure is clearer and also easier to deprecate the AUDIO_PCM_LINEAR for the future. Made the destructor of the AudioManagerPlatforms protected so it can be called by only the AudioManagerBase. BUG=116064 TEST=media_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=125389

Patch Set 1 #

Total comments: 1

Patch Set 2 : small changes on the code, ready for review #

Total comments: 7

Patch Set 3 : fix the memory leak in the alsa unittests #

Total comments: 26

Patch Set 4 : addressed tommi's comments and changed alsa unittest to use Close() to delete stream #

Total comments: 6

Patch Set 5 : changed the GetMaxOutputStreamsAllowed #

Total comments: 17

Patch Set 6 : addressed Andrew's comments and fixed the media_unittests on Mac #

Patch Set 7 : rebased and fixed windows compiling #

Unified diffs Side-by-side diffs Delta from patch set Stats (+620 lines, -514 lines) Patch
M media/audio/android/audio_manager_android.h View 1 2 3 4 1 chunk +10 lines, -4 lines 0 comments Download
M media/audio/android/audio_manager_android.cc View 1 2 3 4 5 2 chunks +28 lines, -19 lines 0 comments Download
M media/audio/audio_input_volume_unittest.cc View 1 2 3 4 5 6 1 chunk +4 lines, -1 line 0 comments Download
M media/audio/audio_manager_base.h View 1 2 3 4 5 4 chunks +40 lines, -2 lines 0 comments Download
M media/audio/audio_manager_base.cc View 1 2 3 4 5 3 chunks +79 lines, -1 line 0 comments Download
M media/audio/linux/alsa_input.h View 1 chunk +1 line, -0 lines 0 comments Download
M media/audio/linux/alsa_input.cc View 1 2 3 1 chunk +15 lines, -15 lines 0 comments Download
M media/audio/linux/alsa_output.cc View 1 2 3 4 2 chunks +12 lines, -13 lines 0 comments Download
M media/audio/linux/alsa_output_unittest.cc View 1 2 3 4 22 chunks +175 lines, -139 lines 0 comments Download
M media/audio/linux/audio_manager_linux.h View 1 2 3 4 2 chunks +16 lines, -8 lines 0 comments Download
M media/audio/linux/audio_manager_linux.cc View 1 2 3 4 5 5 chunks +62 lines, -70 lines 0 comments Download
M media/audio/mac/audio_manager_mac.h View 1 2 3 4 1 chunk +9 lines, -13 lines 0 comments Download
M media/audio/mac/audio_manager_mac.cc View 1 2 3 4 5 5 chunks +40 lines, -85 lines 0 comments Download
M media/audio/openbsd/audio_manager_openbsd.h View 1 2 3 4 1 chunk +11 lines, -7 lines 0 comments Download
M media/audio/openbsd/audio_manager_openbsd.cc View 1 2 3 4 5 chunks +41 lines, -47 lines 0 comments Download
M media/audio/win/audio_manager_win.h View 1 2 3 4 5 3 chunks +9 lines, -13 lines 0 comments Download
M media/audio/win/audio_manager_win.cc View 1 2 3 4 5 6 6 chunks +68 lines, -77 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
no longer working on chromium
This is a refactoring CL to improve the inheritance of AudioManager family. Some breakdown in ...
8 years, 9 months ago (2012-03-01 16:02:19 UTC) #1
henrika (OOO until Aug 14)
Some generic questions first. You state "Made the destructor of the AudioManagerPlatforms protected so it ...
8 years, 9 months ago (2012-03-02 08:31:09 UTC) #2
henrika (OOO until Aug 14)
http://codereview.chromium.org/9570014/diff/1018/media/audio/android/audio_manager_android.h File media/audio/android/audio_manager_android.h (right): http://codereview.chromium.org/9570014/diff/1018/media/audio/android/audio_manager_android.h#newcode23 media/audio/android/audio_manager_android.h:23: virtual AudioOutputStream* MakeAudioLinearOutputStream( Why not call this MakeAudioOutputStream() instead? ...
8 years, 9 months ago (2012-03-02 08:31:16 UTC) #3
no longer working on chromium
http://codereview.chromium.org/9570014/diff/1018/media/audio/android/audio_manager_android.h File media/audio/android/audio_manager_android.h (right): http://codereview.chromium.org/9570014/diff/1018/media/audio/android/audio_manager_android.h#newcode23 media/audio/android/audio_manager_android.h:23: virtual AudioOutputStream* MakeAudioLinearOutputStream( On 2012/03/02 08:31:16, henrika wrote: > ...
8 years, 9 months ago (2012-03-02 13:00:49 UTC) #4
tommi (sloooow) - chröme
http://codereview.chromium.org/9570014/diff/5002/media/audio/android/audio_manager_android.cc File media/audio/android/audio_manager_android.cc (right): http://codereview.chromium.org/9570014/diff/5002/media/audio/android/audio_manager_android.cc#newcode54 media/audio/android/audio_manager_android.cc:54: return AudioTrackOutputStream::MakeStream(params);; fix indent and remove extra semicolon http://codereview.chromium.org/9570014/diff/5002/media/audio/android/audio_manager_android.h ...
8 years, 9 months ago (2012-03-05 14:28:28 UTC) #5
no longer working on chromium
Changed the code based on the comments from Tommi and discussion with Henrik. Please take ...
8 years, 9 months ago (2012-03-06 15:27:07 UTC) #6
no longer working on chromium
https://chromiumcodereview.appspot.com/9570014/diff/5002/media/audio/android/audio_manager_android.h File media/audio/android/audio_manager_android.h (right): https://chromiumcodereview.appspot.com/9570014/diff/5002/media/audio/android/audio_manager_android.h#newcode23 media/audio/android/audio_manager_android.h:23: virtual AudioOutputStream* MakeAudioLinearOutputStream( On 2012/03/05 14:28:28, tommi wrote: > ...
8 years, 9 months ago (2012-03-06 15:27:27 UTC) #7
tommi (sloooow) - chröme
lgtm with a couple of little requests. https://chromiumcodereview.appspot.com/9570014/diff/15001/media/audio/audio_manager_base.cc File media/audio/audio_manager_base.cc (right): https://chromiumcodereview.appspot.com/9570014/diff/15001/media/audio/audio_manager_base.cc#newcode119 media/audio/audio_manager_base.cc:119: DCHECK(stream); Can ...
8 years, 9 months ago (2012-03-06 16:16:04 UTC) #8
no longer working on chromium
Addressed Tommi's another comments. http://codereview.chromium.org/9570014/diff/15001/media/audio/audio_manager_base.cc File media/audio/audio_manager_base.cc (right): http://codereview.chromium.org/9570014/diff/15001/media/audio/audio_manager_base.cc#newcode119 media/audio/audio_manager_base.cc:119: DCHECK(stream); On 2012/03/06 16:16:04, tommi ...
8 years, 9 months ago (2012-03-06 17:38:40 UTC) #9
tommi (sloooow) - chröme
Ah, skip the dcheck then. Lgtm++ On Mar 6, 2012 6:38 PM, <xians@chromium.org> wrote: > ...
8 years, 9 months ago (2012-03-06 17:44:12 UTC) #10
scherkus (not reviewing)
few drive-by things but not adding myself as a reviewer so don't wait for my ...
8 years, 9 months ago (2012-03-06 22:31:51 UTC) #11
tommi (sloooow) - chröme
http://codereview.chromium.org/9570014/diff/16006/media/audio/audio_manager_base.cc File media/audio/audio_manager_base.cc (right): http://codereview.chromium.org/9570014/diff/16006/media/audio/audio_manager_base.cc#newcode22 media/audio/audio_manager_base.cc:22: max_num_output_streams_(0), On 2012/03/06 22:31:51, scherkus wrote: > so if ...
8 years, 9 months ago (2012-03-07 07:44:55 UTC) #12
no longer working on chromium
http://codereview.chromium.org/9570014/diff/16006/media/audio/android/audio_manager_android.cc File media/audio/android/audio_manager_android.cc (right): http://codereview.chromium.org/9570014/diff/16006/media/audio/android/audio_manager_android.cc#newcode61 media/audio/android/audio_manager_android.cc:61: AudioInputStream* AudioManagerAndroid::MakeALowLatencyInputStream( On 2012/03/06 22:31:51, scherkus wrote: > typo? ...
8 years, 9 months ago (2012-03-07 09:57:08 UTC) #13
henrika (OOO until Aug 14)
LGTM.
8 years, 9 months ago (2012-03-07 13:40:46 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/9570014/15027
8 years, 9 months ago (2012-03-07 13:52:17 UTC) #15
commit-bot: I haz the power
Change committed as 125389
8 years, 9 months ago (2012-03-07 15:25:54 UTC) #16
scherkus (not reviewing)
8 years, 9 months ago (2012-03-07 18:06:03 UTC) #17
thanks xians!

Powered by Google App Engine
This is Rietveld 408576698