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

Issue 10790121: First step towards moving AudioDevice from content/ to media/audio. (Closed)

Created:
8 years, 5 months ago by tommi (sloooow) - chröme
Modified:
8 years, 4 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, feature-media-reviews_chromium.org
Visibility:
Public.

Description

First step towards moving AudioDevice and AudioInputDevice from content/ to media/audio. This cl introduces new IPC interface files in media/audio that have the definitions of an IPC layer for AudioDevice and AudioInputDevice. AudioMessageFilter, AudionInputMessageFilter and others have been updated to use definitions from these file but in order to keep the diffs simple, I haven't actually moved the files over to media/audio. That will be the next step (and then no code changes should be needed). TEST=There should be no functional changes here. If there are problems, they should be caught by our existing unit tests or build errors. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=148533

Patch Set 1 #

Patch Set 2 : Remove unnecessary #include #

Total comments: 52

Patch Set 3 : Most comments addressed #

Patch Set 4 : Update AudioInputDevice as well #

Patch Set 5 : Add missing files #

Patch Set 6 : Update content_common.gypi #

Patch Set 7 : Shortened the State name values in AudioDeviceIPCDelegate #

Patch Set 8 : Make AudioMessageFilter::Send() method non-virtual again and update the AudioDevice tests #

Patch Set 9 : relaxing the notreached back to log(error) since nacl tests will otherwise fail #

Total comments: 20

Patch Set 10 : Take care of factory todos so that audioinputdevice and audiodevice are in sync #

Patch Set 11 : Update checks in AudioMessageFilter with info on nacl_integration bug #

Patch Set 12 : Address comments #

Patch Set 13 : AudioInputDeviceIPCDelegate -> AudioInputIPCDelegate #

Patch Set 14 : interface cleanup: int32, uint32 -> int #

Total comments: 8

Patch Set 15 : Addressed comments and renamed the IPC classes+files #

Total comments: 9

Patch Set 16 : Comments addressed #

Patch Set 17 : Update comments after closing ppapi bug #

Unified diffs Side-by-side diffs Delta from patch set Stats (+692 lines, -434 lines) Patch
M content/browser/renderer_host/media/audio_input_device_manager.h View 1 2 3 1 chunk +0 lines, -3 lines 0 comments Download
M content/browser/renderer_host/media/audio_input_device_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +7 lines, -8 lines 0 comments Download
M content/browser/renderer_host/media/audio_input_device_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -4 lines 0 comments Download
M content/browser/renderer_host/media/audio_input_renderer_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +4 lines, -4 lines 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +4 lines, -3 lines 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +14 lines, -9 lines 0 comments Download
M content/common/media/audio_messages.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +6 lines, -4 lines 0 comments Download
D content/common/media/audio_stream_state.h View 1 chunk +0 lines, -17 lines 0 comments Download
M content/content_common.gypi View 1 2 3 4 5 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/media/audio_device.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +20 lines, -27 lines 0 comments Download
M content/renderer/media/audio_device.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 9 chunks +24 lines, -28 lines 0 comments Download
M content/renderer/media/audio_device_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +14 lines, -4 lines 0 comments Download
M content/renderer/media/audio_device_factory.cc View 1 2 3 4 5 6 7 8 9 2 chunks +21 lines, -5 lines 0 comments Download
M content/renderer/media/audio_device_unittest.cc View 1 2 3 4 5 6 7 9 chunks +15 lines, -42 lines 0 comments Download
M content/renderer/media/audio_input_device.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 6 chunks +45 lines, -66 lines 0 comments Download
M content/renderer/media/audio_input_device.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 15 chunks +49 lines, -49 lines 0 comments Download
M content/renderer/media/audio_input_message_filter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +24 lines, -34 lines 0 comments Download
M content/renderer/media/audio_input_message_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 8 chunks +56 lines, -14 lines 0 comments Download
M content/renderer/media/audio_message_filter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +19 lines, -28 lines 0 comments Download
M content/renderer/media/audio_message_filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 5 chunks +43 lines, -12 lines 0 comments Download
M content/renderer/media/audio_message_filter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 7 chunks +18 lines, -24 lines 0 comments Download
M content/renderer/media/audio_renderer_mixer_manager.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/audio_renderer_mixer_manager_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -1 line 0 comments Download
M content/renderer/media/render_audiosourceprovider.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/renderer_webaudiodevice_impl.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/webrtc_audio_device_impl.cc View 1 2 3 4 5 6 7 8 9 3 chunks +5 lines, -3 lines 0 comments Download
M content/renderer/pepper/pepper_platform_audio_input_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +9 lines, -7 lines 0 comments Download
M content/renderer/pepper/pepper_platform_audio_input_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 9 chunks +19 lines, -15 lines 0 comments Download
M content/renderer/pepper/pepper_platform_audio_output_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +9 lines, -7 lines 0 comments Download
M content/renderer/pepper/pepper_platform_audio_output_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 9 chunks +19 lines, -12 lines 0 comments Download
A media/audio/audio_input_ipc.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +104 lines, -0 lines 0 comments Download
A media/audio/audio_input_ipc.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +13 lines, -0 lines 0 comments Download
A media/audio/audio_output_ipc.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +103 lines, -0 lines 0 comments Download
A media/audio/audio_output_ipc.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +13 lines, -0 lines 0 comments Download
M media/media.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
tommi (sloooow) - chröme
Hey Andrew - here's a stab at what we discussed :) I'm trying to do ...
8 years, 5 months ago (2012-07-23 16:47:23 UTC) #1
scherkus (not reviewing)
https://chromiumcodereview.appspot.com/10790121/diff/3003/content/browser/renderer_host/media/audio_renderer_host.cc File content/browser/renderer_host/media/audio_renderer_host.cc (right): https://chromiumcodereview.appspot.com/10790121/diff/3003/content/browser/renderer_host/media/audio_renderer_host.cc#newcode315 content/browser/renderer_host/media/audio_renderer_host.cc:315: Send(new AudioMsg_NotifyStreamStateChanged(stream_id, fix indent (drop stream_id to next line?) ...
8 years, 5 months ago (2012-07-23 22:57:51 UTC) #2
tommi (sloooow) - chröme
All done except for updating the input interfaces. Will take care of that in the ...
8 years, 5 months ago (2012-07-24 09:49:43 UTC) #3
tommi (sloooow) - chröme
Changes for AudioInputDevice uploaded and cl description amended. ptal.
8 years, 5 months ago (2012-07-24 12:27:54 UTC) #4
tommi (sloooow) - chröme
+darin for content/content_common.gypi
8 years, 5 months ago (2012-07-24 12:36:15 UTC) #5
scherkus (not reviewing)
man AudioInputDeviceIPCDelegate is a long name!!! I wonder if we can think of something more ...
8 years, 4 months ago (2012-07-24 17:57:48 UTC) #6
tommi (sloooow) - chröme
Some ideas... * skip 'Device' in the name * introduce a new namespace, audio, to ...
8 years, 4 months ago (2012-07-24 20:35:51 UTC) #7
scherkus (not reviewing)
On 2012/07/24 20:35:51, tommi wrote: > Some ideas... > * skip 'Device' in the name ...
8 years, 4 months ago (2012-07-24 20:49:39 UTC) #8
darin (slow to review)
On 2012/07/24 12:36:15, tommi wrote: > +darin for content/content_common.gypi LGTM for content_common.gypi
8 years, 4 months ago (2012-07-24 23:52:30 UTC) #9
tommi (sloooow) - chröme
Thanks Andrew. All done, including changing AudioInputDeviceIPCDelegate to AudioInputIPCDelegate. I also updated the AudioInputDevice to ...
8 years, 4 months ago (2012-07-25 13:46:16 UTC) #10
tommi (sloooow) - chröme
sorry for the 'one more' fix, but since I'm in there I took care of ...
8 years, 4 months ago (2012-07-25 16:14:57 UTC) #11
scherkus (not reviewing)
LGTM!!! I thought you were also going to drop Device from AudioOutputDeviceIPC -- see my ...
8 years, 4 months ago (2012-07-25 17:43:36 UTC) #12
tommi (sloooow) - chröme
http://codereview.chromium.org/10790121/diff/25041/content/renderer/media/audio_device.h File content/renderer/media/audio_device.h (right): http://codereview.chromium.org/10790121/diff/25041/content/renderer/media/audio_device.h#newcode112 content/renderer/media/audio_device.h:112: const scoped_refptr<base::MessageLoopProxy>& io_loop); On 2012/07/25 17:43:37, scherkus wrote: > ...
8 years, 4 months ago (2012-07-25 20:10:26 UTC) #13
scherkus (not reviewing)
lgtm++ w/ nits http://codereview.chromium.org/10790121/diff/32004/content/common/media/audio_messages.h File content/common/media/audio_messages.h (right): http://codereview.chromium.org/10790121/diff/32004/content/common/media/audio_messages.h#newcode17 content/common/media/audio_messages.h:17: #include "media/audio/audio_output_ipc.h" a->z ordering http://codereview.chromium.org/10790121/diff/32004/content/common/media/audio_messages.h#newcode25 content/common/media/audio_messages.h:25: ...
8 years, 4 months ago (2012-07-25 22:34:11 UTC) #14
henrika (OOO until Aug 14)
Really nice work Tommi. Today, we have rather detailed comments in the header files for ...
8 years, 4 months ago (2012-07-26 07:45:47 UTC) #15
tommi (sloooow) - chröme
All done. Also updated the documentation for AudioInputDevice. http://codereview.chromium.org/10790121/diff/32004/content/common/media/audio_messages.h File content/common/media/audio_messages.h (right): http://codereview.chromium.org/10790121/diff/32004/content/common/media/audio_messages.h#newcode17 content/common/media/audio_messages.h:17: #include ...
8 years, 4 months ago (2012-07-26 09:19:36 UTC) #16
scherkus (not reviewing)
8 years, 4 months ago (2012-07-26 17:57:31 UTC) #17
http://codereview.chromium.org/10790121/diff/32004/content/renderer/media/aud...
File content/renderer/media/audio_device_factory.h (right):

http://codereview.chromium.org/10790121/diff/32004/content/renderer/media/aud...
content/renderer/media/audio_device_factory.h:28: static
media::AudioRendererSink* NewOutputDevice();
On 2012/07/26 09:19:36, tommi wrote:
> On 2012/07/25 22:34:11, scherkus wrote:
> > hrmm.. these names are a bit strange
> > 
> > it's an AudioDeviceFactory that creates AudioRendererSinks?!
> > 
> > I don't have any real concrete suggestions though :\
> 
> I agree.  I think AudioDeviceFactory is fine but AudioRendererSink could do
with
> improving.  We could rename that interface to something like
AudioOutputClient,
> AudioOutputProxy, AudioOutputInterface etc and add a similar definition for
> AudioInputDevice.
> 
> Alternatively, we could rename the implementations of these interfaces and use
> AudioOutputDevice, AudioInputDevice as names for the interfaces and rename the
> implementation classes to Audio[Output|Input]DeviceImpl.  Since that pattern
is
> pretty common in Chrome so maybe that's the way to go.

I think the *Impl idea has some legs -- the one thing to watch out for (having
committed this crime myself!) is that we don't end up with two Impls in
different namespaces (i.e., one in media:: for testing and one in content::
that's the "real" one)

Powered by Google App Engine
This is Rietveld 408576698