New peerconnection test case, for video stream forwarding.

Split WebRtcVideoSendStream::OnFrame, to invoke encoder on the worker thread.

BUG=webrtc:5546

Review URL: https://codereview.webrtc.org/1875713002

Cr-Commit-Position: refs/heads/master@{#12471}
This commit is contained in:
nisse
2016-04-22 07:27:36 -07:00
committed by Commit bot
parent fb8fc5391e
commit d98cf1ff1e

View File

@ -1981,6 +1981,39 @@ TEST_F(P2PTestConductor, EarlyWarmupTest) {
kMaxWaitForFramesMs);
}
TEST_F(P2PTestConductor, ForwardVideoOnlyStream) {
ASSERT_TRUE(CreateTestClients());
// One-way stream
receiving_client()->set_auto_add_stream(false);
// Video only, audio forwarding not expected to work.
initializing_client()->AddMediaStream(false, true);
initializing_client()->Negotiate();
ASSERT_TRUE_WAIT(SessionActive(), kMaxWaitForActivationMs);
VerifySessionDescriptions();
ASSERT_TRUE(initializing_client()->can_receive_video());
ASSERT_TRUE(receiving_client()->can_receive_video());
EXPECT_EQ_WAIT(webrtc::PeerConnectionInterface::kIceConnectionCompleted,
initializing_client()->ice_connection_state(),
kMaxWaitForFramesMs);
EXPECT_EQ_WAIT(webrtc::PeerConnectionInterface::kIceConnectionConnected,
receiving_client()->ice_connection_state(),
kMaxWaitForFramesMs);
ASSERT_TRUE(receiving_client()->remote_streams()->count() == 1);
// Echo the stream back.
receiving_client()->pc()->AddStream(
receiving_client()->remote_streams()->at(0));
receiving_client()->Negotiate();
EXPECT_TRUE_WAIT(
initializing_client()->VideoFramesReceivedCheck(kEndVideoFrameCount),
kMaxWaitForFramesMs);
}
class IceServerParsingTest : public testing::Test {
public:
// Convenience for parsing a single URL.