Reduce number of RTPVideoSender::SendVideo parameters

use frame_type from the RTPVideoHeader instead of as an extra parameter
merge payload data and payload size into single argument
pass RTPVideoHeader by value (relying on copy elision)

Bug: None
Change-Id: Ie7970af3b198b83b723d84c7a8b047219c4b38c0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156400
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29445}
This commit is contained in:
Danil Chapovalov
2019-10-11 10:53:27 +02:00
committed by Commit Bot
parent 4b64411406
commit 51bf200294
14 changed files with 197 additions and 183 deletions

View File

@ -212,6 +212,7 @@ class RtpRtcpImplTest : public ::testing::Test {
RTPVideoHeaderVP8 vp8_header = {};
vp8_header.temporalIdx = tid;
RTPVideoHeader rtp_video_header;
rtp_video_header.frame_type = VideoFrameType::kVideoFrameKey;
rtp_video_header.width = codec_.width;
rtp_video_header.height = codec_.height;
rtp_video_header.rotation = kVideoRotation_0;
@ -225,10 +226,8 @@ class RtpRtcpImplTest : public ::testing::Test {
const uint8_t payload[100] = {0};
EXPECT_TRUE(module->impl_->OnSendingRtpFrame(0, 0, codec_.plType, true));
EXPECT_TRUE(sender->SendVideo(VideoFrameType::kVideoFrameKey, codec_.plType,
VideoCodecType::kVideoCodecVP8, 0, 0, payload,
sizeof(payload), nullptr, &rtp_video_header,
0));
EXPECT_TRUE(sender->SendVideo(codec_.plType, VideoCodecType::kVideoCodecVP8,
0, 0, payload, nullptr, rtp_video_header, 0));
}
void IncomingRtcpNack(const RtpRtcpModule* module, uint16_t sequence_number) {