Update ACM to use RTPHeader instead of WebRtcRTPHeader

Bug: webrtc:5876
Change-Id: Id3311dcf508cca34495349197eeac2edf8783772
Reviewed-on: https://webrtc-review.googlesource.com/c/123188
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26729}
This commit is contained in:
Niels Möller
2019-02-15 15:21:47 +01:00
committed by Commit Bot
parent 389b1672a3
commit afb5dbbf4e
15 changed files with 100 additions and 120 deletions

View File

@ -37,12 +37,11 @@ class TargetDelayTest : public ::testing::Test {
{{pltype, {"L16", kSampleRateHz, 1}}};
acm_->SetReceiveCodecs(receive_codecs);
rtp_info_.header.payloadType = pltype;
rtp_info_.header.timestamp = 0;
rtp_info_.header.ssrc = 0x12345678;
rtp_info_.header.markerBit = false;
rtp_info_.header.sequenceNumber = 0;
rtp_info_.frameType = kAudioFrameSpeech;
rtp_header_.payloadType = pltype;
rtp_header_.timestamp = 0;
rtp_header_.ssrc = 0x12345678;
rtp_header_.markerBit = false;
rtp_header_.sequenceNumber = 0;
int16_t audio[kFrameSizeSamples];
const int kRange = 0x7FF; // 2047, easy for masking.
@ -98,10 +97,10 @@ class TargetDelayTest : public ::testing::Test {
static const int kInterarrivalJitterPacket = 2;
void Push() {
rtp_info_.header.timestamp += kFrameSizeSamples;
rtp_info_.header.sequenceNumber++;
ASSERT_EQ(0,
acm_->IncomingPacket(payload_, kFrameSizeSamples * 2, rtp_info_));
rtp_header_.timestamp += kFrameSizeSamples;
rtp_header_.sequenceNumber++;
ASSERT_EQ(
0, acm_->IncomingPacket(payload_, kFrameSizeSamples * 2, rtp_header_));
}
// Pull audio equivalent to the amount of audio in one RTP packet.
@ -150,7 +149,7 @@ class TargetDelayTest : public ::testing::Test {
}
std::unique_ptr<AudioCodingModule> acm_;
WebRtcRTPHeader rtp_info_;
RTPHeader rtp_header_;
uint8_t payload_[kPayloadLenBytes];
};