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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 return false; | 143 return false; |
144 } | 144 } |
145 | 145 |
146 const int input_id = 0; // We don't use input_id in this class. | 146 const int input_id = 0; // We don't use input_id in this class. |
147 decoder_->SetStream( | 147 decoder_->SetStream( |
148 reinterpret_cast<const uint8*>(data_.c_str()), data_.size(), input_id); | 148 reinterpret_cast<const uint8*>(data_.c_str()), data_.size(), input_id); |
149 | 149 |
150 // This creates or truncates output_file. | 150 // This creates or truncates output_file. |
151 // Without it, AppendToFile() will not work. | 151 // Without it, AppendToFile() will not work. |
152 if (!output_file.empty()) { | 152 if (!output_file.empty()) { |
153 if (file_util::WriteFile(output_file, NULL, 0) != 0) { | 153 if (base::WriteFile(output_file, NULL, 0) != 0) { |
154 return false; | 154 return false; |
155 } | 155 } |
156 output_file_ = output_file; | 156 output_file_ = output_file; |
157 } | 157 } |
158 | 158 |
159 return true; | 159 return true; |
160 } | 160 } |
161 | 161 |
162 bool VaapiH264DecoderLoop::Run() { | 162 bool VaapiH264DecoderLoop::Run() { |
163 while (1) { | 163 while (1) { |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 content::g_md5sum = it->second; | 378 content::g_md5sum = it->second; |
379 continue; | 379 continue; |
380 } | 380 } |
381 if (it->first == "v" || it->first == "vmodule") | 381 if (it->first == "v" || it->first == "vmodule") |
382 continue; | 382 continue; |
383 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 383 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
384 } | 384 } |
385 | 385 |
386 return RUN_ALL_TESTS(); | 386 return RUN_ALL_TESTS(); |
387 } | 387 } |
OLD | NEW |