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

Issue 189443010: Mac AVFoundation/QTKit: delay DeviceMonitorMac startup to first GetUserMedia. (Closed)

Created:
6 years, 9 months ago by mcasas
Modified:
6 years, 9 months ago
CC:
chromium-reviews, fischman+watch_chromium.org, jam, mcasas+watch_chromium.org, joi+watch-content_chromium.org, feature-media-reviews_chromium.org, darin-cc_chromium.org, wjia+watch_chromium.org, miu+watch_chromium.org
Visibility:
Public.

Description

Mac AVFoundation/QTKit: delay DeviceMonitorMac startup to first GetUserMedia. Currently DeviceMonitorMac is constructed from BrowserMainLoop in the first compasses of Chrome bringup. DeviceMonitorMac creates either a QTKitMonitorImpl or a AVFoundationMonitorImpl, that immediately starts observing the system capture devices. This monitoring is not needed until the user actively starts operating the devices, that happens in MediaStreamManager. This CL adds a method StartMonitoring() to DeviceMonitorMac that is exercised from MediaStreamManager::StartMonitoring(). The performance regression in bugs 349616 and 348020 affects only AVFoundation, but both implementations would benefit from a delayed startup. Tested locally via using --[enable/disable]-avfoundation, connecting and disconnecting devices etc. BUG=288562, 349616, 348020 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256483

Patch Set 1 #

Total comments: 6

Patch Set 2 : rsesek@ comments #

Total comments: 4

Patch Set 3 : Commented method and added base::ThreadChecker to DeviceMonitorMac. #

Patch Set 4 : Change included file device_monitor_mac.h with the forward declaration of the class & necessary met… #

Unified diffs Side-by-side diffs Delta from patch set Stats (+51 lines, -7 lines) Patch
M content/browser/browser_main_loop.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M content/browser/device_monitor_mac.h View 1 2 3 chunks +10 lines, -0 lines 0 comments Download
M content/browser/device_monitor_mac.mm View 1 2 1 chunk +10 lines, -7 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M content/browser/renderer_host/media/media_stream_manager.cc View 1 2 3 2 chunks +22 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
mcasas
rsesek@, tommi@ could you comment on the approach? Thanks!
6 years, 9 months ago (2014-03-10 11:58:17 UTC) #1
Robert Sesek
https://codereview.chromium.org/189443010/diff/1/content/browser/browser_main_loop.h File content/browser/browser_main_loop.h (right): https://codereview.chromium.org/189443010/diff/1/content/browser/browser_main_loop.h#newcode88 content/browser/browser_main_loop.h:88: void StartMonitoring(); This is not the right place to ...
6 years, 9 months ago (2014-03-10 17:22:46 UTC) #2
mcasas
rsesek@, tommi@ PTAL. https://codereview.chromium.org/189443010/diff/1/content/browser/browser_main_loop.h File content/browser/browser_main_loop.h (right): https://codereview.chromium.org/189443010/diff/1/content/browser/browser_main_loop.h#newcode88 content/browser/browser_main_loop.h:88: void StartMonitoring(); On 2014/03/10 17:22:46, rsesek ...
6 years, 9 months ago (2014-03-10 18:19:44 UTC) #3
tommi (sloooow) - chröme
nice. lgtm https://codereview.chromium.org/189443010/diff/20001/content/browser/device_monitor_mac.mm File content/browser/device_monitor_mac.mm (right): https://codereview.chromium.org/189443010/diff/20001/content/browser/device_monitor_mac.mm#newcode348 content/browser/device_monitor_mac.mm:348: void DeviceMonitorMac::StartMonitoring() { Can you add a ...
6 years, 9 months ago (2014-03-10 18:38:26 UTC) #4
Robert Sesek
lgtm https://codereview.chromium.org/189443010/diff/20001/content/browser/device_monitor_mac.h File content/browser/device_monitor_mac.h (right): https://codereview.chromium.org/189443010/diff/20001/content/browser/device_monitor_mac.h#newcode25 content/browser/device_monitor_mac.h:25: void StartMonitoring(); nit: comment
6 years, 9 months ago (2014-03-10 18:45:25 UTC) #5
mcasas
avi@ OWNERS stamp please. rsesek@, tommi@, nits/comments taken in, thanks!. https://codereview.chromium.org/189443010/diff/20001/content/browser/device_monitor_mac.h File content/browser/device_monitor_mac.h (right): https://codereview.chromium.org/189443010/diff/20001/content/browser/device_monitor_mac.h#newcode25 ...
6 years, 9 months ago (2014-03-11 07:57:32 UTC) #6
Avi (use Gerrit)
lgtm stampity stamp
6 years, 9 months ago (2014-03-11 13:31:50 UTC) #7
mcasas
The CQ bit was checked by mcasas@chromium.org
6 years, 9 months ago (2014-03-11 14:03:23 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mcasas@chromium.org/189443010/40001
6 years, 9 months ago (2014-03-11 14:03:29 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-11 14:35:57 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel
6 years, 9 months ago (2014-03-11 14:35:59 UTC) #11
mcasas
The CQ bit was checked by mcasas@chromium.org
6 years, 9 months ago (2014-03-11 18:09:09 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mcasas@chromium.org/189443010/60001
6 years, 9 months ago (2014-03-11 18:12:45 UTC) #13
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-11 21:53:01 UTC) #14
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) unit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_rel&number=279858
6 years, 9 months ago (2014-03-11 21:53:01 UTC) #15
mcasas
The CQ bit was checked by mcasas@chromium.org
6 years, 9 months ago (2014-03-12 05:36:40 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mcasas@chromium.org/189443010/60001
6 years, 9 months ago (2014-03-12 05:37:34 UTC) #17
commit-bot: I haz the power
6 years, 9 months ago (2014-03-12 09:27:28 UTC) #18
Message was sent while issue was closed.
Change committed as 256483

Powered by Google App Engine
This is Rietveld 408576698