OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/debug/trace_event.h" | 6 #include "base/debug/trace_event.h" |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "base/stl_util.h" | 9 #include "base/stl_util.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 | 293 |
294 if (!make_context_current_.Run()) | 294 if (!make_context_current_.Run()) |
295 return false; | 295 return false; |
296 | 296 |
297 if (!InitializeFBConfig()) { | 297 if (!InitializeFBConfig()) { |
298 DVLOG(1) << "Could not get a usable FBConfig"; | 298 DVLOG(1) << "Could not get a usable FBConfig"; |
299 return false; | 299 return false; |
300 } | 300 } |
301 | 301 |
302 vaapi_wrapper_ = VaapiWrapper::Create( | 302 vaapi_wrapper_ = VaapiWrapper::Create( |
303 profile, x_display_, | 303 VaapiWrapper::kDecode, |
| 304 profile, |
| 305 x_display_, |
304 base::Bind(&ReportToUMA, content::VaapiH264Decoder::VAAPI_ERROR)); | 306 base::Bind(&ReportToUMA, content::VaapiH264Decoder::VAAPI_ERROR)); |
305 | 307 |
306 if (!vaapi_wrapper_.get()) { | 308 if (!vaapi_wrapper_.get()) { |
307 DVLOG(1) << "Failed initializing VAAPI"; | 309 DVLOG(1) << "Failed initializing VAAPI"; |
308 return false; | 310 return false; |
309 } | 311 } |
310 | 312 |
311 decoder_.reset( | 313 decoder_.reset( |
312 new VaapiH264Decoder( | 314 new VaapiH264Decoder( |
313 vaapi_wrapper_.get(), | 315 vaapi_wrapper_.get(), |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 DCHECK_EQ(message_loop_, base::MessageLoop::current()); | 914 DCHECK_EQ(message_loop_, base::MessageLoop::current()); |
913 Cleanup(); | 915 Cleanup(); |
914 delete this; | 916 delete this; |
915 } | 917 } |
916 | 918 |
917 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() { | 919 bool VaapiVideoDecodeAccelerator::CanDecodeOnIOThread() { |
918 return false; | 920 return false; |
919 } | 921 } |
920 | 922 |
921 } // namespace content | 923 } // namespace content |
OLD | NEW |