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

Side by Side Diff: media/cast/test/encode_decode_test.cc

Issue 228313002: Cast: Use 2 threads for encoding on capable systems (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 // Joint encoder and decoder testing. 5 // Joint encoder and decoder testing.
6 // These tests operate directly on the VP8 encoder and decoder, not the 6 // These tests operate directly on the VP8 encoder and decoder, not the
7 // transport layer, and are targeted at validating the bit stream. 7 // transport layer, and are targeted at validating the bit stream.
8 8
9 #include <gtest/gtest.h> 9 #include <gtest/gtest.h>
10 #include <stdint.h> 10 #include <stdint.h>
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 // video and main threads. 77 // video and main threads.
78 cast_environment_(new CastEnvironment( 78 cast_environment_(new CastEnvironment(
79 scoped_ptr<base::TickClock>(testing_clock_).Pass(), 79 scoped_ptr<base::TickClock>(testing_clock_).Pass(),
80 task_runner_, 80 task_runner_,
81 NULL, 81 NULL,
82 task_runner_)), 82 task_runner_)),
83 test_callback_(new EncodeDecodeTestFrameCallback()) { 83 test_callback_(new EncodeDecodeTestFrameCallback()) {
84 testing_clock_->Advance( 84 testing_clock_->Advance(
85 base::TimeDelta::FromMilliseconds(kStartMillisecond)); 85 base::TimeDelta::FromMilliseconds(kStartMillisecond));
86 encoder_config_.max_number_of_video_buffers_used = 1; 86 encoder_config_.max_number_of_video_buffers_used = 1;
87 encoder_config_.number_of_cores = 1;
88 encoder_config_.width = kWidth; 87 encoder_config_.width = kWidth;
89 encoder_config_.height = kHeight; 88 encoder_config_.height = kHeight;
90 encoder_config_.start_bitrate = kStartbitrate; 89 encoder_config_.start_bitrate = kStartbitrate;
91 encoder_config_.min_qp = kMaxQp; 90 encoder_config_.min_qp = kMaxQp;
92 encoder_config_.min_qp = kMinQp; 91 encoder_config_.min_qp = kMinQp;
93 encoder_config_.max_frame_rate = kMaxFrameRate; 92 encoder_config_.max_frame_rate = kMaxFrameRate;
94 int max_unacked_frames = 1; 93 int max_unacked_frames = 1;
95 encoder_.reset(new Vp8Encoder(encoder_config_, max_unacked_frames)); 94 encoder_.reset(new Vp8Encoder(encoder_config_, max_unacked_frames));
96 // Initialize to use one core. 95 // Initialize to use one core.
97 decoder_.reset(new Vp8Decoder(cast_environment_)); 96 decoder_.reset(new Vp8Decoder(cast_environment_));
(...skipping 30 matching lines...) Expand all
128 // Decode frame. 127 // Decode frame.
129 decoder_->Decode(&encoded_frame, 128 decoder_->Decode(&encoded_frame,
130 base::TimeTicks(), 129 base::TimeTicks(),
131 base::Bind(&EncodeDecodeTestFrameCallback::DecodeComplete, 130 base::Bind(&EncodeDecodeTestFrameCallback::DecodeComplete,
132 test_callback_)); 131 test_callback_));
133 task_runner_->RunTasks(); 132 task_runner_->RunTasks();
134 } 133 }
135 134
136 } // namespace cast 135 } // namespace cast
137 } // namespace media 136 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698