diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc index 62174e343cd8..b9ac4db30cb0 100644 --- a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc +++ b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc @@ -141,35 +141,6 @@ bool RTPSenderAudio::MarkerBit(AudioFrameType frame_type, int8_t payload_type) { return marker_bit; } -bool RTPSenderAudio::SendAudio(AudioFrameType frame_type, - int8_t payload_type, - uint32_t rtp_timestamp, - const uint8_t* payload_data, - size_t payload_size) { - return SendAudio({.type = frame_type, - .payload{payload_data, payload_size}, - .payload_id = payload_type, - .rtp_timestamp = rtp_timestamp}); -} - -bool RTPSenderAudio::SendAudio(AudioFrameType frame_type, - int8_t payload_type, - uint32_t rtp_timestamp, - const uint8_t* payload_data, - size_t payload_size, - int64_t absolute_capture_timestamp_ms) { - RtpAudioFrame frame = { - .type = frame_type, - .payload{payload_data, payload_size}, - .payload_id = payload_type, - .rtp_timestamp = rtp_timestamp, - }; - if (absolute_capture_timestamp_ms > 0) { - frame.capture_time = Timestamp::Millis(absolute_capture_timestamp_ms); - } - return SendAudio(frame); -} - bool RTPSenderAudio::SendAudio(const RtpAudioFrame& frame) { RTC_DCHECK_GE(frame.payload_id, 0); RTC_DCHECK_LE(frame.payload_id, 127); @@ -182,12 +153,10 @@ bool RTPSenderAudio::SendAudio(const RtpAudioFrame& frame) { // Alternatively, a source MAY decide to use a different spacing for event // updates, with a value of 50 ms RECOMMENDED. constexpr int kDtmfIntervalTimeMs = 50; - uint8_t audio_level_dbov = 0; uint32_t dtmf_payload_freq = 0; absl::optional encoder_rtp_timestamp_frequency; { MutexLock lock(&send_audio_mutex_); - audio_level_dbov = audio_level_dbov_; dtmf_payload_freq = dtmf_payload_freq_; encoder_rtp_timestamp_frequency = encoder_rtp_timestamp_frequency_; } @@ -278,10 +247,10 @@ bool RTPSenderAudio::SendAudio(const RtpAudioFrame& frame) { packet->SetPayloadType(frame.payload_id); packet->SetTimestamp(frame.rtp_timestamp); packet->set_capture_time(clock_->CurrentTime()); - // Update audio level extension, if included. + // Set audio level extension, if included. packet->SetExtension( frame.type == AudioFrameType::kAudioFrameSpeech, - frame.audio_level_dbov.value_or(audio_level_dbov)); + frame.audio_level_dbov.value_or(127)); if (frame.capture_time.has_value()) { // Send absolute capture time periodically in order to optimize and save @@ -326,16 +295,6 @@ bool RTPSenderAudio::SendAudio(const RtpAudioFrame& frame) { return true; } -// Audio level magnitude and voice activity flag are set for each RTP packet -int32_t RTPSenderAudio::SetAudioLevel(uint8_t level_dbov) { - if (level_dbov > 127) { - return -1; - } - MutexLock lock(&send_audio_mutex_); - audio_level_dbov_ = level_dbov; - return 0; -} - // Send a TelephoneEvent tone using RFC 2833 (4733) int32_t RTPSenderAudio::SendTelephoneEvent(uint8_t key, uint16_t time_ms, diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.h b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.h index ee4e92635f97..b53bb02c89df 100644 --- a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.h +++ b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.h @@ -64,26 +64,6 @@ class RTPSenderAudio { }; bool SendAudio(const RtpAudioFrame& frame); - [[deprecated]] bool SendAudio(AudioFrameType frame_type, - int8_t payload_type, - uint32_t rtp_timestamp, - const uint8_t* payload_data, - size_t payload_size); - - // `absolute_capture_timestamp_ms` and `Clock::CurrentTime` - // should be using the same epoch. - [[deprecated]] bool SendAudio(AudioFrameType frame_type, - int8_t payload_type, - uint32_t rtp_timestamp, - const uint8_t* payload_data, - size_t payload_size, - int64_t absolute_capture_timestamp_ms); - - // Store the audio level in dBov for - // header-extension-for-audio-level-indication. - // Valid range is [0,127]. Actual value is negative. - [[deprecated]] int32_t SetAudioLevel(uint8_t level_dbov); - // Send a DTMF tone using RFC 2833 (4733) int32_t SendTelephoneEvent(uint8_t key, uint16_t time_ms, uint8_t level); @@ -122,9 +102,6 @@ class RTPSenderAudio { int8_t cngfb_payload_type_ RTC_GUARDED_BY(send_audio_mutex_) = -1; int8_t last_payload_type_ RTC_GUARDED_BY(send_audio_mutex_) = -1; - // Audio level indication. - // (https://datatracker.ietf.org/doc/draft-lennox-avt-rtp-audio-level-exthdr/) - uint8_t audio_level_dbov_ RTC_GUARDED_BY(send_audio_mutex_) = 127; OneTimeEvent first_packet_sent_; absl::optional encoder_rtp_timestamp_frequency_ diff --git a/third_party/libwebrtc/moz-patch-stack/10e5724fe9.no-op-cherry-pick-msg b/third_party/libwebrtc/moz-patch-stack/10e5724fe9.no-op-cherry-pick-msg new file mode 100644 index 000000000000..ff934a7fa265 --- /dev/null +++ b/third_party/libwebrtc/moz-patch-stack/10e5724fe9.no-op-cherry-pick-msg @@ -0,0 +1 @@ +We cherry-picked this in bug 1860685