Trigger audio bitrate allocation update on overhead change.

This prepares for adding correct overhead calculation to audio bitrate
allocation.

Bug: webrtc:10286
Change-Id: I4669203269396195f7f2ad412ae8470d091e8930
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125090
Reviewed-by: Anton Sukhanov <sukhanov@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27001}
This commit is contained in:
Sebastian Jansson
2019-03-01 15:57:55 +01:00
committed by Commit Bot
parent ee5ccbc57f
commit 8672cac32b
2 changed files with 54 additions and 32 deletions

View File

@ -122,9 +122,7 @@ class AudioSendStream final : public webrtc::AudioSendStream,
static void ReconfigureBitrateObserver(AudioSendStream* stream,
const Config& new_config);
void ConfigureBitrateObserver(int min_bitrate_bps,
int max_bitrate_bps,
double bitrate_priority);
void ConfigureBitrateObserver() RTC_RUN_ON(worker_queue_);
void RemoveBitrateObserver();
// Sets per-packet overhead on encoded (for ANA) based on current known values
@ -153,7 +151,8 @@ class AudioSendStream final : public webrtc::AudioSendStream,
size_t encoder_num_channels_ = 0;
bool sending_ = false;
BitrateAllocatorInterface* const bitrate_allocator_;
BitrateAllocatorInterface* const bitrate_allocator_
RTC_GUARDED_BY(worker_queue_);
RtpTransportControllerSendInterface* const rtp_transport_;
rtc::CriticalSection packet_loss_tracker_cs_;
@ -187,6 +186,9 @@ class AudioSendStream final : public webrtc::AudioSendStream,
size_t audio_overhead_per_packet_bytes_
RTC_GUARDED_BY(overhead_per_packet_lock_) = 0;
bool registered_with_allocator_ RTC_GUARDED_BY(worker_queue_) = false;
size_t total_packet_overhead_bytes_ RTC_GUARDED_BY(worker_queue_) = 0;
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(AudioSendStream);
};
} // namespace internal