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

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

Issue 1513303003: [rtp_rtcp] fixed lint errors in rtp_rtcp module that are not fixed in other CLs (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 5 years 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 1263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 // packets of the same telephone event. Since it is specifically for DTMF 1274 // packets of the same telephone event. Since it is specifically for DTMF
1275 // events, ignoring audio packets and sending kEmptyFrame instead of those. 1275 // events, ignoring audio packets and sending kEmptyFrame instead of those.
1276 TEST_F(RtpSenderAudioTest, CheckMarkerBitForTelephoneEvents) { 1276 TEST_F(RtpSenderAudioTest, CheckMarkerBitForTelephoneEvents) {
1277 char payload_name[RTP_PAYLOAD_NAME_SIZE] = "telephone-event"; 1277 char payload_name[RTP_PAYLOAD_NAME_SIZE] = "telephone-event";
1278 uint8_t payload_type = 126; 1278 uint8_t payload_type = 126;
1279 ASSERT_EQ(0, 1279 ASSERT_EQ(0,
1280 rtp_sender_->RegisterPayload(payload_name, payload_type, 0, 0, 0)); 1280 rtp_sender_->RegisterPayload(payload_name, payload_type, 0, 0, 0));
1281 // For Telephone events, payload is not added to the registered payload list, 1281 // For Telephone events, payload is not added to the registered payload list,
1282 // it will register only the payload used for audio stream. 1282 // it will register only the payload used for audio stream.
1283 // Registering the payload again for audio stream with different payload name. 1283 // Registering the payload again for audio stream with different payload name.
1284 strcpy(payload_name, "payload_name"); 1284 const char kPayloadName[] = "payload_name";
1285 ASSERT_EQ( 1285 ASSERT_EQ(
1286 0, rtp_sender_->RegisterPayload(payload_name, payload_type, 8000, 1, 0)); 1286 0, rtp_sender_->RegisterPayload(kPayloadName, payload_type, 8000, 1, 0));
1287 int64_t capture_time_ms = fake_clock_.TimeInMilliseconds(); 1287 int64_t capture_time_ms = fake_clock_.TimeInMilliseconds();
1288 // DTMF event key=9, duration=500 and attenuationdB=10 1288 // DTMF event key=9, duration=500 and attenuationdB=10
1289 rtp_sender_->SendTelephoneEvent(9, 500, 10); 1289 rtp_sender_->SendTelephoneEvent(9, 500, 10);
1290 // During start, it takes the starting timestamp as last sent timestamp. 1290 // During start, it takes the starting timestamp as last sent timestamp.
1291 // The duration is calculated as the difference of current and last sent 1291 // The duration is calculated as the difference of current and last sent
1292 // timestamp. So for first call it will skip since the duration is zero. 1292 // timestamp. So for first call it will skip since the duration is zero.
1293 ASSERT_EQ(0, rtp_sender_->SendOutgoingData(kEmptyFrame, payload_type, 1293 ASSERT_EQ(0, rtp_sender_->SendOutgoingData(kEmptyFrame, payload_type,
1294 capture_time_ms, 0, nullptr, 0, 1294 capture_time_ms, 0, nullptr, 0,
1295 nullptr)); 1295 nullptr));
1296 // DTMF Sample Length is (Frequency/1000) * Duration. 1296 // DTMF Sample Length is (Frequency/1000) * Duration.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 reinterpret_cast<uint8_t*>(transport_.sent_packets_[0]->data()), 1418 reinterpret_cast<uint8_t*>(transport_.sent_packets_[0]->data()),
1419 transport_.sent_packets_[0]->size(), true, &map, kSeqNum, hdr.rotation); 1419 transport_.sent_packets_[0]->size(), true, &map, kSeqNum, hdr.rotation);
1420 1420
1421 // Verify that this packet does have CVO byte. 1421 // Verify that this packet does have CVO byte.
1422 VerifyCVOPacket( 1422 VerifyCVOPacket(
1423 reinterpret_cast<uint8_t*>(transport_.sent_packets_[1]->data()), 1423 reinterpret_cast<uint8_t*>(transport_.sent_packets_[1]->data()),
1424 transport_.sent_packets_[1]->size(), true, &map, kSeqNum + 1, 1424 transport_.sent_packets_[1]->size(), true, &map, kSeqNum + 1,
1425 hdr.rotation); 1425 hdr.rotation);
1426 } 1426 }
1427 } // namespace webrtc 1427 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender_audio.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