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

Issue 11783059: Ensures that WebRTC works for device selection using a different sample rate than default (Closed)

Created:
7 years, 11 months ago by henrika (OOO until Aug 14)
Modified:
7 years, 11 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, feature-media-reviews_chromium.org, jam, darin-cc_chromium.org, no longer working on chromium, Jói
Visibility:
Public.

Description

Ensures that WebRTC works for device selections using a different sample rate than default. See https://docs.google.com/a/google.com/document/d/1Gi5Hmtfz_d6WSoSXwhgK4q7yBgjL7cTcgez-URFdZV4/edit for more details regarding this CL. In addition, I have introduced base::ThreadChecker in WebRtcAudioCapturer to make it less flexible in how it can be called. It feels better to add restrictions given the existing usage than to "allow almost anything" as is the case now. BUG=164058 TEST=A long list of WebRTC demos plus content and media unit tests. Also did browser_tests locally. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=178287

Patch Set 1 #

Patch Set 2 : Rebased #

Patch Set 3 : Several improvements and cleaning up #

Patch Set 4 : Resolved checkdeps issue #

Patch Set 5 : Cleanup work #

Patch Set 6 : Fixes include order #

Total comments: 10

Patch Set 7 : Fixed content_unittests #

Total comments: 29

Patch Set 8 : Feedback from reviewers #

Patch Set 9 : Had to restore usage of UTF16ToUTF8() in MediaStreamImpl::OnCreateNativeSourcesComplete to build on… #

Total comments: 1

Patch Set 10 : Non-trivial rebase after MediaStreamDestination was added to Chrome #

Patch Set 11 : Adapted to latest WebKit #

Patch Set 12 : nits #

Patch Set 13 : Fixes issue with resource destruction #

Patch Set 14 : Ensured that all browser_tests are OK #

Patch Set 15 : Improved comments #

Total comments: 2

Patch Set 16 : Fix after review from Chris #

Unified diffs Side-by-side diffs Delta from patch set Stats (+377 lines, -211 lines) Patch
M content/browser/renderer_host/media/audio_input_device_manager.cc View 1 2 3 4 5 6 7 2 chunks +12 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/audio_input_device_manager_unittest.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/media_stream_ui_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_ui_controller_unittest.cc View 1 2 3 4 5 6 7 1 chunk +3 lines, -1 line 0 comments Download
M content/common/media/media_stream_messages.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M content/common/media/media_stream_options.h View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
M content/common/media/media_stream_options.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +16 lines, -1 line 0 comments Download
M content/public/common/media_stream_request.h View 1 2 3 4 5 6 7 2 chunks +19 lines, -0 lines 0 comments Download
M content/public/common/media_stream_request.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +16 lines, -1 line 0 comments Download
M content/renderer/media/media_stream_dependency_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +12 lines, -5 lines 0 comments Download
M content/renderer/media/media_stream_dependency_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 chunks +85 lines, -34 lines 0 comments Download
M content/renderer/media/media_stream_dependency_factory_unittest.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/media/media_stream_impl.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/media/media_stream_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +18 lines, -58 lines 0 comments Download
M content/renderer/media/media_stream_source_extra_data.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +6 lines, -0 lines 0 comments Download
M content/renderer/media/mock_media_stream_dependency_factory.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +4 lines, -1 line 0 comments Download
M content/renderer/media/mock_media_stream_dependency_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +10 lines, -3 lines 0 comments Download
M content/renderer/media/webaudio_capturer_source.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M content/renderer/media/webrtc_audio_capturer.h View 1 2 3 4 5 6 7 8 9 4 chunks +34 lines, -10 lines 0 comments Download
M content/renderer/media/webrtc_audio_capturer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 11 chunks +89 lines, -68 lines 0 comments Download
M content/renderer/media/webrtc_audio_device_impl.h View 1 2 2 chunks +0 lines, -7 lines 0 comments Download
M content/renderer/media/webrtc_audio_device_impl.cc View 1 2 3 4 5 chunks +2 lines, -12 lines 0 comments Download
M content/renderer/media/webrtc_audio_device_unittest.cc View 1 2 3 4 5 6 9 chunks +31 lines, -5 lines 0 comments Download

Messages

Total messages: 19 (0 generated)
henrika (OOO until Aug 14)
Tommi, I have tried to explain the nature of this CL in a design doc ...
7 years, 11 months ago (2013-01-14 14:12:19 UTC) #1
henrika (OOO until Aug 14)
Will add joi@ for content/public later.
7 years, 11 months ago (2013-01-14 14:25:07 UTC) #2
perkj_chrome
Please update and add unit test for creating an audio source in MediaStreamDependencyFactoryTest. https://codereview.chromium.org/11783059/diff/13001/content/renderer/media/media_stream_dependency_factory.cc File ...
7 years, 11 months ago (2013-01-15 09:00:19 UTC) #3
tommi (sloooow) - chröme
lgtm w/ some minor requests https://codereview.chromium.org/11783059/diff/11017/content/browser/renderer_host/media/audio_input_device_manager.cc File content/browser/renderer_host/media/audio_input_device_manager.cc (right): https://codereview.chromium.org/11783059/diff/11017/content/browser/renderer_host/media/audio_input_device_manager.cc#newcode157 content/browser/renderer_host/media/audio_input_device_manager.cc:157: int sample_rate = 0; ...
7 years, 11 months ago (2013-01-15 17:43:48 UTC) #4
Jói
https://codereview.chromium.org/11783059/diff/11017/content/public/common/media_stream_request.h File content/public/common/media_stream_request.h (right): https://codereview.chromium.org/11783059/diff/11017/content/public/common/media_stream_request.h#newcode60 content/public/common/media_stream_request.h:60: int sample_rate, Document what the defaults for sample_rate and ...
7 years, 11 months ago (2013-01-15 22:30:20 UTC) #5
henrika (OOO until Aug 14)
https://codereview.chromium.org/11783059/diff/11017/content/browser/renderer_host/media/audio_input_device_manager.cc File content/browser/renderer_host/media/audio_input_device_manager.cc (right): https://codereview.chromium.org/11783059/diff/11017/content/browser/renderer_host/media/audio_input_device_manager.cc#newcode157 content/browser/renderer_host/media/audio_input_device_manager.cc:157: int sample_rate = 0; On 2013/01/15 17:43:49, tommi wrote: ...
7 years, 11 months ago (2013-01-16 16:37:17 UTC) #6
henrika (OOO until Aug 14)
Per, think I've covered your parts. Did update MediaStreamDependencyFactoryTest but I have not written any ...
7 years, 11 months ago (2013-01-16 16:49:00 UTC) #7
henrika (OOO until Aug 14)
perkj: I can show you a proposal of a new unit test tomorrow. joi: sorry ...
7 years, 11 months ago (2013-01-16 16:53:25 UTC) #8
Jói
https://codereview.chromium.org/11783059/diff/11017/content/public/common/media_stream_request.h File content/public/common/media_stream_request.h (right): https://codereview.chromium.org/11783059/diff/11017/content/public/common/media_stream_request.h#newcode76 content/public/common/media_stream_request.h:76: int sample_rate; On 2013/01/16 16:37:17, henrika wrote: > No ...
7 years, 11 months ago (2013-01-16 17:12:00 UTC) #9
Jói
+jam John, can you take a look at content/public/common/media_stream_request.h? The two new fields being added ...
7 years, 11 months ago (2013-01-16 17:42:21 UTC) #10
jam
this is fine with me, lgtm https://codereview.chromium.org/11783059/diff/32003/content/public/common/media_stream_request.h File content/public/common/media_stream_request.h (right): https://codereview.chromium.org/11783059/diff/32003/content/public/common/media_stream_request.h#newcode76 content/public/common/media_stream_request.h:76: // with three ...
7 years, 11 months ago (2013-01-16 17:57:24 UTC) #11
Jói
LGTM On Wed, Jan 16, 2013 at 9:57 AM, <jam@chromium.org> wrote: > this is fine ...
7 years, 11 months ago (2013-01-16 18:07:14 UTC) #12
henrika (OOO until Aug 14)
Thanks guys. This guy (https://codereview.chromium.org/11369171/) just landed and it hits me pretty hard so I ...
7 years, 11 months ago (2013-01-17 12:26:40 UTC) #13
henrika (OOO until Aug 14)
cevans@: could you please double-check the changes in \content\public\common. Many thanks.
7 years, 11 months ago (2013-01-21 07:49:32 UTC) #14
henrika (OOO until Aug 14)
cevans@: to clarify why I am asking for a late OK. Is still see this ...
7 years, 11 months ago (2013-01-22 12:38:11 UTC) #15
Chris Evans
LGTM provided you action the comment if appropriate. https://codereview.chromium.org/11783059/diff/62004/content/renderer/media/webrtc_audio_capturer.cc File content/renderer/media/webrtc_audio_capturer.cc (right): https://codereview.chromium.org/11783059/diff/62004/content/renderer/media/webrtc_audio_capturer.cc#newcode91 content/renderer/media/webrtc_audio_capturer.cc:91: return ...
7 years, 11 months ago (2013-01-23 09:39:04 UTC) #16
henrika (OOO until Aug 14)
https://codereview.chromium.org/11783059/diff/62004/content/renderer/media/webrtc_audio_capturer.cc File content/renderer/media/webrtc_audio_capturer.cc (right): https://codereview.chromium.org/11783059/diff/62004/content/renderer/media/webrtc_audio_capturer.cc#newcode91 content/renderer/media/webrtc_audio_capturer.cc:91: return false; Good point. Will improve before committing. Thanks.
7 years, 11 months ago (2013-01-23 10:25:40 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/henrika@chromium.org/11783059/68007
7 years, 11 months ago (2013-01-23 10:45:30 UTC) #18
commit-bot: I haz the power
7 years, 11 months ago (2013-01-23 12:55:08 UTC) #19
Message was sent while issue was closed.
Change committed as 178287

Powered by Google App Engine
This is Rietveld 408576698