Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(622)

Side by Side Diff: content/common/gpu/media/video_encode_accelerator_unittest.cc

Issue 292183011: Make DefaultDeleter for Video{De|En}codeAccelerator (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile for Impl Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/memory_mapped_file.h" 9 #include "base/files/memory_mapped_file.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 SetStreamParameters(test_stream_.requested_bitrate, 550 SetStreamParameters(test_stream_.requested_bitrate,
551 test_stream_.requested_framerate); 551 test_stream_.requested_framerate);
552 SetState(CS_INITIALIZED); 552 SetState(CS_INITIALIZED);
553 encoder_initialized_time_ = base::TimeTicks::Now(); 553 encoder_initialized_time_ = base::TimeTicks::Now();
554 } 554 }
555 555
556 void VEAClient::DestroyEncoder() { 556 void VEAClient::DestroyEncoder() {
557 DCHECK(thread_checker_.CalledOnValidThread()); 557 DCHECK(thread_checker_.CalledOnValidThread());
558 if (!has_encoder()) 558 if (!has_encoder())
559 return; 559 return;
560 encoder_.release()->Destroy(); 560 encoder_.reset(NULL);
561 } 561 }
562 562
563 double VEAClient::frames_per_second() { 563 double VEAClient::frames_per_second() {
564 base::TimeDelta duration = last_frame_ready_time_ - encoder_initialized_time_; 564 base::TimeDelta duration = last_frame_ready_time_ - encoder_initialized_time_;
565 return num_encoded_frames_ / duration.InSecondsF(); 565 return num_encoded_frames_ / duration.InSecondsF();
566 } 566 }
567 567
568 void VEAClient::RequireBitstreamBuffers(unsigned int input_count, 568 void VEAClient::RequireBitstreamBuffers(unsigned int input_count,
569 const gfx::Size& input_coded_size, 569 const gfx::Size& input_coded_size,
570 size_t output_size) { 570 size_t output_size) {
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 test_stream_data->assign(it->second.c_str()); 1004 test_stream_data->assign(it->second.c_str());
1005 continue; 1005 continue;
1006 } 1006 }
1007 if (it->first == "v" || it->first == "vmodule") 1007 if (it->first == "v" || it->first == "vmodule")
1008 continue; 1008 continue;
1009 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; 1009 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second;
1010 } 1010 }
1011 1011
1012 return RUN_ALL_TESTS(); 1012 return RUN_ALL_TESTS();
1013 } 1013 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698