| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 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 2941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2952 EXPECT_TRUE(channel_->SetSendParameters(send_parameters_)); | 2952 EXPECT_TRUE(channel_->SetSendParameters(send_parameters_)); |
| 2953 | 2953 |
| 2954 const std::vector<uint32_t> ssrcs = MAKE_VECTOR(kSsrcs1); | 2954 const std::vector<uint32_t> ssrcs = MAKE_VECTOR(kSsrcs1); |
| 2955 const std::vector<uint32_t> rtx_ssrcs = MAKE_VECTOR(kRtxSsrcs1); | 2955 const std::vector<uint32_t> rtx_ssrcs = MAKE_VECTOR(kRtxSsrcs1); |
| 2956 | 2956 |
| 2957 ASSERT_EQ(0u, fake_call_->GetVideoReceiveStreams().size()); | 2957 ASSERT_EQ(0u, fake_call_->GetVideoReceiveStreams().size()); |
| 2958 const size_t kDataLength = 12; | 2958 const size_t kDataLength = 12; |
| 2959 uint8_t data[kDataLength]; | 2959 uint8_t data[kDataLength]; |
| 2960 memset(data, 0, sizeof(data)); | 2960 memset(data, 0, sizeof(data)); |
| 2961 rtc::SetBE32(&data[8], ssrcs[0]); | 2961 rtc::SetBE32(&data[8], ssrcs[0]); |
| 2962 rtc::Buffer packet(data, kDataLength); | 2962 rtc::CopyOnWriteBuffer packet(data, kDataLength); |
| 2963 rtc::PacketTime packet_time; | 2963 rtc::PacketTime packet_time; |
| 2964 channel_->OnPacketReceived(&packet, packet_time); | 2964 channel_->OnPacketReceived(&packet, packet_time); |
| 2965 | 2965 |
| 2966 ASSERT_EQ(1u, fake_call_->GetVideoReceiveStreams().size()) | 2966 ASSERT_EQ(1u, fake_call_->GetVideoReceiveStreams().size()) |
| 2967 << "No default receive stream created."; | 2967 << "No default receive stream created."; |
| 2968 FakeVideoReceiveStream* recv_stream = fake_call_->GetVideoReceiveStreams()[0]; | 2968 FakeVideoReceiveStream* recv_stream = fake_call_->GetVideoReceiveStreams()[0]; |
| 2969 EXPECT_EQ(0u, recv_stream->GetConfig().rtp.rtx.size()) | 2969 EXPECT_EQ(0u, recv_stream->GetConfig().rtp.rtx.size()) |
| 2970 << "Default receive stream should not have configured RTX"; | 2970 << "Default receive stream should not have configured RTX"; |
| 2971 | 2971 |
| 2972 EXPECT_TRUE(channel_->AddRecvStream( | 2972 EXPECT_TRUE(channel_->AddRecvStream( |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3105 recv_parameters_.codecs.push_back(red_rtx_codec); | 3105 recv_parameters_.codecs.push_back(red_rtx_codec); |
| 3106 EXPECT_TRUE(channel_->SetRecvParameters(recv_parameters_)); | 3106 EXPECT_TRUE(channel_->SetRecvParameters(recv_parameters_)); |
| 3107 | 3107 |
| 3108 ASSERT_EQ(0u, fake_call_->GetVideoReceiveStreams().size()); | 3108 ASSERT_EQ(0u, fake_call_->GetVideoReceiveStreams().size()); |
| 3109 const size_t kDataLength = 12; | 3109 const size_t kDataLength = 12; |
| 3110 uint8_t data[kDataLength]; | 3110 uint8_t data[kDataLength]; |
| 3111 memset(data, 0, sizeof(data)); | 3111 memset(data, 0, sizeof(data)); |
| 3112 | 3112 |
| 3113 rtc::Set8(data, 1, payload_type); | 3113 rtc::Set8(data, 1, payload_type); |
| 3114 rtc::SetBE32(&data[8], kIncomingUnsignalledSsrc); | 3114 rtc::SetBE32(&data[8], kIncomingUnsignalledSsrc); |
| 3115 rtc::Buffer packet(data, kDataLength); | 3115 rtc::CopyOnWriteBuffer packet(data, kDataLength); |
| 3116 rtc::PacketTime packet_time; | 3116 rtc::PacketTime packet_time; |
| 3117 channel_->OnPacketReceived(&packet, packet_time); | 3117 channel_->OnPacketReceived(&packet, packet_time); |
| 3118 | 3118 |
| 3119 if (expect_created_receive_stream) { | 3119 if (expect_created_receive_stream) { |
| 3120 EXPECT_EQ(1u, fake_call_->GetVideoReceiveStreams().size()) | 3120 EXPECT_EQ(1u, fake_call_->GetVideoReceiveStreams().size()) |
| 3121 << "Should have created a receive stream for payload type: " | 3121 << "Should have created a receive stream for payload type: " |
| 3122 << payload_type; | 3122 << payload_type; |
| 3123 } else { | 3123 } else { |
| 3124 EXPECT_EQ(0u, fake_call_->GetVideoReceiveStreams().size()) | 3124 EXPECT_EQ(0u, fake_call_->GetVideoReceiveStreams().size()) |
| 3125 << "Shouldn't have created a receive stream for payload type: " | 3125 << "Shouldn't have created a receive stream for payload type: " |
| (...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3394 } | 3394 } |
| 3395 | 3395 |
| 3396 // Test that we normalize send codec format size in simulcast. | 3396 // Test that we normalize send codec format size in simulcast. |
| 3397 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { | 3397 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { |
| 3398 cricket::VideoCodec codec(kVp8Codec270p); | 3398 cricket::VideoCodec codec(kVp8Codec270p); |
| 3399 codec.width += 1; | 3399 codec.width += 1; |
| 3400 codec.height += 1; | 3400 codec.height += 1; |
| 3401 VerifySimulcastSettings(codec, 2, 2); | 3401 VerifySimulcastSettings(codec, 2, 2); |
| 3402 } | 3402 } |
| 3403 } // namespace cricket | 3403 } // namespace cricket |
| OLD | NEW |