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

Issue 558623002: Video capture: Refactor GetBestMatchedFormat from Win to OS independent (Closed)

Created:
6 years, 3 months ago by magjed_chromium
Modified:
6 years, 2 months ago
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Video capture: Refactor GetBestMatchedFormat Committed: https://crrev.com/04320485ac67d967ead8f4fc267c254293f33ba7 Cr-Commit-Position: refs/heads/master@{#299499}

Patch Set 1 #

Patch Set 2 : fix mac syntax error #

Total comments: 11

Patch Set 3 : tommi@s and mcasas@ comments #

Patch Set 4 : Change diff function to handle rational frame rates #

Patch Set 5 : rebase #

Total comments: 7

Patch Set 6 : mcasas@ comments #

Total comments: 2

Patch Set 7 : change diff type from int to float #

Total comments: 4

Patch Set 8 : preserve original behaviour #

Total comments: 6

Patch Set 9 : sort pixel formats in order of preference #

Total comments: 10

Patch Set 10 : offline discussion and revert pixel format order #

Patch Set 11 : replace std::min_element and std::bind with loop #

Total comments: 6

Patch Set 12 : remove braces in if statement #

Unified diffs Side-by-side diffs Delta from patch set Stats (+93 lines, -223 lines) Patch
M media/video/capture/mac/video_capture_device_mac.mm View 1 2 3 4 5 6 7 5 chunks +16 lines, -24 lines 0 comments Download
M media/video/capture/win/capability_list_win.h View 1 2 3 4 5 6 7 8 9 1 chunk +6 lines, -34 lines 0 comments Download
M media/video/capture/win/capability_list_win.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +35 lines, -102 lines 0 comments Download
M media/video/capture/win/video_capture_device_mf_win.cc View 1 2 3 4 5 6 7 8 9 3 chunks +14 lines, -28 lines 0 comments Download
M media/video/capture/win/video_capture_device_win.cc View 1 2 3 4 5 6 7 8 9 3 chunks +22 lines, -35 lines 0 comments Download

Messages

Total messages: 43 (14 generated)
magjed_chromium
Please take a look.
6 years, 3 months ago (2014-09-09 14:37:02 UTC) #2
tommi (sloooow) - chröme
https://codereview.chromium.org/558623002/diff/40001/media/video/capture/mac/video_capture_device_mac.mm File media/video/capture/mac/video_capture_device_mac.mm (right): https://codereview.chromium.org/558623002/diff/40001/media/video/capture/mac/video_capture_device_mac.mm#newcode54 media/video/capture/mac/video_capture_device_mac.mm:54: static const gfx::Size kQVGA(320, 240), Do these require static ...
6 years, 3 months ago (2014-09-09 20:11:11 UTC) #3
mcasas
I might not see clearly the reason for all these new classes... What about adding ...
6 years, 3 months ago (2014-09-10 16:52:28 UTC) #4
tommi (sloooow) - chröme
just adding info on COM specifics. The cleanup in this CL generally looks good to ...
6 years, 3 months ago (2014-09-10 17:41:09 UTC) #5
magjed_chromium
I reverted most changes in video_capture_device_mac.mm; trying to reuse code there generates more code than ...
6 years, 3 months ago (2014-09-10 18:34:22 UTC) #11
magjed_chromium
Ping. Can you please take another look?
6 years, 3 months ago (2014-09-23 11:41:45 UTC) #12
mcasas
Couple of comments. Could you add perkj@? https://codereview.chromium.org/558623002/diff/180001/media/video/capture/video_capture_types.cc File media/video/capture/video_capture_types.cc (right): https://codereview.chromium.org/558623002/diff/180001/media/video/capture/video_capture_types.cc#newcode79 media/video/capture/video_capture_types.cc:79: // precedence ...
6 years, 3 months ago (2014-09-23 12:34:57 UTC) #13
tommi (sloooow) - chröme
took a brief look and this lgtm but I think Miguel will have better insights.
6 years, 3 months ago (2014-09-23 14:02:36 UTC) #14
magjed_chromium
+perkj. Per, can you please take a look as well? https://codereview.chromium.org/558623002/diff/180001/media/video/capture/video_capture_types.cc File media/video/capture/video_capture_types.cc (right): https://codereview.chromium.org/558623002/diff/180001/media/video/capture/video_capture_types.cc#newcode84 ...
6 years, 3 months ago (2014-09-23 14:39:55 UTC) #16
mcasas
LGTM modulo my comment below. Hate all those float to int casts :) https://codereview.chromium.org/558623002/diff/200001/media/video/capture/video_capture_types.cc File ...
6 years, 3 months ago (2014-09-23 14:45:32 UTC) #17
magjed_chromium
https://codereview.chromium.org/558623002/diff/200001/media/video/capture/video_capture_types.cc File media/video/capture/video_capture_types.cc (right): https://codereview.chromium.org/558623002/diff/200001/media/video/capture/video_capture_types.cc#newcode79 media/video/capture/video_capture_types.cc:79: return static_cast<int>( On 2014/09/23 14:45:32, mcasas wrote: > Gotcha. ...
6 years, 3 months ago (2014-09-23 15:05:16 UTC) #18
perkj_chrome
nice cleanup but I don't like the change in behaviour. https://codereview.chromium.org/558623002/diff/220001/media/video/capture/video_capture_types.h File media/video/capture/video_capture_types.h (right): https://codereview.chromium.org/558623002/diff/220001/media/video/capture/video_capture_types.h#newcode101 ...
6 years, 3 months ago (2014-09-24 07:56:30 UTC) #19
magjed_chromium
Regarding preserving behaviour: I started off doing that, but after looking at 8 different implementations ...
6 years, 3 months ago (2014-09-24 10:33:25 UTC) #20
perkj_chrome
On 2014/09/24 10:33:25, magjed wrote: > Regarding preserving behaviour: I started off doing that, but ...
6 years, 3 months ago (2014-09-24 10:55:50 UTC) #21
magjed_chromium
perkj: Please take another look. I have restored the original behaviour as you wanted.
6 years, 2 months ago (2014-10-09 16:23:48 UTC) #24
perkj_chrome
https://codereview.chromium.org/558623002/diff/280001/media/video/capture/video_capture_device.cc File media/video/capture/video_capture_device.cc (right): https://codereview.chromium.org/558623002/diff/280001/media/video/capture/video_capture_device.cc#newcode101 media/video/capture/video_capture_device.cc:101: const uint64_t diff_color_format = supported.pixel_format; I am afraid that ...
6 years, 2 months ago (2014-10-10 09:17:14 UTC) #25
magjed_chromium
perkj: PTAL. I changed the order of the pixel formats. https://codereview.chromium.org/558623002/diff/280001/media/video/capture/video_capture_device.cc File media/video/capture/video_capture_device.cc (right): https://codereview.chromium.org/558623002/diff/280001/media/video/capture/video_capture_device.cc#newcode101 ...
6 years, 2 months ago (2014-10-10 11:21:26 UTC) #26
perkj_chrome
lgtm
6 years, 2 months ago (2014-10-13 07:21:51 UTC) #27
magjed_chromium
mcasas: Can you take a look again? I have made some changes since your last ...
6 years, 2 months ago (2014-10-13 07:28:24 UTC) #28
mcasas
https://codereview.chromium.org/558623002/diff/320001/media/video/capture/mac/video_capture_device_mac.mm File media/video/capture/mac/video_capture_device_mac.mm (right): https://codereview.chromium.org/558623002/diff/320001/media/video/capture/mac/video_capture_device_mac.mm#newcode101 media/video/capture/mac/video_capture_device_mac.mm:101: for (size_t i = 0; i < arraysize(kWellSupportedResolutions); ++i) ...
6 years, 2 months ago (2014-10-13 08:18:47 UTC) #29
magjed_chromium
ptal, mcasas: Please take another look. I have moved the Diff-function back to capability_list_win.cc and ...
6 years, 2 months ago (2014-10-14 12:40:37 UTC) #34
mcasas
lgtm modulo our comments about std::bind versus base::Bind, unclear which one to prefer now that ...
6 years, 2 months ago (2014-10-14 14:18:45 UTC) #35
magjed_chromium
mcasas: I removed std::min_element and std::bind and replaced with a for loop instead. Still lgty?
6 years, 2 months ago (2014-10-14 15:11:06 UTC) #36
mcasas
Couple of comments. Almost there. https://codereview.chromium.org/558623002/diff/640001/media/video/capture/win/capability_list_win.cc File media/video/capture/win/capability_list_win.cc (right): https://codereview.chromium.org/558623002/diff/640001/media/video/capture/win/capability_list_win.cc#newcode45 media/video/capture/win/capability_list_win.cc:45: CapabilityWin best_match = capabilities.front(); ...
6 years, 2 months ago (2014-10-14 15:17:35 UTC) #37
magjed_chromium
mcasas: PTAL. https://codereview.chromium.org/558623002/diff/640001/media/video/capture/win/capability_list_win.cc File media/video/capture/win/capability_list_win.cc (right): https://codereview.chromium.org/558623002/diff/640001/media/video/capture/win/capability_list_win.cc#newcode45 media/video/capture/win/capability_list_win.cc:45: CapabilityWin best_match = capabilities.front(); On 2014/10/14 15:17:35, ...
6 years, 2 months ago (2014-10-14 15:27:48 UTC) #38
mcasas
lgtm
6 years, 2 months ago (2014-10-14 15:36:05 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/558623002/660001
6 years, 2 months ago (2014-10-14 15:37:30 UTC) #41
commit-bot: I haz the power
Committed patchset #12 (id:660001)
6 years, 2 months ago (2014-10-14 17:05:02 UTC) #42
commit-bot: I haz the power
6 years, 2 months ago (2014-10-14 17:06:17 UTC) #43
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/04320485ac67d967ead8f4fc267c254293f33ba7
Cr-Commit-Position: refs/heads/master@{#299499}

Powered by Google App Engine
This is Rietveld 408576698