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

Issue 11166002: Plumb render view ID from audio-related code in renderer through IPCs to AudioRendererHost in brows… (Closed)

Created:
8 years, 2 months ago by miu
Modified:
8 years ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, feature-media-reviews_chromium.org, Alpha Left Google, justinlin, sail, darin (slow to review)
Visibility:
Public.

Description

Plumb render view ID from audio-related code in renderer through IPCs to AudioRendererHost in browser process. This is a first step towards implementing three major Chromium features, all of which need to associate audio outputs with their source tabs. See BUGs referenced by this change for more details. There are a two places where refactoring work is still needed to be able to plumb in render_view_ids. As the refactoring work is well out-of-scope for this change, stubs with TODO comments were added as placemarkers. Nevertheless, this change has been confirmed to function for the majority of use cases on the web. Testing of render_view_id plumbing by audio output method: <audio> works Pepper works WebAudio stub works WebRTC stub works NPAPI/Flash not tested (N/A) BUG=3541, 64215, 153392 TEST=Ran all media_unittests and content_unittests to confirm no breakage. Also, ran a debug build and manually visited websites using the above list of methods to confirm that no audio recording/playback regressions were introduced.

Patch Set 1 #

Total comments: 2

Patch Set 2 : Add plumbing for input side as well. #

Total comments: 10

Patch Set 3 : Addressed tommi's comments and rebased. #

Total comments: 4

Patch Set 4 : VLOG --> DVLOG in audio*renderer_host.cc #

Total comments: 11

Patch Set 5 : Link to crbug from TODO comments. Enforced ownership transfer using scoped_ptr. #

Total comments: 4

Patch Set 6 : Fixed indents. #

Patch Set 7 : Rebased. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+306 lines, -228 lines) Patch
M content/browser/renderer_host/media/audio_input_renderer_host.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/audio_input_renderer_host.cc View 1 2 3 4 1 chunk +14 lines, -3 lines 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host.cc View 1 2 3 4 1 chunk +15 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/audio_renderer_host_unittest.cc View 1 2 3 4 5 6 2 chunks +2 lines, -1 line 0 comments Download
M content/common/media/audio_messages.h View 1 1 chunk +4 lines, -2 lines 0 comments Download
M content/renderer/media/audio_device_factory.h View 1 2 chunks +11 lines, -5 lines 0 comments Download
M content/renderer/media/audio_device_factory.cc View 1 2 chunks +11 lines, -6 lines 0 comments Download
M content/renderer/media/audio_input_message_filter.h View 1 2 3 4 2 chunks +7 lines, -18 lines 0 comments Download
M content/renderer/media/audio_input_message_filter.cc View 1 2 3 4 3 chunks +43 lines, -38 lines 0 comments Download
M content/renderer/media/audio_message_filter.h View 1 2 3 4 3 chunks +7 lines, -18 lines 0 comments Download
M content/renderer/media/audio_message_filter.cc View 1 2 3 4 2 chunks +45 lines, -39 lines 0 comments Download
M content/renderer/media/audio_message_filter_unittest.cc View 4 chunks +13 lines, -6 lines 0 comments Download
M content/renderer/media/audio_renderer_mixer_manager.h View 2 chunks +6 lines, -4 lines 0 comments Download
M content/renderer/media/audio_renderer_mixer_manager.cc View 2 chunks +23 lines, -12 lines 0 comments Download
M content/renderer/media/audio_renderer_mixer_manager_unittest.cc View 1 2 3 4 5 6 4 chunks +16 lines, -6 lines 0 comments Download
M content/renderer/media/media_stream_dependency_factory.cc View 1 2 3 4 5 6 1 chunk +5 lines, -1 line 0 comments Download
M content/renderer/media/render_audiosourceprovider.h View 2 chunks +2 lines, -2 lines 0 comments Download
M content/renderer/media/render_audiosourceprovider.cc View 2 chunks +3 lines, -3 lines 0 comments Download
M content/renderer/media/renderer_webaudiodevice_impl.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/renderer_webaudiodevice_impl.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/webrtc_audio_device_impl.h View 2 chunks +2 lines, -2 lines 1 comment Download
M content/renderer/media/webrtc_audio_device_impl.cc View 1 2 3 4 5 6 6 chunks +4 lines, -8 lines 0 comments Download
M content/renderer/media/webrtc_audio_device_unittest.cc View 1 2 3 4 5 6 6 chunks +7 lines, -5 lines 0 comments Download
M content/renderer/pepper/pepper_platform_audio_input_impl.h View 1 4 chunks +4 lines, -3 lines 2 comments Download
M content/renderer/pepper/pepper_platform_audio_input_impl.cc View 1 2 3 4 5 6 3 chunks +6 lines, -4 lines 0 comments Download
M content/renderer/pepper/pepper_platform_audio_output_impl.h View 5 chunks +5 lines, -3 lines 0 comments Download
M content/renderer/pepper/pepper_platform_audio_output_impl.cc View 1 2 3 4 5 6 3 chunks +6 lines, -4 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_delegate_impl.cc View 1 2 3 4 5 6 2 chunks +2 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/renderer_webkitplatformsupport_impl.cc View 1 2 3 4 5 6 1 chunk +5 lines, -1 line 1 comment Download
M media/audio/audio_input_device.h View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M media/audio/audio_input_device.cc View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M media/audio/audio_input_ipc.h View 1 2 chunks +2 lines, -3 lines 0 comments Download
M media/audio/audio_output_device.h View 1 2 3 4 2 chunks +2 lines, -4 lines 0 comments Download
M media/audio/audio_output_device.cc View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M media/audio/audio_output_device_unittest.cc View 1 2 3 4 7 chunks +13 lines, -10 lines 0 comments Download
M media/audio/audio_output_ipc.h View 2 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 27 (0 generated)
miu
Reviewers, This is a "take-over" of Issue 10836025 (http://chromiumcodereview.appspot.com/10836025). Note that you've already LGTM'ed this ...
8 years, 2 months ago (2012-10-16 05:00:51 UTC) #1
miu
+cc sail@
8 years, 2 months ago (2012-10-16 05:11:33 UTC) #2
tommi (sloooow) - chröme
https://codereview.chromium.org/11166002/diff/1/content/renderer/media/audio_device_factory.cc File content/renderer/media/audio_device_factory.cc (right): https://codereview.chromium.org/11166002/diff/1/content/renderer/media/audio_device_factory.cc#newcode22 content/renderer/media/audio_device_factory.cc:22: int render_view_id) { Why don't we do the same ...
8 years, 2 months ago (2012-10-16 09:17:06 UTC) #3
miu
https://codereview.chromium.org/11166002/diff/1/content/renderer/media/audio_device_factory.cc File content/renderer/media/audio_device_factory.cc (right): https://codereview.chromium.org/11166002/diff/1/content/renderer/media/audio_device_factory.cc#newcode22 content/renderer/media/audio_device_factory.cc:22: int render_view_id) { On 2012/10/16 09:17:07, tommi wrote: > ...
8 years, 2 months ago (2012-10-16 23:43:49 UTC) #4
tommi (sloooow) - chröme
lgtm! (with a few nits). thanks for taking care of the input device. https://codereview.chromium.org/11166002/diff/5001/content/renderer/media/audio_message_filter.cc File ...
8 years, 2 months ago (2012-10-17 18:40:06 UTC) #5
miu
Good catch on the scoped_ptr change. The chromium-dev mailing list is a bit spammy, so ...
8 years, 2 months ago (2012-10-17 20:10:43 UTC) #6
Chris Rogers
+dalecurtis to double-check How much has this been tested for all the different audio clients: ...
8 years, 2 months ago (2012-10-17 20:43:10 UTC) #7
miu
Addressed Chris' comments (updated issue text with testing info). https://codereview.chromium.org/11166002/diff/11001/content/browser/renderer_host/media/audio_input_renderer_host.cc File content/browser/renderer_host/media/audio_input_renderer_host.cc (right): https://codereview.chromium.org/11166002/diff/11001/content/browser/renderer_host/media/audio_input_renderer_host.cc#newcode200 content/browser/renderer_host/media/audio_input_renderer_host.cc:200: ...
8 years, 2 months ago (2012-10-17 22:06:30 UTC) #8
Chris Rogers
By testing, I meant to make sure that all the audio clients still work, play ...
8 years, 2 months ago (2012-10-17 22:43:01 UTC) #9
scherkus (not reviewing)
cool! I've got a suggestion for enforcing ownership transfer via scoped_ptr<T> instead of relying on ...
8 years, 2 months ago (2012-10-18 01:56:28 UTC) #10
miu
Chris/Andrew, Addressed all your comments, and created http://crbug.com/156535 to track remaining work. Thanks, Yuri https://codereview.chromium.org/11166002/diff/17001/content/renderer/media/audio_device_factory.h ...
8 years, 2 months ago (2012-10-18 03:27:26 UTC) #11
scherkus (not reviewing)
lgtm w/ indent nits thanks miu@! https://codereview.chromium.org/11166002/diff/17001/content/renderer/media/audio_input_message_filter.h File content/renderer/media/audio_input_message_filter.h (right): https://codereview.chromium.org/11166002/diff/17001/content/renderer/media/audio_input_message_filter.h#newcode29 content/renderer/media/audio_input_message_filter.h:29: media::AudioInputIPC* CreateAudioInputIPC(int render_view_id); ...
8 years, 2 months ago (2012-10-18 05:17:34 UTC) #12
miu
Chris/Dale, LGTY too? https://codereview.chromium.org/11166002/diff/9005/content/renderer/pepper/pepper_platform_audio_input_impl.cc File content/renderer/pepper/pepper_platform_audio_input_impl.cc (right): https://codereview.chromium.org/11166002/diff/9005/content/renderer/pepper/pepper_platform_audio_input_impl.cc#newcode145 content/renderer/pepper/pepper_platform_audio_input_impl.cc:145: CreateAudioInputIPC(render_view_id); On 2012/10/18 05:17:35, scherkus wrote: ...
8 years, 2 months ago (2012-10-18 05:28:18 UTC) #13
DaleCurtis
lgtm
8 years, 2 months ago (2012-10-18 06:39:30 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miu@chromium.org/11166002/7014
8 years, 2 months ago (2012-10-18 06:52:01 UTC) #15
commit-bot: I haz the power
Failed to apply patch for content/renderer/media/audio_renderer_mixer_manager_unittest.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
8 years, 2 months ago (2012-10-18 06:52:14 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/miu@chromium.org/11166002/16045
8 years, 2 months ago (2012-10-18 18:48:49 UTC) #17
commit-bot: I haz the power
Presubmit check for 11166002-16045 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 2 months ago (2012-10-18 18:49:22 UTC) #18
miu
jamesr@, I need your LGTM for owners approval for files in content/renderer. Thanks, Yuri
8 years, 2 months ago (2012-10-18 18:51:31 UTC) #19
jamesr
It's a little unclear to me how this is supposed to work. What render view ...
8 years, 2 months ago (2012-10-19 19:30:30 UTC) #20
jamesr
Just to be clear, I'm pretty sure this patch as is will not do what ...
8 years, 2 months ago (2012-10-19 19:30:50 UTC) #21
miu
Short story: I do believe this change is doing exactly what I (and the others) ...
8 years, 2 months ago (2012-10-19 20:59:13 UTC) #22
stevenjb
I'm not at all familiar with the audio code, but when working on http://codereview.chromium.org/11236052/, I ...
8 years, 1 month ago (2012-10-25 17:07:37 UTC) #23
miu1
stevenjb@, There's a lot of history prior to this change, as this is a "take-over" ...
8 years, 1 month ago (2012-10-25 18:06:16 UTC) #24
stevenjb (google-dont-use)
OK, sounds good, thanks. On Thu, Oct 25, 2012 at 11:06 AM, Yuri Wiitala <miu@google.com> ...
8 years, 1 month ago (2012-10-25 18:09:14 UTC) #25
jamesr
http://codereview.chromium.org/11166002/diff/16045/content/renderer/media/webrtc_audio_device_impl.h File content/renderer/media/webrtc_audio_device_impl.h (right): http://codereview.chromium.org/11166002/diff/16045/content/renderer/media/webrtc_audio_device_impl.h#newcode448 content/renderer/media/webrtc_audio_device_impl.h:448: DISALLOW_IMPLICIT_CONSTRUCTORS(WebRtcAudioDeviceImpl); why are you changing these? The style guide ...
8 years, 1 month ago (2012-10-29 22:51:02 UTC) #26
jamesr
8 years, 1 month ago (2012-10-29 23:01:09 UTC) #27
FYI, following the WebSockets pattern in the WebKit API should help you out
quite a bit with your layering issues on the WebKit side.  You can leave the
creation path alone and don't need to provide any additional context there and
can have the WebAudio code issue the WebFrameClient call on the correct context
at start() time

Powered by Google App Engine
This is Rietveld 408576698