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

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

Issue 69603002: Incorporating logging into Cast (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding scoped_ptr include Created 7 years, 1 month 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
« no previous file with comments | « media/cast/rtp_sender/rtp_sender.cc ('k') | media/cast/test/end2end_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 }; 67 };
68 } // namespace 68 } // namespace
69 69
70 class EncodeDecodeTest : public ::testing::Test { 70 class EncodeDecodeTest : public ::testing::Test {
71 protected: 71 protected:
72 EncodeDecodeTest() 72 EncodeDecodeTest()
73 : task_runner_(new test::FakeTaskRunner(&testing_clock_)), 73 : task_runner_(new test::FakeTaskRunner(&testing_clock_)),
74 // CastEnvironment will only be used by the vp8 decoder; Enable only the 74 // CastEnvironment will only be used by the vp8 decoder; Enable only the
75 // video decoder and main threads. 75 // video decoder and main threads.
76 cast_environment_(new CastEnvironment(&testing_clock_, task_runner_, 76 cast_environment_(new CastEnvironment(&testing_clock_, task_runner_,
77 NULL, NULL, NULL, task_runner_)), 77 NULL, NULL, NULL, task_runner_, GetDefaultCastLoggingConfig())),
78 test_callback_(new EncodeDecodeTestFrameCallback()) { 78 test_callback_(new EncodeDecodeTestFrameCallback()) {
79 testing_clock_.Advance( 79 testing_clock_.Advance(
80 base::TimeDelta::FromMilliseconds(kStartMillisecond)); 80 base::TimeDelta::FromMilliseconds(kStartMillisecond));
81 encoder_config_.max_number_of_video_buffers_used = 1; 81 encoder_config_.max_number_of_video_buffers_used = 1;
82 encoder_config_.number_of_cores = 1; 82 encoder_config_.number_of_cores = 1;
83 encoder_config_.width = kWidth; 83 encoder_config_.width = kWidth;
84 encoder_config_.height = kHeight; 84 encoder_config_.height = kHeight;
85 encoder_config_.start_bitrate = kStartbitrate; 85 encoder_config_.start_bitrate = kStartbitrate;
86 encoder_config_.min_qp = kMaxQp; 86 encoder_config_.min_qp = kMaxQp;
87 encoder_config_.min_qp = kMinQp; 87 encoder_config_.min_qp = kMinQp;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 encoder_->Encode(*(video_frame_.get()), &encoded_frame); 126 encoder_->Encode(*(video_frame_.get()), &encoded_frame);
127 EXPECT_GT(encoded_frame.data.size(), GG_UINT64_C(0)); 127 EXPECT_GT(encoded_frame.data.size(), GG_UINT64_C(0));
128 // Decode frame. 128 // Decode frame.
129 decoder_->Decode(&encoded_frame, base::TimeTicks(), base::Bind( 129 decoder_->Decode(&encoded_frame, base::TimeTicks(), base::Bind(
130 &EncodeDecodeTestFrameCallback::DecodeComplete, test_callback_)); 130 &EncodeDecodeTestFrameCallback::DecodeComplete, test_callback_));
131 task_runner_->RunTasks(); 131 task_runner_->RunTasks();
132 } 132 }
133 133
134 } // namespace cast 134 } // namespace cast
135 } // namespace media 135 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/rtp_sender/rtp_sender.cc ('k') | media/cast/test/end2end_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698