Revert "Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker."
This reverts commit 3e8ef940fe86cf6285afb80e68d2a0bedc631b9f. Reason for revert: This CL causes a performance regression in NetEq, see https://bugs.chromium.org/p/chromium/issues/detail?id=982260. Original change's description: > Add plumbing of RtpPacketInfos to each AudioFrame as input for SourceTracker. > > This change adds the plumbing of RtpPacketInfo from ChannelReceive::OnRtpPacket() to ChannelReceive::GetAudioFrameWithInfo() for audio. It is a step towards replacing the non-spec compliant ContributingSources that updates itself at packet-receive time, with the spec-compliant SourceTracker that will update itself at frame-delivery-to-track time. > > Bug: webrtc:10668 > Change-Id: I03385d6865bbc7bfbef7634f88de820a934f787a > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139890 > Reviewed-by: Stefan Holmer <stefan@webrtc.org> > Reviewed-by: Minyue Li <minyue@webrtc.org> > Commit-Queue: Chen Xing <chxg@google.com> > Cr-Commit-Position: refs/heads/master@{#28434} TBR=kwiberg@webrtc.org,stefan@webrtc.org,minyue@webrtc.org,chxg@google.com Bug: webrtc:10668, chromium:982260 Change-Id: I5e2cfde78c59d1123e21869564d76ed3f6193a5c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145339 Reviewed-by: Ivo Creusen <ivoc@webrtc.org> Commit-Queue: Ivo Creusen <ivoc@webrtc.org> Cr-Commit-Position: refs/heads/master@{#28561}
This commit is contained in:
@ -36,7 +36,6 @@
|
||||
#include "rtc_base/string_encode.h"
|
||||
#include "rtc_base/strings/string_builder.h"
|
||||
#include "rtc_base/system/arch.h"
|
||||
#include "system_wrappers/include/clock.h"
|
||||
#include "test/field_trial.h"
|
||||
#include "test/gtest.h"
|
||||
#include "test/testsupport/file_utils.h"
|
||||
@ -289,11 +288,11 @@ class NetEqDecodingTest : public ::testing::Test {
|
||||
|
||||
void DuplicateCng();
|
||||
|
||||
SimulatedClock clock_;
|
||||
NetEq* neteq_;
|
||||
NetEq::Config config_;
|
||||
std::unique_ptr<test::RtpFileSource> rtp_source_;
|
||||
std::unique_ptr<test::Packet> packet_;
|
||||
unsigned int sim_clock_;
|
||||
AudioFrame out_frame_;
|
||||
int output_sample_rate_;
|
||||
int algorithmic_delay_ms_;
|
||||
@ -307,16 +306,16 @@ const size_t NetEqDecodingTest::kBlockSize32kHz;
|
||||
const int NetEqDecodingTest::kInitSampleRateHz;
|
||||
|
||||
NetEqDecodingTest::NetEqDecodingTest()
|
||||
: clock_(0),
|
||||
neteq_(NULL),
|
||||
: neteq_(NULL),
|
||||
config_(),
|
||||
sim_clock_(0),
|
||||
output_sample_rate_(kInitSampleRateHz),
|
||||
algorithmic_delay_ms_(0) {
|
||||
config_.sample_rate_hz = kInitSampleRateHz;
|
||||
}
|
||||
|
||||
void NetEqDecodingTest::SetUp() {
|
||||
neteq_ = NetEq::Create(config_, &clock_, CreateBuiltinAudioDecoderFactory());
|
||||
neteq_ = NetEq::Create(config_, CreateBuiltinAudioDecoderFactory());
|
||||
NetEqNetworkStatistics stat;
|
||||
ASSERT_EQ(0, neteq_->NetworkStatistics(&stat));
|
||||
algorithmic_delay_ms_ = stat.current_buffer_size_ms;
|
||||
@ -334,7 +333,7 @@ void NetEqDecodingTest::OpenInputFile(const std::string& rtp_file) {
|
||||
|
||||
void NetEqDecodingTest::Process() {
|
||||
// Check if time to receive.
|
||||
while (packet_ && clock_.TimeInMilliseconds() >= packet_->time_ms()) {
|
||||
while (packet_ && sim_clock_ >= packet_->time_ms()) {
|
||||
if (packet_->payload_length_bytes() > 0) {
|
||||
#ifndef WEBRTC_CODEC_ISAC
|
||||
// Ignore payload type 104 (iSAC-swb) if ISAC is not supported.
|
||||
@ -364,7 +363,7 @@ void NetEqDecodingTest::Process() {
|
||||
EXPECT_EQ(output_sample_rate_, neteq_->last_output_sample_rate_hz());
|
||||
|
||||
// Increase time.
|
||||
clock_.AdvanceTimeMilliseconds(kTimeStepMs);
|
||||
sim_clock_ += kTimeStepMs;
|
||||
}
|
||||
|
||||
void NetEqDecodingTest::DecodeAndCompare(
|
||||
@ -395,7 +394,7 @@ void NetEqDecodingTest::DecodeAndCompare(
|
||||
output.AddResult(out_frame_.data(), out_frame_.samples_per_channel_));
|
||||
|
||||
// Query the network statistics API once per second
|
||||
if (clock_.TimeInMilliseconds() % 1000 == 0) {
|
||||
if (sim_clock_ % 1000 == 0) {
|
||||
// Process NetworkStatistics.
|
||||
NetEqNetworkStatistics current_network_stats;
|
||||
ASSERT_EQ(0, neteq_->NetworkStatistics(¤t_network_stats));
|
||||
@ -1436,8 +1435,7 @@ class NetEqDecodingTestTwoInstances : public NetEqDecodingTest {
|
||||
}
|
||||
|
||||
void CreateSecondInstance() {
|
||||
neteq2_.reset(
|
||||
NetEq::Create(config2_, &clock_, CreateBuiltinAudioDecoderFactory()));
|
||||
neteq2_.reset(NetEq::Create(config2_, CreateBuiltinAudioDecoderFactory()));
|
||||
ASSERT_TRUE(neteq2_);
|
||||
LoadDecoders(neteq2_.get());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user