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

Side by Side Diff: talk/app/webrtc/peerconnectioninterface_unittest.cc

Issue 1588693002: Revert of Storing raw audio sink for default audio track. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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
« no previous file with comments | « talk/app/webrtc/mediastreamprovider.h ('k') | talk/app/webrtc/remoteaudiosource.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1967 matching lines...) Expand 10 before | Expand all | Expand 10 after
1978 MediaStreamInterface* remote_stream = observer_.remote_streams()->at(0); 1978 MediaStreamInterface* remote_stream = observer_.remote_streams()->at(0);
1979 1979
1980 EXPECT_EQ(1u, remote_stream->GetAudioTracks().size()); 1980 EXPECT_EQ(1u, remote_stream->GetAudioTracks().size());
1981 EXPECT_EQ(0u, remote_stream->GetVideoTracks().size()); 1981 EXPECT_EQ(0u, remote_stream->GetVideoTracks().size());
1982 EXPECT_EQ("default", remote_stream->label()); 1982 EXPECT_EQ("default", remote_stream->label());
1983 1983
1984 CreateAndSetRemoteOffer(kSdpStringWithoutStreams); 1984 CreateAndSetRemoteOffer(kSdpStringWithoutStreams);
1985 ASSERT_EQ(1u, observer_.remote_streams()->count()); 1985 ASSERT_EQ(1u, observer_.remote_streams()->count());
1986 ASSERT_EQ(1u, remote_stream->GetAudioTracks().size()); 1986 ASSERT_EQ(1u, remote_stream->GetAudioTracks().size());
1987 EXPECT_EQ("defaulta0", remote_stream->GetAudioTracks()[0]->id()); 1987 EXPECT_EQ("defaulta0", remote_stream->GetAudioTracks()[0]->id());
1988 EXPECT_EQ(MediaStreamTrackInterface::kLive,
1989 remote_stream->GetAudioTracks()[0]->state());
1990 ASSERT_EQ(1u, remote_stream->GetVideoTracks().size()); 1988 ASSERT_EQ(1u, remote_stream->GetVideoTracks().size());
1991 EXPECT_EQ("defaultv0", remote_stream->GetVideoTracks()[0]->id()); 1989 EXPECT_EQ("defaultv0", remote_stream->GetVideoTracks()[0]->id());
1992 EXPECT_EQ(MediaStreamTrackInterface::kLive,
1993 remote_stream->GetVideoTracks()[0]->state());
1994 } 1990 }
1995 1991
1996 // This tests that a default MediaStream is created if a remote session 1992 // This tests that a default MediaStream is created if a remote session
1997 // description doesn't contain any streams and media direction is send only. 1993 // description doesn't contain any streams and media direction is send only.
1998 TEST_F(PeerConnectionInterfaceTest, 1994 TEST_F(PeerConnectionInterfaceTest,
1999 SendOnlySdpWithoutMsidCreatesDefaultStream) { 1995 SendOnlySdpWithoutMsidCreatesDefaultStream) {
2000 FakeConstraints constraints; 1996 FakeConstraints constraints;
2001 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, 1997 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp,
2002 true); 1998 true);
2003 CreatePeerConnection(&constraints); 1999 CreatePeerConnection(&constraints);
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
2411 FakeConstraints updated_answer_c; 2407 FakeConstraints updated_answer_c;
2412 answer_c.SetMandatoryReceiveAudio(false); 2408 answer_c.SetMandatoryReceiveAudio(false);
2413 answer_c.SetMandatoryReceiveVideo(false); 2409 answer_c.SetMandatoryReceiveVideo(false);
2414 2410
2415 cricket::MediaSessionOptions updated_answer_options; 2411 cricket::MediaSessionOptions updated_answer_options;
2416 EXPECT_TRUE( 2412 EXPECT_TRUE(
2417 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); 2413 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options));
2418 EXPECT_TRUE(updated_answer_options.has_audio()); 2414 EXPECT_TRUE(updated_answer_options.has_audio());
2419 EXPECT_TRUE(updated_answer_options.has_video()); 2415 EXPECT_TRUE(updated_answer_options.has_video());
2420 } 2416 }
OLDNEW
« no previous file with comments | « talk/app/webrtc/mediastreamprovider.h ('k') | talk/app/webrtc/remoteaudiosource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698