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

Issue 6946001: VideoCaptureManager opens/closes, starts/stops and enumerates video capture devices. VideoCapture... (Closed)

Created:
9 years, 7 months ago by mflodman1
Modified:
9 years, 6 months ago
Visibility:
Public.

Description

VideoCaptureManager opens/closes, starts/stops and enumerates video capture devices. VideoCaptureManager Open/Close/EnumerateDevices will be used by MediaStreamManager (will be added later) to implement parts of WhatWG peer connection API. VideoCaptureHost (will also be added later) will call Start/Stop to controll the media flow. A unit test is provided and added to chrome/chrome_tests.gypi. content/browser/media_stream/media_stream_provider.h will later be inherited by an audio capture manager as well. patch by mflodman@google.com BUG=none TEST=try bots Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86511

Patch Set 1 #

Total comments: 48

Patch Set 2 : '' #

Patch Set 3 : VideoCaptureManager.cc error check changes #

Total comments: 52

Patch Set 4 : '' #

Patch Set 5 : Small change to unit test mock version of listener. #

Total comments: 4

Patch Set 6 : Unit test changs based on review by wjia. #

Patch Set 7 : Removing unnecessary checks in unittest that might fail on try server #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+922 lines, -0 lines) Patch
M chrome/chrome_tests.gypi View 1 2 1 chunk +1 line, -0 lines 0 comments Download
A content/browser/media_stream/media_stream_provider.h View 1 2 3 1 chunk +113 lines, -0 lines 4 comments Download
A content/browser/media_stream/video_capture_manager.h View 1 2 3 1 chunk +125 lines, -0 lines 0 comments Download
A content/browser/media_stream/video_capture_manager.cc View 1 2 3 1 chunk +382 lines, -0 lines 8 comments Download
A content/browser/media_stream/video_capture_manager_unittest.cc View 1 2 3 4 5 6 1 chunk +298 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
mflodman1
Commented on lint errors. http://codereview.chromium.org/6946001/diff/1/content/browser/media_stream/media_stream_provider.h File content/browser/media_stream/media_stream_provider.h (right): http://codereview.chromium.org/6946001/diff/1/content/browser/media_stream/media_stream_provider.h#newcode92 content/browser/media_stream/media_stream_provider.h:92: #endif // CONTENT_BROWSER_MEDIA_STREAM_MEDIA_STREAM_PROVIDER_H_ Will add ...
9 years, 7 months ago (2011-05-05 11:11:21 UTC) #1
wjia(left Chromium)
I will take another look at the unit test later. http://codereview.chromium.org/6946001/diff/1/content/browser/media_stream/media_stream_provider.h File content/browser/media_stream/media_stream_provider.h (right): http://codereview.chromium.org/6946001/diff/1/content/browser/media_stream/media_stream_provider.h#newcode13 ...
9 years, 7 months ago (2011-05-06 00:11:31 UTC) #2
mflodman1
http://codereview.chromium.org/6946001/diff/1/content/browser/media_stream/media_stream_provider.h File content/browser/media_stream/media_stream_provider.h (right): http://codereview.chromium.org/6946001/diff/1/content/browser/media_stream/media_stream_provider.h#newcode13 content/browser/media_stream/media_stream_provider.h:13: typedef int MediaCaptureSessionId; Yes it is. We need to ...
9 years, 7 months ago (2011-05-06 11:52:38 UTC) #3
mflodman1
Updated two error checks for video_capture_manager.cc and synced with Chrome LKGR, r84920.
9 years, 7 months ago (2011-05-11 07:50:15 UTC) #4
John Knottenbelt
Thanks for doing this guys, much appreciated! http://codereview.chromium.org/6946001/diff/11001/content/browser/media_stream/media_stream_provider.h File content/browser/media_stream/media_stream_provider.h (right): http://codereview.chromium.org/6946001/diff/11001/content/browser/media_stream/media_stream_provider.h#newcode53 content/browser/media_stream/media_stream_provider.h:53: // Feedback ...
9 years, 7 months ago (2011-05-11 11:36:35 UTC) #5
mflodman1
Thanks for the comments John! Most of them are applied to the code, a few ...
9 years, 7 months ago (2011-05-15 20:24:00 UTC) #6
John Knottenbelt
LGTM Thanks, Magnus.
9 years, 7 months ago (2011-05-16 09:55:44 UTC) #7
wjia(left Chromium)
This round is for unit test. In general, you can simplify those interfacing classes with ...
9 years, 7 months ago (2011-05-18 22:45:25 UTC) #8
mflodman1
Unit test changed based on wjia's comments. http://codereview.chromium.org/6946001/diff/23001/content/browser/media_stream/video_capture_manager_unittest.cc File content/browser/media_stream/video_capture_manager_unittest.cc (right): http://codereview.chromium.org/6946001/diff/23001/content/browser/media_stream/video_capture_manager_unittest.cc#newcode41 content/browser/media_stream/video_capture_manager_unittest.cc:41: MediaCaptureSessionId capture_session_id) ...
9 years, 7 months ago (2011-05-19 07:37:28 UTC) #9
mflodman1
Removed unnecessary test from the unit test. The test checked if we received data from ...
9 years, 7 months ago (2011-05-23 17:04:38 UTC) #10
wjia(left Chromium)
+brettw Brett, could you take a look?
9 years, 7 months ago (2011-05-24 20:40:06 UTC) #11
brettw
Just some style nits, LGTM with this. http://codereview.chromium.org/6946001/diff/34001/content/browser/media_stream/media_stream_provider.h File content/browser/media_stream/media_stream_provider.h (right): http://codereview.chromium.org/6946001/diff/34001/content/browser/media_stream/media_stream_provider.h#newcode43 content/browser/media_stream/media_stream_provider.h:43: MediaStreamType stream_type; ...
9 years, 7 months ago (2011-05-24 20:49:30 UTC) #12
mflodman1
Thanks Brett, John and Wei for all feedback and help!
9 years, 7 months ago (2011-05-25 08:59:36 UTC) #13
wjia(left Chromium)
9 years, 6 months ago (2011-05-31 18:47:03 UTC) #14
send out pending comments to fully close this issue on review server.

http://codereview.chromium.org/6946001/diff/34001/content/browser/media_strea...
File content/browser/media_stream/media_stream_provider.h (right):

http://codereview.chromium.org/6946001/diff/34001/content/browser/media_strea...
content/browser/media_stream/media_stream_provider.h:43: MediaStreamType
stream_type;
On 2011/05/24 20:49:30, brettw wrote:
> Data should come after the functions.

Done.

http://codereview.chromium.org/6946001/diff/34001/content/browser/media_strea...
content/browser/media_stream/media_stream_provider.h:48:
MediaCaptureDeviceInfo() : stream_type(kNoService), name(), device_id(),
On 2011/05/24 20:49:30, brettw wrote:
> If initializers don't fit all one one line, format them like you do the second
> constructor (with each one on separate lines).

Done.

http://codereview.chromium.org/6946001/diff/34001/content/browser/media_strea...
File content/browser/media_stream/video_capture_manager.cc (right):

http://codereview.chromium.org/6946001/diff/34001/content/browser/media_strea...
content/browser/media_stream/video_capture_manager.cc:14: // Starting id for the
first capture session
On 2011/05/24 20:49:30, brettw wrote:
> All of your comments should be complete sentences with periods at the end.

Done.

http://codereview.chromium.org/6946001/diff/34001/content/browser/media_strea...
content/browser/media_stream/video_capture_manager.cc:15: enum { kFirstSessionId
= 2};
On 2011/05/24 20:49:30, brettw wrote:
> This value is a bit mysterious. The comment should probably say why you picked
> this value or use 1.

change it to kFirstSessionId = VideoCaptureManager::kStartOpenSessionId + 1.

http://codereview.chromium.org/6946001/diff/34001/content/browser/media_strea...
content/browser/media_stream/video_capture_manager.cc:130:
device_names.get()->begin(); it != device_names.get()->end(); ++it) {
On 2011/05/24 20:49:30, brettw wrote:
> Wrapped lines should be indented to inside the (. Normalyy we would indent
this
> an extra 4 spaces to differentiate it from the beginning of the next
"argument"
> (so under the "a").

Done.

http://codereview.chromium.org/6946001/diff/34001/content/browser/media_strea...
content/browser/media_stream/video_capture_manager.cc:136: // Let the listener
know the result
On 2011/05/24 20:49:30, brettw wrote:
> This comment and the next one don't add any value, I'd remove them.

Done.

Powered by Google App Engine
This is Rietveld 408576698