Change NetEq::InsertPacket to take an RTPHeader

It used to take a WebRtcRTPHeader as input, which has an RTPHeader as
a member. None of the other member in WebRtcRTPHeader where used in
NetEq.

This CL adapts the production code; tests and tools will be converted
in a follow-up CL.

BUG=webrtc:7467

Review-Url: https://codereview.webrtc.org/2807273004
Cr-Commit-Position: refs/heads/master@{#17652}
This commit is contained in:
henrik.lundin
2017-04-11 06:17:46 -07:00
committed by Commit bot
parent 774f6b4b96
commit 4d027576a6
12 changed files with 99 additions and 97 deletions

View File

@ -40,8 +40,8 @@ void NetEqExternalDecoderTest::InsertPacket(
WebRtcRTPHeader rtp_header,
rtc::ArrayView<const uint8_t> payload,
uint32_t receive_timestamp) {
ASSERT_EQ(NetEq::kOK,
neteq_->InsertPacket(rtp_header, payload, receive_timestamp));
ASSERT_EQ(NetEq::kOK, neteq_->InsertPacket(rtp_header.header, payload,
receive_timestamp));
}
void NetEqExternalDecoderTest::GetOutputAudio(AudioFrame* output) {

View File

@ -88,7 +88,7 @@ int64_t NetEqPerformanceTest::Run(int runtime_ms,
if (!lost) {
// Insert packet.
int error =
neteq->InsertPacket(rtp_header, input_payload,
neteq->InsertPacket(rtp_header.header, input_payload,
packet_input_time_ms * kSampRateHz / 1000);
if (error != NetEq::kOK)
return -1;

View File

@ -380,7 +380,7 @@ int NetEqQualityTest::Transmit() {
if (payload_size_bytes_ > 0) {
if (!PacketLost()) {
int ret = neteq_->InsertPacket(
rtp_header_,
rtp_header_.header,
rtc::ArrayView<const uint8_t>(payload_.data(), payload_size_bytes_),
packet_input_time_ms * in_sampling_khz_);
if (ret != NetEq::kOK)

View File

@ -70,7 +70,7 @@ int64_t NetEqTest::Run() {
std::unique_ptr<NetEqInput::PacketData> packet_data = input_->PopPacket();
RTC_CHECK(packet_data);
int error = neteq_->InsertPacket(
packet_data->header,
packet_data->header.header,
rtc::ArrayView<const uint8_t>(packet_data->payload),
static_cast<uint32_t>(packet_data->time_ms * sample_rate_hz_ / 1000));
if (error != NetEq::kOK && error_callback_) {