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

Issue 332863002: Video Capture: Allow 0 fps frame rates to be deserializable (Closed)

Created:
6 years, 6 months ago by mcasas
Modified:
6 years, 6 months ago
Reviewers:
perkj_chrome
CC:
chromium-reviews, feature-media-reviews_chromium.org, wjia+watch_chromium.org, mcasas+watch_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Video Capture: Allow 0 fps frame rates to be deserializable Some webcams, notably the Win XSplit broadcaster, indicate 0 fps frame rate when they are not started/ configured. This rate is not deserializable (because is not IsValid()) [1]. This CL allows supported formats with 0 fps to be received via IPC. XSplit walkthrough before-after: Currently when XSplit lists 0 fps, the message cannot be deserialized from the IPC and is discarded; getUserMedia constraint resolution @MediaStreamVideoCapturerSource never progresses since is expecting that message. With this change, 0 fps will be used, and since for unconfigured XSplit this is the only frame rate, it's used (unless the user constrains it via Mandatory constraint). When the 0 fps selected format is passed to the VideoCaptureDeviceWin to be used, this ignores it (since is zero), and the capture happens at whatever frame rate is native to the source. And then we see an XSplit picture indicating this fact. When streaming starts, the picture is substituted with the feed. BUG=383949 [1] https://code.google.com/p/chromium/codesearch#chromium/src/media/video/capture/video_capture_types.cc&sq=package:chromium&type=cs&q=IsValid%20video%20&l=26 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=279078

Patch Set 1 #

Patch Set 2 : Reduced scope to just accept 0fps as deserializable frame rate. #

Patch Set 3 : Skip 0 fps supported format(s). #

Total comments: 1

Patch Set 4 : Back to allowing 0 fps to be (de)serialized. Added test to MSVS. #

Total comments: 1

Patch Set 5 : Added passing 1 frame to MediaStreamVideoSourceTest.Use0FpsSupportedFormat #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -2 lines) Patch
M content/renderer/media/media_stream_video_source_unittest.cc View 1 2 3 4 1 chunk +29 lines, -0 lines 0 comments Download
M media/video/capture/video_capture_types.cc View 1 3 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
mcasas
bemasc@ PTAL.
6 years, 6 months ago (2014-06-12 18:40:06 UTC) #1
bemasc
This seems hacky to me. How about making getDeviceSupportedFormats return bool instead of void? If ...
6 years, 6 months ago (2014-06-12 18:51:38 UTC) #2
mcasas
On 2014/06/12 18:51:38, bemasc wrote: > This seems hacky to me. Changed approach: leaving the ...
6 years, 6 months ago (2014-06-16 10:20:03 UTC) #3
mcasas
perkj@ bemasc@ PTAL.
6 years, 6 months ago (2014-06-16 10:20:25 UTC) #4
perkj_chrome
ok with me but can you please add a test in the render process where ...
6 years, 6 months ago (2014-06-17 09:20:10 UTC) #5
bemasc
Are you sure this is going to work? From the discussion with the XSplit dev ...
6 years, 6 months ago (2014-06-17 14:48:50 UTC) #6
perkj_chrome
https://codereview.chromium.org/332863002/diff/60001/media/video/capture/win/video_capture_device_factory_win.cc File media/video/capture/win/video_capture_device_factory_win.cc (right): https://codereview.chromium.org/332863002/diff/60001/media/video/capture/win/video_capture_device_factory_win.cc#newcode301 media/video/capture/win/video_capture_device_factory_win.cc:301: if (!h->AvgTimePerFrame) So this does not add the format ...
6 years, 6 months ago (2014-06-19 11:23:35 UTC) #7
mcasas
perkj@ PTAL
6 years, 6 months ago (2014-06-19 12:20:41 UTC) #8
perkj_chrome
On 2014/06/19 12:20:41, mcasas wrote: > perkj@ PTAL lgtm with the test comment addressed.
6 years, 6 months ago (2014-06-19 12:26:07 UTC) #9
perkj_chrome
https://codereview.chromium.org/332863002/diff/80001/content/renderer/media/media_stream_video_source_unittest.cc File content/renderer/media/media_stream_video_source_unittest.cc (right): https://codereview.chromium.org/332863002/diff/80001/content/renderer/media/media_stream_video_source_unittest.cc#newcode679 content/renderer/media/media_stream_video_source_unittest.cc:679: EXPECT_EQ(1, NumberOfSuccessConstraintsCallbacks()); Please also deliver a frame to a ...
6 years, 6 months ago (2014-06-19 12:26:14 UTC) #10
mcasas
The CQ bit was checked by mcasas@chromium.org
6 years, 6 months ago (2014-06-23 07:30:47 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mcasas@chromium.org/332863002/100001
6 years, 6 months ago (2014-06-23 07:32:15 UTC) #12
commit-bot: I haz the power
6 years, 6 months ago (2014-06-23 10:04:08 UTC) #13
Message was sent while issue was closed.
Change committed as 279078

Powered by Google App Engine
This is Rietveld 408576698