| OLD | NEW |
| 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 |
| OLD | NEW |