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

Side by Side Diff: webrtc/pc/peerconnection_integrationtest.cc

Issue 2770233003: Implemented the GetSources() in native code. (Closed)
Patch Set: Add a direct dependency to the webrtc/voice_engine/BUILD.gn Created 3 years, 8 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
OLDNEW
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
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()->AddAudioOnlyMediaStream();
2762 caller()->CreateAndSetAndSignalOffer();
2763 ASSERT_TRUE_WAIT(SignalingStateStable(), kDefaultTimeout);
2764 // Wait for one audio frame received by callee.
2765 ExpectNewFramesReceivedWithWait(0, 0, 1, 0, kMaxWaitForFramesMs);
2766 ASSERT_GT(callee()->pc()->GetReceivers().size(), 0u);
2767 auto receiver = callee()->pc()->GetReceivers()[0];
2768 ASSERT_EQ(receiver->media_type(), cricket::MEDIA_TYPE_AUDIO);
2769
2770 auto contributing_sources = receiver->GetSources();
2771 ASSERT_GT(receiver->GetParameters().encodings.size(), 0u);
2772 EXPECT_EQ(receiver->GetParameters().encodings[0].ssrc,
2773 contributing_sources[0].source_id());
2774 }
2775
2758 } // namespace 2776 } // namespace
2759 2777
2760 #endif // if !defined(THREAD_SANITIZER) 2778 #endif // if !defined(THREAD_SANITIZER)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698