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

Issue 2735783002: Stop assuming anything about result of MFStartup() (Closed)

Created:
3 years, 9 months ago by wdzierzanowski
Modified:
3 years, 9 months ago
Reviewers:
DaleCurtis
CC:
chromium-reviews, feature-media-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Stop assuming anything about result of MFStartup() MFStartup() usually returns S_OK. However, being a system library function it doesn't have to, and we have no control over it. It can return an error when something goes wrong within Media Foundation, or simply on an "N" edition of Windows that doesn't even have Media Foundation. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2735783002 Cr-Commit-Position: refs/heads/master@{#456026} Committed: https://chromium.googlesource.com/chromium/src/+/6d55717cd047b3d79e3cc41ea1a4e7df50b8c171

Patch Set 1 #

Patch Set 2 : Handle InitializeMediaFoundation() return value #

Total comments: 2

Patch Set 3 : Mention "N" edition #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -8 lines) Patch
M media/base/win/mf_initializer.h View 1 2 1 chunk +5 lines, -2 lines 0 comments Download
M media/base/win/mf_initializer.cc View 1 1 chunk +5 lines, -3 lines 0 comments Download
M media/capture/video/win/video_capture_device_factory_win.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M media/gpu/dxva_video_decode_accelerator_win.cc View 1 1 chunk +3 lines, -1 line 0 comments Download
M media/gpu/media_foundation_video_encode_accelerator_win.cc View 1 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 22 (6 generated)
wdzierzanowski
Hello Dale, PTAL.
3 years, 9 months ago (2017-03-06 15:30:00 UTC) #2
DaleCurtis
DLOG_IF(ERROR, results != S_OK) ?
3 years, 9 months ago (2017-03-06 17:44:33 UTC) #3
wdzierzanowski
Is it an "error" though? To me at least it looks more like a capability ...
3 years, 9 months ago (2017-03-06 21:29:01 UTC) #4
DaleCurtis
Since we assume it will succeed and calling code has no idea that this may ...
3 years, 9 months ago (2017-03-06 21:45:18 UTC) #5
wdzierzanowski
I think the current assumption is that MFStartup() must be called once per process for ...
3 years, 9 months ago (2017-03-07 07:52:58 UTC) #6
DaleCurtis
Since this is a static though we can let code call this at any call ...
3 years, 9 months ago (2017-03-07 18:22:21 UTC) #7
wdzierzanowski
On 2017/03/07 18:22:21, DaleCurtis wrote: > Since this is a static though we can let ...
3 years, 9 months ago (2017-03-07 18:57:21 UTC) #8
DaleCurtis
On 2017/03/07 at 18:57:21, wdzierzanowski wrote: > On 2017/03/07 18:22:21, DaleCurtis wrote: > > Since ...
3 years, 9 months ago (2017-03-07 19:16:21 UTC) #9
wdzierzanowski
Makes sense. It'll now be a small refactoring task rather than a trivial bug fix, ...
3 years, 9 months ago (2017-03-07 19:28:18 UTC) #10
wdzierzanowski
Done in patch set 2.
3 years, 9 months ago (2017-03-08 08:17:09 UTC) #12
DaleCurtis
lgtm, thanks for bearing with me!
3 years, 9 months ago (2017-03-09 20:07:31 UTC) #13
DaleCurtis
https://codereview.chromium.org/2735783002/diff/20001/media/base/win/mf_initializer.h File media/base/win/mf_initializer.h (right): https://codereview.chromium.org/2735783002/diff/20001/media/base/win/mf_initializer.h#newcode12 media/base/win/mf_initializer.h:12: // Makes sure MFStartup() is called exactly once. Returns ...
3 years, 9 months ago (2017-03-09 20:08:14 UTC) #14
wdzierzanowski
https://codereview.chromium.org/2735783002/diff/20001/media/base/win/mf_initializer.h File media/base/win/mf_initializer.h (right): https://codereview.chromium.org/2735783002/diff/20001/media/base/win/mf_initializer.h#newcode12 media/base/win/mf_initializer.h:12: // Makes sure MFStartup() is called exactly once. Returns ...
3 years, 9 months ago (2017-03-09 22:14:36 UTC) #15
wdzierzanowski
Thanks for reviewing!
3 years, 9 months ago (2017-03-10 07:40:09 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2735783002/40001
3 years, 9 months ago (2017-03-10 07:40:39 UTC) #19
commit-bot: I haz the power
3 years, 9 months ago (2017-03-10 09:06:18 UTC) #22
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/6d55717cd047b3d79e3cc41ea1a4...

Powered by Google App Engine
This is Rietveld 408576698