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}
This commit is contained in:
@ -11,11 +11,15 @@
|
||||
#ifndef MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_
|
||||
#define MODULES_AUDIO_CODING_NETEQ_NETEQ_IMPL_H_
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
#include "api/audio/audio_frame.h"
|
||||
#include "api/rtp_packet_info.h"
|
||||
#include "modules/audio_coding/neteq/audio_multi_vector.h"
|
||||
#include "modules/audio_coding/neteq/defines.h" // Modes, Operations
|
||||
#include "modules/audio_coding/neteq/expand_uma_logger.h"
|
||||
@ -34,6 +38,7 @@ namespace webrtc {
|
||||
class Accelerate;
|
||||
class BackgroundNoise;
|
||||
class BufferLevelFilter;
|
||||
class Clock;
|
||||
class ComfortNoise;
|
||||
class DecisionLogic;
|
||||
class DecoderDatabase;
|
||||
@ -93,11 +98,13 @@ class NetEqImpl : public webrtc::NetEq {
|
||||
// before sending the struct to the NetEqImpl constructor. However, there
|
||||
// are dependencies between some of the classes inside the struct, so
|
||||
// swapping out one may make it necessary to re-create another one.
|
||||
explicit Dependencies(
|
||||
Dependencies(
|
||||
const NetEq::Config& config,
|
||||
Clock* clock,
|
||||
const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory);
|
||||
~Dependencies();
|
||||
|
||||
Clock* const clock;
|
||||
std::unique_ptr<TickTimer> tick_timer;
|
||||
std::unique_ptr<StatisticsCalculator> stats;
|
||||
std::unique_ptr<BufferLevelFilter> buffer_level_filter;
|
||||
@ -338,6 +345,8 @@ class NetEqImpl : public webrtc::NetEq {
|
||||
// Creates DecisionLogic object with the mode given by |playout_mode_|.
|
||||
virtual void CreateDecisionLogic() RTC_EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
|
||||
|
||||
Clock* const clock_;
|
||||
|
||||
rtc::CriticalSection crit_sect_;
|
||||
const std::unique_ptr<TickTimer> tick_timer_ RTC_GUARDED_BY(crit_sect_);
|
||||
const std::unique_ptr<BufferLevelFilter> buffer_level_filter_
|
||||
@ -403,6 +412,8 @@ class NetEqImpl : public webrtc::NetEq {
|
||||
std::unique_ptr<TickTimer::Stopwatch> generated_noise_stopwatch_
|
||||
RTC_GUARDED_BY(crit_sect_);
|
||||
std::vector<uint32_t> last_decoded_timestamps_ RTC_GUARDED_BY(crit_sect_);
|
||||
std::vector<RtpPacketInfo> last_decoded_packet_infos_
|
||||
RTC_GUARDED_BY(crit_sect_);
|
||||
ExpandUmaLogger expand_uma_logger_ RTC_GUARDED_BY(crit_sect_);
|
||||
ExpandUmaLogger speech_expand_uma_logger_ RTC_GUARDED_BY(crit_sect_);
|
||||
bool no_time_stretching_ RTC_GUARDED_BY(crit_sect_); // Only used for test.
|
||||
|
||||
Reference in New Issue
Block a user