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

Issue 10786029: Delete MediaStreamManager in the same way as AudioManager (Closed)

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

Description

MediaStreamManager needs to outlive its clients like MediaStreamDispatcherHost, which is deleted when the IPC channels goes away. So MediaStreamManager needs to outlive IO thread. But its components like device thread, AudioInputDeviceManager and VideoCaptureManager should be deleted before IO thread gets deleted. We achieve this by having a destructor observer on the IO thread, and delete the components before IO thread goes away. BUG=137476 TEST=content_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=147240

Patch Set 1 #

Patch Set 2 : updated unittests #

Total comments: 14

Patch Set 3 : addressed Tommi's comments. #

Patch Set 4 : fixed the pyauto test #

Total comments: 2

Patch Set 5 : revert media_stream_device_settings.cc #

Patch Set 6 : we need to call thread_->Stop() explicitly on windows before calling reset() #

Patch Set 7 : put Stop() in the dtor. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -32 lines) Patch
M content/browser/browser_main_loop.cc View 1 chunk +0 lines, -4 lines 0 comments Download
M content/browser/renderer_host/media/audio_input_device_manager.cc View 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.h View 1 2 5 chunks +14 lines, -3 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.cc View 1 2 3 4 5 6 4 chunks +29 lines, -11 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_host_unittest.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/video_capture_manager.cc View 1 chunk +0 lines, -1 line 0 comments Download
M content/test/webrtc_audio_device_test.cc View 1 2 4 chunks +13 lines, -12 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
no longer working on chromium
Tommi, could you please take a lead on reviewing this patch? Thanks, BR, /SX
8 years, 5 months ago (2012-07-17 15:19:37 UTC) #1
tommi (sloooow) - chröme
looks good in general. Just a few questions. https://chromiumcodereview.appspot.com/10786029/diff/2001/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc File content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc (right): https://chromiumcodereview.appspot.com/10786029/diff/2001/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc#newcode205 content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc:205: message_loop_.reset(); ...
8 years, 5 months ago (2012-07-17 15:36:58 UTC) #2
jam
content/browser/browser_main_loop.cc lgtm
8 years, 5 months ago (2012-07-17 15:54:34 UTC) #3
no longer working on chromium
https://chromiumcodereview.appspot.com/10786029/diff/2001/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc File content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc (right): https://chromiumcodereview.appspot.com/10786029/diff/2001/content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc#newcode205 content/browser/renderer_host/media/media_stream_dispatcher_host_unittest.cc:205: message_loop_.reset(); On 2012/07/17 15:36:58, tommi wrote: > Did you ...
8 years, 5 months ago (2012-07-17 17:18:25 UTC) #4
tommi (sloooow) - chröme
lgtm
8 years, 5 months ago (2012-07-17 19:46:51 UTC) #5
no longer working on chromium
Tommi, could you please take one more look at the patch set 4? MediaStreamDeviceSettings needs ...
8 years, 5 months ago (2012-07-18 08:04:00 UTC) #6
tommi (sloooow) - chröme
https://chromiumcodereview.appspot.com/10786029/diff/13001/content/browser/renderer_host/media/media_stream_device_settings.cc File content/browser/renderer_host/media/media_stream_device_settings.cc (right): https://chromiumcodereview.appspot.com/10786029/diff/13001/content/browser/renderer_host/media/media_stream_device_settings.cc#newcode46 content/browser/renderer_host/media/media_stream_device_settings.cc:46: if (!settings_) it's better to do this check only ...
8 years, 5 months ago (2012-07-18 08:15:22 UTC) #7
no longer working on chromium
https://chromiumcodereview.appspot.com/10786029/diff/13001/content/browser/renderer_host/media/media_stream_device_settings.cc File content/browser/renderer_host/media/media_stream_device_settings.cc (right): https://chromiumcodereview.appspot.com/10786029/diff/13001/content/browser/renderer_host/media/media_stream_device_settings.cc#newcode46 content/browser/renderer_host/media/media_stream_device_settings.cc:46: if (!settings_) On 2012/07/18 08:15:23, tommi wrote: > it's ...
8 years, 5 months ago (2012-07-18 09:39:28 UTC) #8
tommi (sloooow) - chröme
On 2012/07/18 09:39:28, xians1 wrote: > https://chromiumcodereview.appspot.com/10786029/diff/13001/content/browser/renderer_host/media/media_stream_device_settings.cc > File content/browser/renderer_host/media/media_stream_device_settings.cc > (right): > > https://chromiumcodereview.appspot.com/10786029/diff/13001/content/browser/renderer_host/media/media_stream_device_settings.cc#newcode46 ...
8 years, 5 months ago (2012-07-18 10:15:35 UTC) #9
no longer working on chromium
On 2012/07/18 10:15:35, tommi wrote: > On 2012/07/18 09:39:28, xians1 wrote: > > > https://chromiumcodereview.appspot.com/10786029/diff/13001/content/browser/renderer_host/media/media_stream_device_settings.cc ...
8 years, 5 months ago (2012-07-18 11:55:11 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/10786029/16002
8 years, 5 months ago (2012-07-18 11:58:13 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/xians@chromium.org/10786029/23002
8 years, 5 months ago (2012-07-18 13:24:07 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/10786029/25009
8 years, 5 months ago (2012-07-18 13:38:21 UTC) #13
commit-bot: I haz the power
8 years, 5 months ago (2012-07-18 15:06:04 UTC) #14
Change committed as 147240

Powered by Google App Engine
This is Rietveld 408576698