Prepare the AudioSendStream to be hooked up to send-side BWE.
This CL contains three changes as a preparation for adding audio send streams
to the send-side BWE:
1. Audio packets are passed through the pacer with high priority. This
is needed to be able to set transport sequence numbers on the packets.
2. A feedback observer is passed to the audio stream's rtcp receiver so
that the BWE can get notified of any BWE feedback being received on the
audio feedback channel.
3. Support for the transport sequence number header extension is added
to audio send streams.
BUG=webrtc:5263,webrtc:5307
R=mflodman@webrtc.org, solenberg@webrtc.org
Review URL: https://codereview.webrtc.org/1479023002 .
Cr-Commit-Position: refs/heads/master@{#10909}
diff --git a/webrtc/voice_engine/channel.h b/webrtc/voice_engine/channel.h
index f26fdb2..d3b1b93 100644
--- a/webrtc/voice_engine/channel.h
+++ b/webrtc/voice_engine/channel.h
@@ -11,13 +11,13 @@
#ifndef WEBRTC_VOICE_ENGINE_CHANNEL_H_
#define WEBRTC_VOICE_ENGINE_CHANNEL_H_
+#include "webrtc/base/criticalsection.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/common_audio/resampler/include/push_resampler.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/audio_coding/include/audio_coding_module.h"
#include "webrtc/modules/audio_conference_mixer/include/audio_conference_mixer_defines.h"
#include "webrtc/modules/audio_processing/rms_level.h"
-#include "webrtc/modules/bitrate_controller/include/bitrate_controller.h"
#include "webrtc/modules/rtp_rtcp/include/remote_ntp_time_estimator.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_header_parser.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp.h"
@@ -48,6 +48,7 @@
class Config;
class CriticalSectionWrapper;
class FileWrapper;
+class PacketRouter;
class ProcessThread;
class ReceiveStatistics;
class RemoteNtpTimeEstimator;
@@ -68,9 +69,12 @@
namespace voe {
class OutputMixer;
+class RtpPacketSenderProxy;
class Statistics;
class StatisticsProxy;
+class TransportFeedbackProxy;
class TransmitMixer;
+class TransportSequenceNumberProxy;
class VoERtcpObserver;
// Helper class to simplify locking scheme for members that are accessed from
@@ -321,6 +325,13 @@
int SetReceiveAudioLevelIndicationStatus(bool enable, unsigned char id);
int SetSendAbsoluteSenderTimeStatus(bool enable, unsigned char id);
int SetReceiveAbsoluteSenderTimeStatus(bool enable, unsigned char id);
+ void EnableSendTransportSequenceNumber(int id);
+
+ void SetCongestionControlObjects(
+ RtpPacketSender* rtp_packet_sender,
+ TransportFeedbackObserver* transport_feedback_observer,
+ PacketRouter* packet_router);
+
void SetRTCPStatus(bool enable);
int GetRTCPStatus(bool& enabled);
int SetRTCP_CNAME(const char cName[256]);
@@ -584,6 +595,12 @@
// An associated send channel.
rtc::scoped_ptr<CriticalSectionWrapper> assoc_send_channel_lock_;
ChannelOwner associate_send_channel_ GUARDED_BY(assoc_send_channel_lock_);
+
+ bool pacing_enabled_;
+ PacketRouter* packet_router_ = nullptr;
+ rtc::scoped_ptr<TransportFeedbackProxy> feedback_observer_proxy_;
+ rtc::scoped_ptr<TransportSequenceNumberProxy> seq_num_allocator_proxy_;
+ rtc::scoped_ptr<RtpPacketSenderProxy> rtp_packet_sender_proxy_;
};
} // namespace voe