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

Side by Side Diff: media/base/win/mf_initializer.cc

Issue 2735783002: Stop assuming anything about result of MFStartup() (Closed)
Patch Set: Mention "N" edition Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/base/win/mf_initializer.h" 5 #include "media/base/win/mf_initializer.h"
6 6
7 #include <mfapi.h> 7 #include <mfapi.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
11 namespace media { 11 namespace media {
12 12
13 void InitializeMediaFoundation() { 13 bool InitializeMediaFoundation() {
14 static HRESULT result = MFStartup(MF_VERSION, MFSTARTUP_LITE); 14 static const bool success = MFStartup(MF_VERSION, MFSTARTUP_LITE) == S_OK;
15 DCHECK_EQ(result, S_OK); 15 DVLOG_IF(1, !success)
16 << "Media Foundation unavailable or it failed to initialize";
17 return success;
16 } 18 }
17 19
18 } // namespace media 20 } // namespace media
OLDNEW
« no previous file with comments | « media/base/win/mf_initializer.h ('k') | media/capture/video/win/video_capture_device_factory_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698