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

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

Issue 136903003: cast: Wire upp logging to be sent over RTCP between receiver and sender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge TOT Created 6 years, 11 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
« no previous file with comments | « media/cast/rtcp/rtcp_unittest.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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 } // namespace 71 } // namespace
72 72
73 class EncodeDecodeTest : public ::testing::Test { 73 class EncodeDecodeTest : public ::testing::Test {
74 protected: 74 protected:
75 EncodeDecodeTest() 75 EncodeDecodeTest()
76 : task_runner_(new test::FakeTaskRunner(&testing_clock_)), 76 : task_runner_(new test::FakeTaskRunner(&testing_clock_)),
77 // CastEnvironment will only be used by the vp8 decoder; Enable only the 77 // CastEnvironment will only be used by the vp8 decoder; Enable only the
78 // video decoder and main threads. 78 // video decoder and main threads.
79 cast_environment_(new CastEnvironment(&testing_clock_, task_runner_, 79 cast_environment_(new CastEnvironment(&testing_clock_, task_runner_,
80 NULL, NULL, NULL, task_runner_, NULL, 80 NULL, NULL, NULL, task_runner_, NULL,
81 GetDefaultCastLoggingConfig())), 81 GetDefaultCastReceiverLoggingConfig())),
82 test_callback_(new EncodeDecodeTestFrameCallback()) { 82 test_callback_(new EncodeDecodeTestFrameCallback()) {
83 testing_clock_.Advance( 83 testing_clock_.Advance(
84 base::TimeDelta::FromMilliseconds(kStartMillisecond)); 84 base::TimeDelta::FromMilliseconds(kStartMillisecond));
85 encoder_config_.max_number_of_video_buffers_used = 1; 85 encoder_config_.max_number_of_video_buffers_used = 1;
86 encoder_config_.number_of_cores = 1; 86 encoder_config_.number_of_cores = 1;
87 encoder_config_.width = kWidth; 87 encoder_config_.width = kWidth;
88 encoder_config_.height = kHeight; 88 encoder_config_.height = kHeight;
89 encoder_config_.start_bitrate = kStartbitrate; 89 encoder_config_.start_bitrate = kStartbitrate;
90 encoder_config_.min_qp = kMaxQp; 90 encoder_config_.min_qp = kMaxQp;
91 encoder_config_.min_qp = kMinQp; 91 encoder_config_.min_qp = kMinQp;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 encoder_->Encode(video_frame_, &encoded_frame); 124 encoder_->Encode(video_frame_, &encoded_frame);
125 EXPECT_GT(encoded_frame.data.size(), GG_UINT64_C(0)); 125 EXPECT_GT(encoded_frame.data.size(), GG_UINT64_C(0));
126 // Decode frame. 126 // Decode frame.
127 decoder_->Decode(&encoded_frame, base::TimeTicks(), base::Bind( 127 decoder_->Decode(&encoded_frame, base::TimeTicks(), base::Bind(
128 &EncodeDecodeTestFrameCallback::DecodeComplete, test_callback_)); 128 &EncodeDecodeTestFrameCallback::DecodeComplete, test_callback_));
129 task_runner_->RunTasks(); 129 task_runner_->RunTasks();
130 } 130 }
131 131
132 } // namespace cast 132 } // namespace cast
133 } // namespace media 133 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/rtcp/rtcp_unittest.cc ('k') | media/cast/test/end2end_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698