Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 2737 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2748 caller()->CreateAndSetAndSignalOffer(); | 2748 caller()->CreateAndSetAndSignalOffer(); |
| 2749 ASSERT_TRUE_WAIT(SignalingStateStable(), kDefaultTimeout); | 2749 ASSERT_TRUE_WAIT(SignalingStateStable(), kDefaultTimeout); |
| 2750 | 2750 |
| 2751 // Verify frames are still received end-to-end. | 2751 // Verify frames are still received end-to-end. |
| 2752 ExpectNewFramesReceivedWithWait( | 2752 ExpectNewFramesReceivedWithWait( |
| 2753 kDefaultExpectedAudioFrameCount, kDefaultExpectedVideoFrameCount, | 2753 kDefaultExpectedAudioFrameCount, kDefaultExpectedVideoFrameCount, |
| 2754 kDefaultExpectedAudioFrameCount, kDefaultExpectedVideoFrameCount, | 2754 kDefaultExpectedAudioFrameCount, kDefaultExpectedVideoFrameCount, |
| 2755 kMaxWaitForFramesMs); | 2755 kMaxWaitForFramesMs); |
| 2756 } | 2756 } |
| 2757 | 2757 |
| 2758 TEST_F(PeerConnectionIntegrationTest, GetSources) { | |
| 2759 ASSERT_TRUE(CreatePeerConnectionWrappers()); | |
| 2760 ConnectFakeSignaling(); | |
| 2761 caller()->AddAudioVideoMediaStream(); | |
| 2762 callee()->AddAudioVideoMediaStream(); | |
| 2763 caller()->CreateAndSetAndSignalOffer(); | |
| 2764 ASSERT_TRUE_WAIT(SignalingStateStable(), kDefaultTimeout); | |
| 2765 ExpectNewFramesReceivedWithWait( | |
| 2766 kDefaultExpectedAudioFrameCount, kDefaultExpectedVideoFrameCount, | |
| 2767 kDefaultExpectedAudioFrameCount, kDefaultExpectedVideoFrameCount, | |
|
Taylor Brandstetter
2017/04/05 04:27:55
nit: Only really need one audio track, from caller
Zhi Huang
2017/04/06 03:09:50
I thought if it works in more complicated cases, i
| |
| 2768 kMaxWaitForFramesMs); | |
| 2769 ASSERT_GT(callee()->pc()->GetReceivers().size(), 0u); | |
| 2770 auto receiver = callee()->pc()->GetReceivers()[0]; | |
| 2771 ASSERT_EQ(receiver->media_type(), cricket::MEDIA_TYPE_AUDIO); | |
| 2772 | |
| 2773 auto contributing_sources = receiver->GetSources(); | |
| 2774 ASSERT_GT(receiver->GetParameters().encodings.size(), 0u); | |
| 2775 EXPECT_EQ(receiver->GetParameters().encodings[0].ssrc, | |
| 2776 contributing_sources[0].source_id()); | |
| 2777 } | |
| 2778 | |
| 2758 } // namespace | 2779 } // namespace |
| 2759 | 2780 |
| 2760 #endif // if !defined(THREAD_SANITIZER) | 2781 #endif // if !defined(THREAD_SANITIZER) |
| OLD | NEW |