OLD | NEW |
---|---|
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 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 2563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2574 ASSERT_TRUE(channel_->GetStats(&info)); | 2574 ASSERT_TRUE(channel_->GetStats(&info)); |
2575 | 2575 |
2576 ASSERT_EQ(1u, info.senders.size()); | 2576 ASSERT_EQ(1u, info.senders.size()); |
2577 ASSERT_EQ(1u, info.receivers.size()); | 2577 ASSERT_EQ(1u, info.receivers.size()); |
2578 | 2578 |
2579 EXPECT_NE(sender_sp.ssrc_groups, receiver_sp.ssrc_groups); | 2579 EXPECT_NE(sender_sp.ssrc_groups, receiver_sp.ssrc_groups); |
2580 EXPECT_EQ(sender_sp.ssrc_groups, info.senders[0].ssrc_groups); | 2580 EXPECT_EQ(sender_sp.ssrc_groups, info.senders[0].ssrc_groups); |
2581 EXPECT_EQ(receiver_sp.ssrc_groups, info.receivers[0].ssrc_groups); | 2581 EXPECT_EQ(receiver_sp.ssrc_groups, info.receivers[0].ssrc_groups); |
2582 } | 2582 } |
2583 | 2583 |
2584 TEST_F(WebRtcVideoChannel2Test, RtxPacketsDontCreateUnsignalledReceiveStreams) { | |
2585 std::vector<VideoCodec> codecs(engine_.codecs()); | |
2586 // Add a RED RTX codec. | |
2587 VideoCodec red_rtx_codec = | |
2588 VideoCodec::CreateRtxCodec(125, kDefaultRedPlType); | |
pbos-webrtc
2015/07/09 10:38:43
Name this 125 constant and use it below as well.
noahric
2015/07/09 17:29:55
Done.
| |
2589 codecs.push_back(red_rtx_codec); | |
2590 EXPECT_TRUE(channel_->SetRecvCodecs(codecs)); | |
2591 const std::vector<uint32> rtx_ssrcs = MAKE_VECTOR(kRtxSsrcs1); | |
pbos-webrtc
2015/07/09 10:38:43
Just use a static const int kIncomingUnsignalledSs
noahric
2015/07/09 17:29:55
Done.
| |
2592 | |
2593 ASSERT_EQ(0u, fake_call_->GetVideoReceiveStreams().size()); | |
2594 const size_t kDataLength = 12; | |
2595 uint8_t data[kDataLength]; | |
2596 memset(data, 0, sizeof(data)); | |
2597 | |
2598 // RTX (including the RED RTX we registered above) and ulpfec should be | |
2599 // ignored. | |
2600 for (int payload_type : { kDefaultRtxVp8PlType, kDefaultUlpfecType, 125 }) { | |
pbos-webrtc
2015/07/09 10:38:43
Looks like you can't get away with this sir. :)
noahric
2015/07/09 17:29:55
Aww, sadtimes. It's gone now anyways.
| |
2601 rtc::Set8(data, 1, payload_type); | |
2602 rtc::SetBE32(&data[8], rtx_ssrcs[0]); | |
2603 rtc::Buffer packet(data, kDataLength); | |
2604 rtc::PacketTime packet_time; | |
2605 channel_->OnPacketReceived(&packet, packet_time); | |
2606 | |
2607 ASSERT_EQ(0u, fake_call_->GetVideoReceiveStreams().size()) | |
pbos-webrtc
2015/07/09 10:38:43
Is there a test asserting that we do create it for
noahric
2015/07/09 17:29:55
DefaultReceiveStreamReconfiguresToUseRtx does, but
| |
2608 << "Shouldn't have created a receive stream for payload type: " | |
2609 << payload_type; | |
2610 } | |
2611 } | |
2612 | |
2584 void WebRtcVideoChannel2Test::TestReceiverLocalSsrcConfiguration( | 2613 void WebRtcVideoChannel2Test::TestReceiverLocalSsrcConfiguration( |
2585 bool receiver_first) { | 2614 bool receiver_first) { |
2586 EXPECT_TRUE(channel_->SetSendCodecs(engine_.codecs())); | 2615 EXPECT_TRUE(channel_->SetSendCodecs(engine_.codecs())); |
2587 | 2616 |
2588 const uint32_t kSenderSsrc = 0xC0FFEE; | 2617 const uint32_t kSenderSsrc = 0xC0FFEE; |
2589 const uint32_t kReceiverSsrc = 0x4711; | 2618 const uint32_t kReceiverSsrc = 0x4711; |
2590 | 2619 |
2591 if (receiver_first) { | 2620 if (receiver_first) { |
2592 AddRecvStream(StreamParams::CreateLegacy(kReceiverSsrc)); | 2621 AddRecvStream(StreamParams::CreateLegacy(kReceiverSsrc)); |
2593 std::vector<FakeVideoReceiveStream*> receive_streams = | 2622 std::vector<FakeVideoReceiveStream*> receive_streams = |
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3024 // Ensures that the correct settings are applied to the codec when two temporal | 3053 // Ensures that the correct settings are applied to the codec when two temporal |
3025 // layer screencasting is enabled, and that the correct simulcast settings are | 3054 // layer screencasting is enabled, and that the correct simulcast settings are |
3026 // reapplied when disabling screencasting. | 3055 // reapplied when disabling screencasting. |
3027 TEST_F(WebRtcVideoChannel2SimulcastTest, | 3056 TEST_F(WebRtcVideoChannel2SimulcastTest, |
3028 DISABLED_TwoTemporalLayerScreencastSettings) { | 3057 DISABLED_TwoTemporalLayerScreencastSettings) { |
3029 // TODO(pbos): Implement. | 3058 // TODO(pbos): Implement. |
3030 FAIL() << "Not implemented."; | 3059 FAIL() << "Not implemented."; |
3031 } | 3060 } |
3032 | 3061 |
3033 } // namespace cricket | 3062 } // namespace cricket |
OLD | NEW |