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

Side by Side Diff: media/cast/video_sender/video_encoder_unittest.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/video_sender/video_encoder.cc ('k') | media/cast/video_sender/video_sender.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 #include <vector> 5 #include <vector>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "media/cast/cast_defines.h" 10 #include "media/cast/cast_defines.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 video_frame_.v_plane.stride = video_frame_.width / 2; 90 video_frame_.v_plane.stride = video_frame_.width / 2;
91 video_frame_.v_plane.length = video_frame_.width / 2; 91 video_frame_.v_plane.length = video_frame_.width / 2;
92 video_frame_.v_plane.data = &(pixels_[0]); 92 video_frame_.v_plane.data = &(pixels_[0]);
93 } 93 }
94 94
95 virtual ~VideoEncoderTest() {} 95 virtual ~VideoEncoderTest() {}
96 96
97 virtual void SetUp() { 97 virtual void SetUp() {
98 task_runner_ = new test::FakeTaskRunner(&testing_clock_); 98 task_runner_ = new test::FakeTaskRunner(&testing_clock_);
99 cast_environment_ = new CastEnvironment(&testing_clock_, task_runner_, 99 cast_environment_ = new CastEnvironment(&testing_clock_, task_runner_,
100 task_runner_, task_runner_, task_runner_, task_runner_); 100 task_runner_, task_runner_, task_runner_, task_runner_,
101 GetDefaultCastLoggingConfig());
101 } 102 }
102 103
103 void Configure(uint8 max_unacked_frames) { 104 void Configure(uint8 max_unacked_frames) {
104 video_encoder_= new VideoEncoder(cast_environment_, video_config_, 105 video_encoder_= new VideoEncoder(cast_environment_, video_config_,
105 max_unacked_frames); 106 max_unacked_frames);
106 video_encoder_controller_ = video_encoder_.get(); 107 video_encoder_controller_ = video_encoder_.get();
107 } 108 }
108 109
109 base::SimpleTestTickClock testing_clock_; 110 base::SimpleTestTickClock testing_clock_;
110 std::vector<uint8> pixels_; 111 std::vector<uint8> pixels_;
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 for (int i = 5; i < 17; ++i) { 249 for (int i = 5; i < 17; ++i) {
249 test_video_encoder_callback_->SetExpectedResult(false, i, 4, capture_time); 250 test_video_encoder_callback_->SetExpectedResult(false, i, 4, capture_time);
250 EXPECT_TRUE(video_encoder_->EncodeVideoFrame(&video_frame_, capture_time, 251 EXPECT_TRUE(video_encoder_->EncodeVideoFrame(&video_frame_, capture_time,
251 frame_encoded_callback, base::Bind(ReleaseFrame, &video_frame_))); 252 frame_encoded_callback, base::Bind(ReleaseFrame, &video_frame_)));
252 task_runner_->RunTasks(); 253 task_runner_->RunTasks();
253 } 254 }
254 } 255 }
255 256
256 } // namespace cast 257 } // namespace cast
257 } // namespace media 258 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/video_sender/video_encoder.cc ('k') | media/cast/video_sender/video_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698