| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 // This has to be included first. | 7 // This has to be included first. |
| 8 // See http://code.google.com/p/googletest/issues/detail?id=371 | 8 // See http://code.google.com/p/googletest/issues/detail?id=371 |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 | 10 |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 base::FilePath output_file) { | 120 base::FilePath output_file) { |
| 121 x_display_ = XOpenDisplay(NULL); | 121 x_display_ = XOpenDisplay(NULL); |
| 122 if (!x_display_) { | 122 if (!x_display_) { |
| 123 LOG(ERROR) << "Can't open X display"; | 123 LOG(ERROR) << "Can't open X display"; |
| 124 return false; | 124 return false; |
| 125 } | 125 } |
| 126 | 126 |
| 127 media::VideoCodecProfile profile = media::H264PROFILE_BASELINE; | 127 media::VideoCodecProfile profile = media::H264PROFILE_BASELINE; |
| 128 base::Closure report_error_cb = | 128 base::Closure report_error_cb = |
| 129 base::Bind(&LogOnError, VaapiH264Decoder::VAAPI_ERROR); | 129 base::Bind(&LogOnError, VaapiH264Decoder::VAAPI_ERROR); |
| 130 wrapper_ = VaapiWrapper::Create( | 130 wrapper_ = VaapiWrapper::Create(profile, x_display_, report_error_cb); |
| 131 VaapiWrapper::kDecode, profile, x_display_, report_error_cb); | |
| 132 if (!wrapper_.get()) { | 131 if (!wrapper_.get()) { |
| 133 LOG(ERROR) << "Can't create vaapi wrapper"; | 132 LOG(ERROR) << "Can't create vaapi wrapper"; |
| 134 return false; | 133 return false; |
| 135 } | 134 } |
| 136 | 135 |
| 137 decoder_.reset(new VaapiH264Decoder( | 136 decoder_.reset(new VaapiH264Decoder( |
| 138 wrapper_.get(), | 137 wrapper_.get(), |
| 139 base::Bind(&VaapiH264DecoderLoop::OutputPicture, base::Unretained(this)), | 138 base::Bind(&VaapiH264DecoderLoop::OutputPicture, base::Unretained(this)), |
| 140 base::Bind(&LogOnError))); | 139 base::Bind(&LogOnError))); |
| 141 | 140 |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 content::g_md5sum = it->second; | 376 content::g_md5sum = it->second; |
| 378 continue; | 377 continue; |
| 379 } | 378 } |
| 380 if (it->first == "v" || it->first == "vmodule") | 379 if (it->first == "v" || it->first == "vmodule") |
| 381 continue; | 380 continue; |
| 382 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 381 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
| 383 } | 382 } |
| 384 | 383 |
| 385 return RUN_ALL_TESTS(); | 384 return RUN_ALL_TESTS(); |
| 386 } | 385 } |
| OLD | NEW |