OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 EXPECT_TRUE(stream_->AddTrack(audio_track_)); | 174 EXPECT_TRUE(stream_->AddTrack(audio_track_)); |
175 EXPECT_CALL(audio_provider_, SetAudioPlayout(kAudioSsrc, true)); | 175 EXPECT_CALL(audio_provider_, SetAudioPlayout(kAudioSsrc, true)); |
176 audio_rtp_receiver_ = new AudioRtpReceiver(stream_->GetAudioTracks()[0], | 176 audio_rtp_receiver_ = new AudioRtpReceiver(stream_->GetAudioTracks()[0], |
177 kAudioSsrc, &audio_provider_); | 177 kAudioSsrc, &audio_provider_); |
178 } | 178 } |
179 | 179 |
180 void CreateVideoRtpReceiver() { | 180 void CreateVideoRtpReceiver() { |
181 AddVideoTrack(true); | 181 AddVideoTrack(true); |
182 EXPECT_CALL(video_provider_, | 182 EXPECT_CALL(video_provider_, |
183 SetVideoPlayout(kVideoSsrc, true, | 183 SetVideoPlayout(kVideoSsrc, true, |
184 video_track_->GetSource()->FrameInput())); | 184 video_track_->GetSink())); |
185 video_rtp_receiver_ = new VideoRtpReceiver(stream_->GetVideoTracks()[0], | 185 video_rtp_receiver_ = new VideoRtpReceiver(stream_->GetVideoTracks()[0], |
186 kVideoSsrc, &video_provider_); | 186 kVideoSsrc, &video_provider_); |
187 } | 187 } |
188 | 188 |
189 void DestroyAudioRtpReceiver() { | 189 void DestroyAudioRtpReceiver() { |
190 EXPECT_CALL(audio_provider_, SetAudioPlayout(kAudioSsrc, false)); | 190 EXPECT_CALL(audio_provider_, SetAudioPlayout(kAudioSsrc, false)); |
191 audio_rtp_receiver_ = nullptr; | 191 audio_rtp_receiver_ = nullptr; |
192 } | 192 } |
193 | 193 |
194 void DestroyVideoRtpReceiver() { | 194 void DestroyVideoRtpReceiver() { |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 video_track_->GetSource()->GetVideoCapturer())); | 506 video_track_->GetSource()->GetVideoCapturer())); |
507 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, true, _)); | 507 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, true, _)); |
508 sender->SetSsrc(kVideoSsrc2); | 508 sender->SetSsrc(kVideoSsrc2); |
509 | 509 |
510 // Calls expected from destructor. | 510 // Calls expected from destructor. |
511 EXPECT_CALL(video_provider_, SetCaptureDevice(kVideoSsrc2, nullptr)).Times(1); | 511 EXPECT_CALL(video_provider_, SetCaptureDevice(kVideoSsrc2, nullptr)).Times(1); |
512 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, false, _)).Times(1); | 512 EXPECT_CALL(video_provider_, SetVideoSend(kVideoSsrc2, false, _)).Times(1); |
513 } | 513 } |
514 | 514 |
515 } // namespace webrtc | 515 } // namespace webrtc |
OLD | NEW |