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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc

Issue 2460533002: Simplify {,Set}UlpfecConfig interface. (Closed)
Patch Set: git cl format. Created 4 years, 1 month 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 (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 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 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 callback.Matches(ssrc, expected); 1116 callback.Matches(ssrc, expected);
1117 1117
1118 // Send padding. 1118 // Send padding.
1119 rtp_sender_->TimeToSendPadding(kMaxPaddingSize, PacketInfo::kNotAProbe); 1119 rtp_sender_->TimeToSendPadding(kMaxPaddingSize, PacketInfo::kNotAProbe);
1120 expected.transmitted.payload_bytes = 12; 1120 expected.transmitted.payload_bytes = 12;
1121 expected.transmitted.header_bytes = 36; 1121 expected.transmitted.header_bytes = 36;
1122 expected.transmitted.padding_bytes = kMaxPaddingSize; 1122 expected.transmitted.padding_bytes = kMaxPaddingSize;
1123 expected.transmitted.packets = 3; 1123 expected.transmitted.packets = 3;
1124 callback.Matches(ssrc, expected); 1124 callback.Matches(ssrc, expected);
1125 1125
1126 // Send FEC. 1126 // Send ULPFEC.
1127 rtp_sender_->SetUlpfecConfig(true, kRedPayloadType, kUlpfecPayloadType); 1127 rtp_sender_->SetUlpfecConfig(kRedPayloadType, kUlpfecPayloadType);
1128 FecProtectionParams fec_params; 1128 FecProtectionParams fec_params;
1129 fec_params.fec_mask_type = kFecMaskRandom; 1129 fec_params.fec_mask_type = kFecMaskRandom;
1130 fec_params.fec_rate = 1; 1130 fec_params.fec_rate = 1;
1131 fec_params.max_fec_frames = 1; 1131 fec_params.max_fec_frames = 1;
1132 rtp_sender_->SetFecParameters(&fec_params, &fec_params); 1132 rtp_sender_->SetFecParameters(&fec_params, &fec_params);
1133 ASSERT_TRUE(rtp_sender_->SendOutgoingData( 1133 ASSERT_TRUE(rtp_sender_->SendOutgoingData(
1134 kVideoFrameDelta, payload_type, 1234, 4321, payload, 1134 kVideoFrameDelta, payload_type, 1234, 4321, payload,
1135 sizeof(payload), nullptr, nullptr, nullptr)); 1135 sizeof(payload), nullptr, nullptr, nullptr));
1136 expected.transmitted.payload_bytes = 40; 1136 expected.transmitted.payload_bytes = 40;
1137 expected.transmitted.header_bytes = 60; 1137 expected.transmitted.header_bytes = 60;
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
1384 ConvertCVOByteToVideoRotation(flip_bit | camera_bit | 0)); 1384 ConvertCVOByteToVideoRotation(flip_bit | camera_bit | 0));
1385 EXPECT_EQ(kVideoRotation_90, 1385 EXPECT_EQ(kVideoRotation_90,
1386 ConvertCVOByteToVideoRotation(flip_bit | camera_bit | 1)); 1386 ConvertCVOByteToVideoRotation(flip_bit | camera_bit | 1));
1387 EXPECT_EQ(kVideoRotation_180, 1387 EXPECT_EQ(kVideoRotation_180,
1388 ConvertCVOByteToVideoRotation(flip_bit | camera_bit | 2)); 1388 ConvertCVOByteToVideoRotation(flip_bit | camera_bit | 2));
1389 EXPECT_EQ(kVideoRotation_270, 1389 EXPECT_EQ(kVideoRotation_270,
1390 ConvertCVOByteToVideoRotation(flip_bit | camera_bit | 3)); 1390 ConvertCVOByteToVideoRotation(flip_bit | camera_bit | 3));
1391 } 1391 }
1392 1392
1393 } // namespace webrtc 1393 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender_video.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698