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

Side by Side Diff: media/cast/video_sender/video_sender_unittest.cc

Issue 132283006: Revert of Cast: Fix threading issues in VideoEncoderImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | Annotate | Revision Log
« no previous file with comments | « media/cast/video_sender/video_encoder_impl_unittest.cc ('k') | no next file » | 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/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/test/simple_test_tick_clock.h" 9 #include "base/test/simple_test_tick_clock.h"
10 #include "media/base/video_frame.h" 10 #include "media/base/video_frame.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 task_runner_, task_runner_, GetDefaultCastSenderLoggingConfig()); 90 task_runner_, task_runner_, GetDefaultCastSenderLoggingConfig());
91 transport::CastTransportConfig transport_config; 91 transport::CastTransportConfig transport_config;
92 transport_sender_.reset(new transport::CastTransportSenderImpl( 92 transport_sender_.reset(new transport::CastTransportSenderImpl(
93 &testing_clock_, transport_config, 93 &testing_clock_, transport_config,
94 base::Bind(&UpdateCastTransportStatus), task_runner_)); 94 base::Bind(&UpdateCastTransportStatus), task_runner_));
95 transport_sender_->InsertFakeTransportForTesting(&transport_); 95 transport_sender_->InsertFakeTransportForTesting(&transport_);
96 } 96 }
97 97
98 virtual ~VideoSenderTest() {} 98 virtual ~VideoSenderTest() {}
99 99
100 virtual void TearDown() OVERRIDE {
101 video_sender_.reset();
102 task_runner_->RunTasks();
103 }
104
105 static void UpdateCastTransportStatus(transport::CastTransportStatus status) { 100 static void UpdateCastTransportStatus(transport::CastTransportStatus status) {
106 } 101 }
107 102
108 void InitEncoder(bool external) { 103 void InitEncoder(bool external) {
109 VideoSenderConfig video_config; 104 VideoSenderConfig video_config;
110 video_config.sender_ssrc = 1; 105 video_config.sender_ssrc = 1;
111 video_config.incoming_feedback_ssrc = 2; 106 video_config.incoming_feedback_ssrc = 2;
112 video_config.rtcp_c_name = "video_test@10.1.1.1"; 107 video_config.rtcp_c_name = "video_test@10.1.1.1";
113 video_config.rtp_payload_type = 127; 108 video_config.rtp_payload_type = 127;
114 video_config.use_external_encoder = external; 109 video_config.use_external_encoder = external;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 RunTasks(max_resend_timeout.InMilliseconds()); 225 RunTasks(max_resend_timeout.InMilliseconds());
231 // Should have sent at least 3 packets. 226 // Should have sent at least 3 packets.
232 EXPECT_GE( 227 EXPECT_GE(
233 transport_.number_of_rtp_packets() + transport_.number_of_rtcp_packets(), 228 transport_.number_of_rtp_packets() + transport_.number_of_rtcp_packets(),
234 3); 229 3);
235 } 230 }
236 231
237 } // namespace cast 232 } // namespace cast
238 } // namespace media 233 } // namespace media
239 234
OLDNEW
« no previous file with comments | « media/cast/video_sender/video_encoder_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698