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

Issue 11270012: Adding audio support to the new webmediaplyer (Closed)

Created:
8 years, 1 month ago by no longer working on chromium
Modified:
8 years, 1 month ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, feature-media-reviews_chromium.org
Visibility:
Public.

Description

This allow connection remote stream to audio tag, and enable users to control the audio via audio tag controller. Since WebRtcAudioDeviceImpl is not a thread safe class, it can only take commands from VoE, so the output code (including AudioOutputDevice) is broken down into a WebRtcAudioRenderer. This WebRtcAudioRenderer gets calls from 3 threads: WebRtcAudioDeviceImpl thread for commands: Play(), Pause() WebMediaPlayer thread for commands: Play(), Pause(), Stop(), SetVolume() Audio thread: Render() callback. BUG=142988 TEST=https://webrtc-demos.appspot.com/html/pc1.html, make a call, right click to show the controller, you should be able to control the audio in the second tag. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=164814

Patch Set 1 #

Patch Set 2 : added a lock to protect the |renderer_| #

Total comments: 35

Patch Set 3 : addressed Wei's comments and fixed the content_unittest #

Total comments: 1

Patch Set 4 : Changed the Initialize() to bool so WebRtc will know if an error happens #

Patch Set 5 : rebased and fixed some comments in rtc_audio_renderer.h #

Total comments: 14

Patch Set 6 : addressed Andrew's comments and fixed some testbots' errors #

Total comments: 4

Patch Set 7 : addressed the nits from Andrew and fixed the chromeOS testbot error #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+589 lines, -126 lines) Patch
M content/content_renderer.gypi View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/media/media_stream_dependency_factory.h View 1 2 3 4 1 chunk +2 lines, -0 lines 1 comment Download
M content/renderer/media/media_stream_dependency_factory.cc View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M content/renderer/media/media_stream_impl.h View 1 2 3 4 5 6 3 chunks +9 lines, -0 lines 0 comments Download
M content/renderer/media/media_stream_impl.cc View 1 2 3 4 5 6 4 chunks +47 lines, -0 lines 0 comments Download
M content/renderer/media/webrtc_audio_device_impl.h View 1 2 3 4 5 6 7 chunks +34 lines, -10 lines 0 comments Download
M content/renderer/media/webrtc_audio_device_impl.cc View 1 2 3 4 5 17 chunks +49 lines, -103 lines 0 comments Download
M content/renderer/media/webrtc_audio_device_unittest.cc View 1 2 3 4 5 12 chunks +19 lines, -3 lines 0 comments Download
A content/renderer/media/webrtc_audio_renderer.h View 1 2 3 4 5 6 1 chunk +77 lines, -0 lines 1 comment Download
A content/renderer/media/webrtc_audio_renderer.cc View 1 2 3 4 5 6 1 chunk +261 lines, -0 lines 0 comments Download
A + media/audio/pulse/pulse_util.h View 1 2 3 4 5 0 chunks +-1 lines, --1 lines 0 comments Download
A + media/audio/pulse/pulse_util.cc View 1 2 3 4 5 0 chunks +-1 lines, --1 lines 0 comments Download
A webkit/media/media_stream_audio_renderer.h View 1 2 3 4 5 1 chunk +40 lines, -0 lines 0 comments Download
A + webkit/media/media_stream_audio_renderer.cc View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M webkit/media/media_stream_client.h View 1 2 3 4 5 2 chunks +5 lines, -0 lines 0 comments Download
M webkit/media/webkit_media.gypi View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/media/webmediaplayer_ms.h View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M webkit/media/webmediaplayer_ms.cc View 1 2 3 4 5 7 chunks +21 lines, -10 lines 0 comments Download
M webkit/support/test_media_stream_client.h View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download
M webkit/support/test_media_stream_client.cc View 1 2 3 4 5 2 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 17 (0 generated)
no longer working on chromium
Wjia, please take a look on the overall design, and let me know if you ...
8 years, 1 month ago (2012-10-24 14:38:31 UTC) #1
wjia(left Chromium)
Thanks for adding audio support! http://codereview.chromium.org/11270012/diff/2001/content/renderer/media/media_stream_impl.cc File content/renderer/media/media_stream_impl.cc (right): http://codereview.chromium.org/11270012/diff/2001/content/renderer/media/media_stream_impl.cc#newcode281 content/renderer/media/media_stream_impl.cc:281: scoped_refptr<content::WebRtcAudioRenderer> renderer = nit: ...
8 years, 1 month ago (2012-10-24 22:05:15 UTC) #2
no longer working on chromium
Hi Wei, I think I have already addressed all your comments, please take a second ...
8 years, 1 month ago (2012-10-25 10:19:41 UTC) #3
no longer working on chromium
http://codereview.chromium.org/11270012/diff/10004/content/renderer/media/webrtc_audio_renderer.cc File content/renderer/media/webrtc_audio_renderer.cc (right): http://codereview.chromium.org/11270012/diff/10004/content/renderer/media/webrtc_audio_renderer.cc#newcode235 content/renderer/media/webrtc_audio_renderer.cc:235: int audio_delay_milliseconds) { the review tool seems to show ...
8 years, 1 month ago (2012-10-25 10:21:26 UTC) #4
wjia(left Chromium)
Nice work! LGTM. http://codereview.chromium.org/11270012/diff/2001/media/base/rtc_audio_renderer.cc File media/base/rtc_audio_renderer.cc (right): http://codereview.chromium.org/11270012/diff/2001/media/base/rtc_audio_renderer.cc#newcode4 media/base/rtc_audio_renderer.cc:4: On 2012/10/25 10:19:41, xians1 wrote: > ...
8 years, 1 month ago (2012-10-25 14:15:04 UTC) #5
no longer working on chromium
On 2012/10/25 14:15:04, wjia wrote: > Nice work! LGTM. > > http://codereview.chromium.org/11270012/diff/2001/media/base/rtc_audio_renderer.cc > File media/base/rtc_audio_renderer.cc ...
8 years, 1 month ago (2012-10-25 15:49:04 UTC) #6
scherkus (not reviewing)
few high level comments + nits http://codereview.chromium.org/11270012/diff/4019/content/renderer/media/webrtc_audio_device_impl.h File content/renderer/media/webrtc_audio_device_impl.h (right): http://codereview.chromium.org/11270012/diff/4019/content/renderer/media/webrtc_audio_device_impl.h#newcode219 content/renderer/media/webrtc_audio_device_impl.h:219: virtual void SetRenderFormat(const ...
8 years, 1 month ago (2012-10-25 17:47:38 UTC) #7
no longer working on chromium
Thanks Andrew for the comments. I think I have already addressed all of them, please ...
8 years, 1 month ago (2012-10-26 09:35:29 UTC) #8
scherkus (not reviewing)
lgtm lgtm w/ nit and q http://codereview.chromium.org/11270012/diff/26006/content/renderer/media/media_stream_impl.cc File content/renderer/media/media_stream_impl.cc (right): http://codereview.chromium.org/11270012/diff/26006/content/renderer/media/media_stream_impl.cc#newcode279 content/renderer/media/media_stream_impl.cc:279: } else { ...
8 years, 1 month ago (2012-10-26 17:28:22 UTC) #9
no longer working on chromium
Thanks Andrew, see comments inline. Brett might be busy, Avi, can I have your owner ...
8 years, 1 month ago (2012-10-29 15:01:35 UTC) #10
Avi (use Gerrit)
gypi stamp lgtm
8 years, 1 month ago (2012-10-29 15:18:46 UTC) #11
jamesr
webkit lgtm
8 years, 1 month ago (2012-10-29 19:19:39 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/11270012/34001
8 years, 1 month ago (2012-10-29 19:20:25 UTC) #13
commit-bot: I haz the power
Retried try job too often for step(s) interactive_ui_tests
8 years, 1 month ago (2012-10-29 20:15:57 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/11270012/34001
8 years, 1 month ago (2012-10-29 22:16:16 UTC) #15
commit-bot: I haz the power
Change committed as 164814
8 years, 1 month ago (2012-10-30 01:37:38 UTC) #16
tommi (sloooow) - chröme
8 years, 1 month ago (2012-11-13 11:08:30 UTC) #17
late drive-by.  Since this is refactoring the WebRTC audio code, it would have
been good to at least cc Henrik.

https://chromiumcodereview.appspot.com/11270012/diff/34001/content/renderer/m...
File content/renderer/media/media_stream_dependency_factory.h (right):

https://chromiumcodereview.appspot.com/11270012/diff/34001/content/renderer/m...
content/renderer/media/media_stream_dependency_factory.h:128:
WebRtcAudioDeviceImpl* GetWebRtcAudioDevice();
I don't think it's a good idea to hand out raw pointers to a ref counted object.
 Instead return scoped_reptr.

https://chromiumcodereview.appspot.com/11270012/diff/34001/content/renderer/m...
File content/renderer/media/webrtc_audio_renderer.h (right):

https://chromiumcodereview.appspot.com/11270012/diff/34001/content/renderer/m...
content/renderer/media/webrtc_audio_renderer.h:60: WebRtcAudioRendererSource*
source_;
where does the ownership lie?

Powered by Google App Engine
This is Rietveld 408576698