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}
This commit is contained in:
Stefan Holmer
2015-12-07 10:26:18 +01:00
parent 03f80ebb83
commit b86d4e4a8d
19 changed files with 431 additions and 144 deletions

View File

@ -358,10 +358,9 @@ int32_t PacedSender::Process() {
CriticalSectionScoped cs(critsect_.get());
int64_t elapsed_time_ms = (now_us - time_last_update_us_ + 500) / 1000;
time_last_update_us_ = now_us;
if (paused_)
return 0;
int target_bitrate_kbps = max_bitrate_kbps_;
if (elapsed_time_ms > 0) {
// TODO(holmer): Remove the !paused_ check when issue 5307 has been fixed.
if (!paused_ && elapsed_time_ms > 0) {
size_t queue_size_bytes = packets_->SizeInBytes();
if (queue_size_bytes > 0) {
// Assuming equal size packets and input/output rate, the average packet
@ -389,7 +388,11 @@ int32_t PacedSender::Process() {
// element from the priority queue but keep it in storage, so that we can
// reinsert it if send fails.
const paced_sender::Packet& packet = packets_->BeginPop();
if (SendPacket(packet)) {
// TODO(holmer): Because of this bug issue 5307 we have to send audio
// packets even when the pacer is paused. Here we assume audio packets are
// always high priority and that they are the only high priority packets.
if ((!paused_ || packet.priority == kHighPriority) && SendPacket(packet)) {
// Send succeeded, remove it from the queue.
packets_->FinalizePop(packet);
if (prober_->IsProbing())
@ -401,7 +404,8 @@ int32_t PacedSender::Process() {
}
}
if (!packets_->Empty())
// TODO(holmer): Remove the paused_ check when issue 5307 has been fixed.
if (paused_ || !packets_->Empty())
return 0;
size_t padding_needed;