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

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

Issue 138953009: Cast: Fix threading issues in VideoEncoderImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bad merge now fixed 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 task_runner_, task_runner_, GetDefaultCastSenderLoggingConfig()); 92 task_runner_, task_runner_, GetDefaultCastSenderLoggingConfig());
93 transport::CastTransportConfig transport_config; 93 transport::CastTransportConfig transport_config;
94 transport_sender_.reset(new transport::CastTransportSenderImpl( 94 transport_sender_.reset(new transport::CastTransportSenderImpl(
95 testing_clock_, transport_config, 95 testing_clock_, transport_config,
96 base::Bind(&UpdateCastTransportStatus), task_runner_)); 96 base::Bind(&UpdateCastTransportStatus), task_runner_));
97 transport_sender_->InsertFakeTransportForTesting(&transport_); 97 transport_sender_->InsertFakeTransportForTesting(&transport_);
98 } 98 }
99 99
100 virtual ~VideoSenderTest() {} 100 virtual ~VideoSenderTest() {}
101 101
102 virtual void TearDown() OVERRIDE {
103 video_sender_.reset();
104 task_runner_->RunTasks();
105 }
106
102 static void UpdateCastTransportStatus(transport::CastTransportStatus status) { 107 static void UpdateCastTransportStatus(transport::CastTransportStatus status) {
103 EXPECT_EQ(status, transport::TRANSPORT_INITIALIZED); 108 EXPECT_EQ(status, transport::TRANSPORT_INITIALIZED);
104 } 109 }
105 110
106 void InitEncoder(bool external) { 111 void InitEncoder(bool external) {
107 VideoSenderConfig video_config; 112 VideoSenderConfig video_config;
108 video_config.sender_ssrc = 1; 113 video_config.sender_ssrc = 1;
109 video_config.incoming_feedback_ssrc = 2; 114 video_config.incoming_feedback_ssrc = 2;
110 video_config.rtcp_c_name = "video_test@10.1.1.1"; 115 video_config.rtcp_c_name = "video_test@10.1.1.1";
111 video_config.rtp_payload_type = 127; 116 video_config.rtp_payload_type = 127;
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 // Make sure that we do a re-send. 232 // Make sure that we do a re-send.
228 RunTasks(max_resend_timeout.InMilliseconds()); 233 RunTasks(max_resend_timeout.InMilliseconds());
229 // Should have sent at least 3 packets. 234 // Should have sent at least 3 packets.
230 EXPECT_GE( 235 EXPECT_GE(
231 transport_.number_of_rtp_packets() + transport_.number_of_rtcp_packets(), 236 transport_.number_of_rtp_packets() + transport_.number_of_rtcp_packets(),
232 3); 237 3);
233 } 238 }
234 239
235 } // namespace cast 240 } // namespace cast
236 } // namespace media 241 } // namespace media
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