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 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 const scoped_refptr<media::VideoFrame>& frame) { | 241 const scoped_refptr<media::VideoFrame>& frame) { |
242 frame->HashFrameForTesting(&md5_context_); | 242 frame->HashFrameForTesting(&md5_context_); |
243 | 243 |
244 if (output_file_.empty()) | 244 if (output_file_.empty()) |
245 return true; | 245 return true; |
246 | 246 |
247 for (size_t i = 0; i < media::VideoFrame::NumPlanes(frame->format()); i++) { | 247 for (size_t i = 0; i < media::VideoFrame::NumPlanes(frame->format()); i++) { |
248 int to_write = media::VideoFrame::PlaneAllocationSize( | 248 int to_write = media::VideoFrame::PlaneAllocationSize( |
249 frame->format(), i, frame->coded_size()); | 249 frame->format(), i, frame->coded_size()); |
250 const char* buf = reinterpret_cast<const char*>(frame->data(i)); | 250 const char* buf = reinterpret_cast<const char*>(frame->data(i)); |
251 int written = file_util::AppendToFile(output_file_, buf, to_write); | 251 int written = base::AppendToFile(output_file_, buf, to_write); |
252 if (written != to_write) | 252 if (written != to_write) |
253 return false; | 253 return false; |
254 } | 254 } |
255 return true; | 255 return true; |
256 } | 256 } |
257 | 257 |
258 void VaapiH264DecoderLoop::OutputPicture( | 258 void VaapiH264DecoderLoop::OutputPicture( |
259 int32 input_id, | 259 int32 input_id, |
260 const scoped_refptr<VASurface>& va_surface) { | 260 const scoped_refptr<VASurface>& va_surface) { |
261 VLOG(1) << "OutputPicture: picture " << num_outputted_pictures_++; | 261 VLOG(1) << "OutputPicture: picture " << num_outputted_pictures_++; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 content::g_md5sum = it->second; | 376 content::g_md5sum = it->second; |
377 continue; | 377 continue; |
378 } | 378 } |
379 if (it->first == "v" || it->first == "vmodule") | 379 if (it->first == "v" || it->first == "vmodule") |
380 continue; | 380 continue; |
381 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 381 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
382 } | 382 } |
383 | 383 |
384 return RUN_ALL_TESTS(); | 384 return RUN_ALL_TESTS(); |
385 } | 385 } |
OLD | NEW |