summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/audio/audio_send_stream.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:43:14 +0000
commit8dd16259287f58f9273002717ec4d27e97127719 (patch)
tree3863e62a53829a84037444beab3abd4ed9dfc7d0 /third_party/libwebrtc/audio/audio_send_stream.h
parentReleasing progress-linux version 126.0.1-1~progress7.99u1. (diff)
downloadfirefox-8dd16259287f58f9273002717ec4d27e97127719.tar.xz
firefox-8dd16259287f58f9273002717ec4d27e97127719.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/libwebrtc/audio/audio_send_stream.h')
-rw-r--r--third_party/libwebrtc/audio/audio_send_stream.h28
1 files changed, 8 insertions, 20 deletions
diff --git a/third_party/libwebrtc/audio/audio_send_stream.h b/third_party/libwebrtc/audio/audio_send_stream.h
index 09fd712d40..a37c8fd452 100644
--- a/third_party/libwebrtc/audio/audio_send_stream.h
+++ b/third_party/libwebrtc/audio/audio_send_stream.h
@@ -110,8 +110,7 @@ class AudioSendStream final : public webrtc::AudioSendStream,
const voe::ChannelSendInterface* GetChannel() const;
// Returns combined per-packet overhead.
- size_t TestOnlyGetPerPacketOverheadBytes() const
- RTC_LOCKS_EXCLUDED(overhead_per_packet_lock_);
+ size_t TestOnlyGetPerPacketOverheadBytes() const;
private:
class TimedTransport;
@@ -152,19 +151,11 @@ class AudioSendStream final : public webrtc::AudioSendStream,
// Sets per-packet overhead on encoded (for ANA) based on current known values
// of transport and packetization overheads.
- void UpdateOverheadForEncoder()
- RTC_EXCLUSIVE_LOCKS_REQUIRED(overhead_per_packet_lock_);
-
- // Returns combined per-packet overhead.
- size_t GetPerPacketOverheadBytes() const
- RTC_EXCLUSIVE_LOCKS_REQUIRED(overhead_per_packet_lock_);
+ void UpdateOverheadPerPacket();
void RegisterCngPayloadType(int payload_type, int clockrate_hz)
RTC_RUN_ON(worker_thread_checker_);
- void UpdateCachedTargetAudioBitrateConstraints()
- RTC_RUN_ON(worker_thread_checker_);
-
Clock* clock_;
const FieldTrialsView& field_trials_;
@@ -182,6 +173,7 @@ class AudioSendStream final : public webrtc::AudioSendStream,
const std::unique_ptr<voe::ChannelSendInterface> channel_send_;
RtcEventLog* const event_log_;
const bool use_legacy_overhead_calculation_;
+ const bool enable_priority_bitrate_;
int encoder_sample_rate_hz_ RTC_GUARDED_BY(worker_thread_checker_) = 0;
size_t encoder_num_channels_ RTC_GUARDED_BY(worker_thread_checker_) = 0;
@@ -193,9 +185,6 @@ class AudioSendStream final : public webrtc::AudioSendStream,
BitrateAllocatorInterface* const bitrate_allocator_
RTC_GUARDED_BY(worker_thread_checker_);
- absl::optional<AudioSendStream::TargetAudioBitrateConstraints>
- cached_constraints_ RTC_GUARDED_BY(worker_thread_checker_) =
- absl::nullopt;
RtpTransportControllerSendInterface* const rtp_transport_;
RtpRtcpInterface* const rtp_rtcp_module_;
@@ -217,19 +206,18 @@ class AudioSendStream final : public webrtc::AudioSendStream,
const std::vector<RtpExtension>& extensions);
static int TransportSeqNumId(const Config& config);
- mutable Mutex overhead_per_packet_lock_;
- size_t overhead_per_packet_ RTC_GUARDED_BY(overhead_per_packet_lock_) = 0;
-
// Current transport overhead (ICE, TURN, etc.)
size_t transport_overhead_per_packet_bytes_
- RTC_GUARDED_BY(overhead_per_packet_lock_) = 0;
+ RTC_GUARDED_BY(worker_thread_checker_) = 0;
+ // Total overhead, including transport and RTP headers.
+ size_t overhead_per_packet_ RTC_GUARDED_BY(worker_thread_checker_) = 0;
bool registered_with_allocator_ RTC_GUARDED_BY(worker_thread_checker_) =
false;
- size_t total_packet_overhead_bytes_ RTC_GUARDED_BY(worker_thread_checker_) =
- 0;
absl::optional<std::pair<TimeDelta, TimeDelta>> frame_length_range_
RTC_GUARDED_BY(worker_thread_checker_);
+ absl::optional<std::pair<DataRate, DataRate>> bitrate_range_
+ RTC_GUARDED_BY(worker_thread_checker_);
};
} // namespace internal
} // namespace webrtc