OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <gtest/gtest.h> | 5 #include <gtest/gtest.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 task_runner_, | 103 task_runner_, |
104 &transport_)); | 104 &transport_)); |
105 task_runner_->RunTasks(); | 105 task_runner_->RunTasks(); |
106 } | 106 } |
107 | 107 |
108 void InitializeVideo() { | 108 void InitializeVideo() { |
109 CastTransportRtpConfig rtp_config; | 109 CastTransportRtpConfig rtp_config; |
110 rtp_config.ssrc = kVideoSsrc; | 110 rtp_config.ssrc = kVideoSsrc; |
111 rtp_config.feedback_ssrc = 2; | 111 rtp_config.feedback_ssrc = 2; |
112 rtp_config.rtp_payload_type = 3; | 112 rtp_config.rtp_payload_type = 3; |
113 rtp_config.stored_frames = 10; | |
114 transport_sender_->InitializeVideo(rtp_config, | 113 transport_sender_->InitializeVideo(rtp_config, |
115 RtcpCastMessageCallback(), | 114 RtcpCastMessageCallback(), |
116 RtcpRttCallback()); | 115 RtcpRttCallback()); |
117 } | 116 } |
118 | 117 |
119 void InitializeAudio() { | 118 void InitializeAudio() { |
120 CastTransportRtpConfig rtp_config; | 119 CastTransportRtpConfig rtp_config; |
121 rtp_config.ssrc = kAudioSsrc; | 120 rtp_config.ssrc = kAudioSsrc; |
122 rtp_config.feedback_ssrc = 3; | 121 rtp_config.feedback_ssrc = 3; |
123 rtp_config.rtp_payload_type = 4; | 122 rtp_config.rtp_payload_type = 4; |
124 rtp_config.stored_frames = 10; | |
125 transport_sender_->InitializeAudio(rtp_config, | 123 transport_sender_->InitializeAudio(rtp_config, |
126 RtcpCastMessageCallback(), | 124 RtcpCastMessageCallback(), |
127 RtcpRttCallback()); | 125 RtcpRttCallback()); |
128 } | 126 } |
129 | 127 |
130 void LogRawEvents(const std::vector<PacketEvent>& packet_events, | 128 void LogRawEvents(const std::vector<PacketEvent>& packet_events, |
131 const std::vector<FrameEvent>& frame_events) { | 129 const std::vector<FrameEvent>& frame_events) { |
132 num_times_callback_called_++; | 130 num_times_callback_called_++; |
133 } | 131 } |
134 | 132 |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 task_runner_->Sleep(base::TimeDelta::FromMilliseconds(2)); | 341 task_runner_->Sleep(base::TimeDelta::FromMilliseconds(2)); |
344 transport_sender_->OnReceivedCastMessage(kVideoSsrc, | 342 transport_sender_->OnReceivedCastMessage(kVideoSsrc, |
345 RtcpCastMessageCallback(), | 343 RtcpCastMessageCallback(), |
346 cast_message); | 344 cast_message); |
347 task_runner_->RunTasks(); | 345 task_runner_->RunTasks(); |
348 EXPECT_EQ(7, transport_.packets_sent()); | 346 EXPECT_EQ(7, transport_.packets_sent()); |
349 } | 347 } |
350 | 348 |
351 } // namespace cast | 349 } // namespace cast |
352 } // namespace media | 350 } // namespace media |
OLD | NEW |