tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 5fa6d363c605083f0beb6f6d21910849a06952db
parent 6c2e49c88221012b7c5a928d59c26b054a3c9e23
Author: Dan Baker <dbaker@mozilla.com>
Date:   Mon, 27 Oct 2025 13:35:54 -0600

Bug 1995393 - Vendor libwebrtc from de4667eb4f

Upstream commit: https://webrtc.googlesource.com/src/+/de4667eb4f071c691cfe5304210480ee61a112b0
    Propagate Environment into voice engine channels

    This way Call no longer need to expose Environment or field trials

    Bug: webrtc:440271885
    Change-Id: Ib680e9943b1b35f789eac6228cd33dd55569d382
    Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/406380
    Reviewed-by: Harald Alvestrand <hta@webrtc.org>
    Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
    Cr-Commit-Position: refs/heads/main@{#45448}

Diffstat:
Mthird_party/libwebrtc/README.mozilla.last-vendor | 4++--
Mthird_party/libwebrtc/call/call.cc | 14+-------------
Mthird_party/libwebrtc/call/call.h | 8+-------
Mthird_party/libwebrtc/media/base/fake_media_engine.cc | 6++++--
Mthird_party/libwebrtc/media/base/fake_media_engine.h | 2++
Mthird_party/libwebrtc/media/base/media_engine.h | 22++++++++++++----------
Mthird_party/libwebrtc/media/engine/fake_webrtc_call.h | 3---
Mthird_party/libwebrtc/media/engine/webrtc_video_engine.cc | 4++--
Mthird_party/libwebrtc/media/engine/webrtc_voice_engine.cc | 21+++++++++++++--------
Mthird_party/libwebrtc/media/engine/webrtc_voice_engine.h | 12++++++++----
Mthird_party/libwebrtc/media/engine/webrtc_voice_engine_unittest.cc | 44++++++++++++++++++++++----------------------
Mthird_party/libwebrtc/moz-patch-stack/s0119.patch | 10+++++-----
Mthird_party/libwebrtc/pc/rtp_sender_receiver_unittest.cc | 4++--
Mthird_party/libwebrtc/pc/rtp_transceiver.cc | 4++--
14 files changed, 76 insertions(+), 82 deletions(-)

diff --git a/third_party/libwebrtc/README.mozilla.last-vendor b/third_party/libwebrtc/README.mozilla.last-vendor @@ -1,4 +1,4 @@ # ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc -libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-27T19:33:32.697294+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-27T19:35:39.571378+00:00. # base of lastest vendoring -9aa4278cf5 +de4667eb4f diff --git a/third_party/libwebrtc/call/call.cc b/third_party/libwebrtc/call/call.cc @@ -28,7 +28,6 @@ #include "api/array_view.h" #include "api/environment/environment.h" #include "api/fec_controller.h" -#include "api/field_trials_view.h" #include "api/media_types.h" #include "api/rtc_error.h" #include "api/rtc_event_log/rtc_event_log.h" @@ -284,9 +283,6 @@ class Call final : public webrtc::Call, int FeedbackAccordingToRfc8888Count() override; int FeedbackAccordingToTransportCcCount() override; - const FieldTrialsView& trials() const override; - const Environment& env() const override; - TaskQueueBase* network_thread() const override; TaskQueueBase* worker_thread() const override; @@ -1036,7 +1032,7 @@ webrtc::VideoReceiveStreamInterface* Call::CreateVideoReceiveStream( VideoReceiveStream2* receive_stream = new VideoReceiveStream2( env_, this, num_cpu_cores_, transport_send_->packet_router(), std::move(configuration), call_stats_.get(), - std::make_unique<VCMTiming>(&env_.clock(), trials()), + std::make_unique<VCMTiming>(&env_.clock(), env_.field_trials()), &nack_periodic_processor_, decode_sync_.get()); // TODO(bugs.webrtc.org/11993): Set this up asynchronously on the network // thread. @@ -1177,14 +1173,6 @@ int Call::FeedbackAccordingToTransportCcCount() { return transport_send_->ReceivedTransportCcFeedbackCount(); } -const FieldTrialsView& Call::trials() const { - return env_.field_trials(); -} - -const Environment& Call::env() const { - return env_; -} - TaskQueueBase* Call::network_thread() const { return network_thread_; } diff --git a/third_party/libwebrtc/call/call.h b/third_party/libwebrtc/call/call.h @@ -16,9 +16,7 @@ #include "absl/strings/string_view.h" #include "api/adaptation/resource.h" -#include "api/environment/environment.h" #include "api/fec_controller.h" -#include "api/field_trials_view.h" #include "api/media_types.h" #include "api/rtp_headers.h" #include "api/rtp_parameters.h" @@ -155,14 +153,10 @@ class Call { virtual int FeedbackAccordingToRfc8888Count() = 0; virtual int FeedbackAccordingToTransportCcCount() = 0; - // TODO(bugs.webrtc.org/440271885): Use env() instead. - virtual const FieldTrialsView& trials() const = 0; - virtual const Environment& env() const = 0; - virtual TaskQueueBase* network_thread() const = 0; virtual TaskQueueBase* worker_thread() const = 0; - virtual ~Call() {} + virtual ~Call() = default; }; } // namespace webrtc diff --git a/third_party/libwebrtc/media/base/fake_media_engine.cc b/third_party/libwebrtc/media/base/fake_media_engine.cc @@ -572,7 +572,8 @@ scoped_refptr<AudioState> FakeVoiceEngine::GetAudioState() const { return scoped_refptr<AudioState>(); } std::unique_ptr<VoiceMediaSendChannelInterface> -FakeVoiceEngine::CreateSendChannel(Call* call, +FakeVoiceEngine::CreateSendChannel(const Environment& /*env*/, + Call* call, const MediaConfig& /* config */, const AudioOptions& options, const CryptoOptions& /* crypto_options */, @@ -583,7 +584,8 @@ FakeVoiceEngine::CreateSendChannel(Call* call, return ch; } std::unique_ptr<VoiceMediaReceiveChannelInterface> -FakeVoiceEngine::CreateReceiveChannel(Call* call, +FakeVoiceEngine::CreateReceiveChannel(const Environment& /*env*/, + Call* call, const MediaConfig& /* config */, const AudioOptions& options, const CryptoOptions& /* crypto_options */, diff --git a/third_party/libwebrtc/media/base/fake_media_engine.h b/third_party/libwebrtc/media/base/fake_media_engine.h @@ -790,12 +790,14 @@ class FakeVoiceEngine : public VoiceEngineInterface { scoped_refptr<AudioState> GetAudioState() const override; std::unique_ptr<VoiceMediaSendChannelInterface> CreateSendChannel( + const Environment& env, Call* call, const MediaConfig& config, const AudioOptions& options, const CryptoOptions& crypto_options, AudioCodecPairId codec_pair_id) override; std::unique_ptr<VoiceMediaReceiveChannelInterface> CreateReceiveChannel( + const Environment& env, Call* call, const MediaConfig& config, const AudioOptions& options, diff --git a/third_party/libwebrtc/media/base/media_engine.h b/third_party/libwebrtc/media/base/media_engine.h @@ -97,18 +97,20 @@ class VoiceEngineInterface : public RtpHeaderExtensionQueryInterface { virtual scoped_refptr<AudioState> GetAudioState() const = 0; virtual std::unique_ptr<VoiceMediaSendChannelInterface> CreateSendChannel( - Call* /* call */, - const MediaConfig& /* config */, - const AudioOptions& /* options */, - const CryptoOptions& /* crypto_options */, - AudioCodecPairId /* codec_pair_id */) = 0; + const Environment& env, + Call* call, + const MediaConfig& config, + const AudioOptions& options, + const CryptoOptions& crypto_options, + AudioCodecPairId codec_pair_id) = 0; virtual std::unique_ptr<VoiceMediaReceiveChannelInterface> - CreateReceiveChannel(Call* /* call */, - const MediaConfig& /* config */, - const AudioOptions& /* options */, - const CryptoOptions& /* crypto_options */, - AudioCodecPairId /* codec_pair_id */) = 0; + CreateReceiveChannel(const Environment& env, + Call* call, + const MediaConfig& config, + const AudioOptions& options, + const CryptoOptions& crypto_options, + AudioCodecPairId codec_pair_id) = 0; // Legacy: Retrieve list of supported codecs. // + protection codecs, and assigns PT numbers that may have to be diff --git a/third_party/libwebrtc/media/engine/fake_webrtc_call.h b/third_party/libwebrtc/media/engine/fake_webrtc_call.h @@ -37,7 +37,6 @@ #include "api/audio_codecs/audio_format.h" #include "api/crypto/frame_decryptor_interface.h" #include "api/environment/environment.h" -#include "api/field_trials_view.h" #include "api/frame_transformer_interface.h" #include "api/media_types.h" #include "api/rtp_headers.h" @@ -432,8 +431,6 @@ class FakeCall final : public Call, public PacketReceiver { void SetClientBitratePreferences( const BitrateSettings& /* preferences */) override {} - const FieldTrialsView& trials() const override { return env_.field_trials(); } - const Environment& env() const override { return env_; } void SetPreferredRtcpCcAckType( RtcpFeedbackType preferred_rtcp_cc_ack_type) override {} int FeedbackAccordingToRfc8888Count() { return 0; } diff --git a/third_party/libwebrtc/media/engine/webrtc_video_engine.cc b/third_party/libwebrtc/media/engine/webrtc_video_engine.cc @@ -1802,8 +1802,8 @@ WebRtcVideoSendChannel::WebRtcVideoSendStream::WebRtcVideoSendStream( codec_settings_list), rtp_parameters_(CreateRtpParametersWithEncodings(sp)), sending_(false), - disable_automatic_resize_( - call->trials().IsEnabled("WebRTC-Video-DisableAutomaticResize")) { + disable_automatic_resize_(env_.field_trials().IsEnabled( + "WebRTC-Video-DisableAutomaticResize")) { // Maximum packet size may come in RtpConfig from external transport, for // example from QuicTransportInterface implementation, so do not exceed // given max_packet_size. diff --git a/third_party/libwebrtc/media/engine/webrtc_voice_engine.cc b/third_party/libwebrtc/media/engine/webrtc_voice_engine.cc @@ -577,23 +577,25 @@ scoped_refptr<AudioState> WebRtcVoiceEngine::GetAudioState() const { } std::unique_ptr<VoiceMediaSendChannelInterface> -WebRtcVoiceEngine::CreateSendChannel(Call* call, +WebRtcVoiceEngine::CreateSendChannel(const Environment& env, + Call* call, const MediaConfig& config, const AudioOptions& options, const CryptoOptions& crypto_options, AudioCodecPairId codec_pair_id) { return std::make_unique<WebRtcVoiceSendChannel>( - this, config, options, crypto_options, call, codec_pair_id); + env, this, config, options, crypto_options, call, codec_pair_id); } std::unique_ptr<VoiceMediaReceiveChannelInterface> -WebRtcVoiceEngine::CreateReceiveChannel(Call* call, +WebRtcVoiceEngine::CreateReceiveChannel(const Environment& env, + Call* call, const MediaConfig& config, const AudioOptions& options, const CryptoOptions& crypto_options, AudioCodecPairId codec_pair_id) { return std::make_unique<WebRtcVoiceReceiveChannel>( - this, config, options, crypto_options, call, codec_pair_id); + env, this, config, options, crypto_options, call, codec_pair_id); } void WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) { @@ -833,6 +835,7 @@ AudioState* WebRtcVoiceEngine::audio_state() { class WebRtcVoiceSendChannel::WebRtcAudioSendStream : public AudioSource::Sink { public: WebRtcAudioSendStream( + const Environment& env, uint32_t ssrc, const std::string& mid, const std::string& c_name, @@ -851,7 +854,7 @@ class WebRtcVoiceSendChannel::WebRtcAudioSendStream : public AudioSource::Sink { const std::optional<AudioCodecPairId> codec_pair_id, scoped_refptr<FrameEncryptorInterface> frame_encryptor, const CryptoOptions& crypto_options) - : env_(call->env()), + : env_(env), adaptive_ptime_config_(env_.field_trials()), call_(call), config_(send_transport), @@ -1272,6 +1275,7 @@ class WebRtcVoiceSendChannel::WebRtcAudioSendStream : public AudioSource::Sink { }; WebRtcVoiceSendChannel::WebRtcVoiceSendChannel( + const Environment& env, WebRtcVoiceEngine* engine, const MediaConfig& config, const AudioOptions& options, @@ -1279,7 +1283,7 @@ WebRtcVoiceSendChannel::WebRtcVoiceSendChannel( Call* call, AudioCodecPairId codec_pair_id) : MediaChannelUtil(call->network_thread(), config.enable_dscp), - env_(call->env()), + env_(env), worker_thread_(call->worker_thread()), engine_(engine), call_(call), @@ -1628,7 +1632,7 @@ bool WebRtcVoiceSendChannel::AddSendStream(const StreamParams& sp) { std::optional<std::string> audio_network_adaptor_config = GetAudioNetworkAdaptorConfig(options_); WebRtcAudioSendStream* stream = new WebRtcAudioSendStream( - ssrc, mid_, sp.cname, sp.id, send_codec_spec_, ExtmapAllowMixed(), + env_, ssrc, mid_, sp.cname, sp.id, send_codec_spec_, ExtmapAllowMixed(), send_rtp_extensions_, rtcp_cc_ack_type_, max_send_bitrate_bps_, audio_config_.rtcp_report_interval_ms, audio_network_adaptor_config, call_, transport(), engine()->encoder_factory_, codec_pair_id_, nullptr, @@ -2108,6 +2112,7 @@ class WebRtcVoiceReceiveChannel::WebRtcAudioReceiveStream { }; WebRtcVoiceReceiveChannel::WebRtcVoiceReceiveChannel( + const Environment& env, WebRtcVoiceEngine* engine, const MediaConfig& config, const AudioOptions& options, @@ -2115,7 +2120,7 @@ WebRtcVoiceReceiveChannel::WebRtcVoiceReceiveChannel( Call* call, AudioCodecPairId codec_pair_id) : MediaChannelUtil(call->network_thread(), config.enable_dscp), - env_(call->env()), + env_(env), worker_thread_(call->worker_thread()), engine_(engine), call_(call), diff --git a/third_party/libwebrtc/media/engine/webrtc_voice_engine.h b/third_party/libwebrtc/media/engine/webrtc_voice_engine.h @@ -96,6 +96,7 @@ class WebRtcVoiceEngine final : public VoiceEngineInterface { scoped_refptr<AudioState> GetAudioState() const override; std::unique_ptr<VoiceMediaSendChannelInterface> CreateSendChannel( + const Environment& env, Call* call, const MediaConfig& config, const AudioOptions& options, @@ -103,6 +104,7 @@ class WebRtcVoiceEngine final : public VoiceEngineInterface { AudioCodecPairId codec_pair_id) override; std::unique_ptr<VoiceMediaReceiveChannelInterface> CreateReceiveChannel( + const Environment& env, Call* call, const MediaConfig& config, const AudioOptions& options, @@ -176,7 +178,8 @@ class WebRtcVoiceEngine final : public VoiceEngineInterface { class WebRtcVoiceSendChannel final : public MediaChannelUtil, public VoiceMediaSendChannelInterface { public: - WebRtcVoiceSendChannel(WebRtcVoiceEngine* engine, + WebRtcVoiceSendChannel(const Environment& env, + WebRtcVoiceEngine* engine, const MediaConfig& config, const AudioOptions& options, const CryptoOptions& crypto_options, @@ -285,7 +288,7 @@ class WebRtcVoiceSendChannel final : public MediaChannelUtil, bool SetMaxSendBitrate(int bps); void SetupRecording(); - const Environment& env_; + const Environment env_; TaskQueueBase* const worker_thread_; ScopedTaskSafety task_safety_; SequenceChecker network_thread_checker_{SequenceChecker::kDetached}; @@ -335,7 +338,8 @@ class WebRtcVoiceReceiveChannel final : public MediaChannelUtil, public VoiceMediaReceiveChannelInterface { public: - WebRtcVoiceReceiveChannel(WebRtcVoiceEngine* engine, + WebRtcVoiceReceiveChannel(const Environment& env, + WebRtcVoiceEngine* engine, const MediaConfig& config, const AudioOptions& options, const CryptoOptions& crypto_options, @@ -434,7 +438,7 @@ class WebRtcVoiceReceiveChannel final // unsignaled anymore (i.e. it is now removed, or signaled), and return true. bool MaybeDeregisterUnsignaledRecvStream(uint32_t ssrc); - const Environment& env_; + const Environment env_; TaskQueueBase* const worker_thread_; ScopedTaskSafety task_safety_; SequenceChecker network_thread_checker_{SequenceChecker::kDetached}; diff --git a/third_party/libwebrtc/media/engine/webrtc_voice_engine_unittest.cc b/third_party/libwebrtc/media/engine/webrtc_voice_engine_unittest.cc @@ -299,10 +299,10 @@ class WebRtcVoiceEngineTestFake : public ::testing::TestWithParam<bool> { bool SetupChannel() { send_channel_ = engine_->CreateSendChannel( - &call_, webrtc::MediaConfig(), webrtc::AudioOptions(), + env_, &call_, webrtc::MediaConfig(), webrtc::AudioOptions(), webrtc::CryptoOptions(), webrtc::AudioCodecPairId::Create()); receive_channel_ = engine_->CreateReceiveChannel( - &call_, webrtc::MediaConfig(), webrtc::AudioOptions(), + env_, &call_, webrtc::MediaConfig(), webrtc::AudioOptions(), webrtc::CryptoOptions(), webrtc::AudioCodecPairId::Create()); send_channel_->SetSsrcListChangedCallback( [receive_channel = @@ -3225,7 +3225,7 @@ TEST_P(WebRtcVoiceEngineTestFake, InitRecordingOnSend) { std::unique_ptr<webrtc::VoiceMediaSendChannelInterface> send_channel( engine_->CreateSendChannel( - &call_, webrtc::MediaConfig(), webrtc::AudioOptions(), + env_, &call_, webrtc::MediaConfig(), webrtc::AudioOptions(), webrtc::CryptoOptions(), webrtc::AudioCodecPairId::Create())); send_channel->SetSend(true); @@ -3240,7 +3240,7 @@ TEST_P(WebRtcVoiceEngineTestFake, SkipInitRecordingOnSend) { options.init_recording_on_send = false; std::unique_ptr<webrtc::VoiceMediaSendChannelInterface> send_channel( - engine_->CreateSendChannel(&call_, webrtc::MediaConfig(), options, + engine_->CreateSendChannel(env_, &call_, webrtc::MediaConfig(), options, webrtc::CryptoOptions(), webrtc::AudioCodecPairId::Create())); @@ -3267,11 +3267,11 @@ TEST_P(WebRtcVoiceEngineTestFake, SetOptionOverridesViaChannels) { std::unique_ptr<webrtc::VoiceMediaSendChannelInterface> send_channel1( engine_->CreateSendChannel( - &call_, webrtc::MediaConfig(), webrtc::AudioOptions(), + env_, &call_, webrtc::MediaConfig(), webrtc::AudioOptions(), webrtc::CryptoOptions(), webrtc::AudioCodecPairId::Create())); std::unique_ptr<webrtc::VoiceMediaSendChannelInterface> send_channel2( engine_->CreateSendChannel( - &call_, webrtc::MediaConfig(), webrtc::AudioOptions(), + env_, &call_, webrtc::MediaConfig(), webrtc::AudioOptions(), webrtc::CryptoOptions(), webrtc::AudioCodecPairId::Create())); // Have to add a stream to make SetSend work. @@ -3387,18 +3387,18 @@ TEST_P(WebRtcVoiceEngineTestFake, TestSetDscpOptions) { std::unique_ptr<webrtc::VoiceMediaSendChannelInterface> channel; webrtc::RtpParameters parameters; - channel = engine_->CreateSendChannel(&call_, config, webrtc::AudioOptions(), - webrtc::CryptoOptions(), - webrtc::AudioCodecPairId::Create()); + channel = engine_->CreateSendChannel( + env_, &call_, config, webrtc::AudioOptions(), webrtc::CryptoOptions(), + webrtc::AudioCodecPairId::Create()); channel->SetInterface(&network_interface); // Default value when DSCP is disabled should be DSCP_DEFAULT. EXPECT_EQ(webrtc::DSCP_DEFAULT, network_interface.dscp()); channel->SetInterface(nullptr); config.enable_dscp = true; - channel = engine_->CreateSendChannel(&call_, config, webrtc::AudioOptions(), - webrtc::CryptoOptions(), - webrtc::AudioCodecPairId::Create()); + channel = engine_->CreateSendChannel( + env_, &call_, config, webrtc::AudioOptions(), webrtc::CryptoOptions(), + webrtc::AudioCodecPairId::Create()); channel->SetInterface(&network_interface); EXPECT_EQ(webrtc::DSCP_DEFAULT, network_interface.dscp()); @@ -3427,9 +3427,9 @@ TEST_P(WebRtcVoiceEngineTestFake, TestSetDscpOptions) { // Verify that setting the option to false resets the // DiffServCodePoint. config.enable_dscp = false; - channel = engine_->CreateSendChannel(&call_, config, webrtc::AudioOptions(), - webrtc::CryptoOptions(), - webrtc::AudioCodecPairId::Create()); + channel = engine_->CreateSendChannel( + env_, &call_, config, webrtc::AudioOptions(), webrtc::CryptoOptions(), + webrtc::AudioCodecPairId::Create()); channel->SetInterface(&network_interface); // Default value when DSCP is disabled should be DSCP_DEFAULT. EXPECT_EQ(webrtc::DSCP_DEFAULT, network_interface.dscp()); @@ -3831,12 +3831,12 @@ TEST(WebRtcVoiceEngineTest, StartupShutdown) { std::unique_ptr<Call> call = Call::Create(CallConfig(env)); std::unique_ptr<webrtc::VoiceMediaSendChannelInterface> send_channel = engine.CreateSendChannel( - call.get(), webrtc::MediaConfig(), webrtc::AudioOptions(), + env, call.get(), webrtc::MediaConfig(), webrtc::AudioOptions(), webrtc::CryptoOptions(), webrtc::AudioCodecPairId::Create()); EXPECT_TRUE(send_channel); std::unique_ptr<webrtc::VoiceMediaReceiveChannelInterface> receive_channel = engine.CreateReceiveChannel( - call.get(), webrtc::MediaConfig(), webrtc::AudioOptions(), + env, call.get(), webrtc::MediaConfig(), webrtc::AudioOptions(), webrtc::CryptoOptions(), webrtc::AudioCodecPairId::Create()); EXPECT_TRUE(receive_channel); } @@ -3860,12 +3860,12 @@ TEST(WebRtcVoiceEngineTest, StartupShutdownWithExternalADM) { std::unique_ptr<Call> call = Call::Create(CallConfig(env)); std::unique_ptr<webrtc::VoiceMediaSendChannelInterface> send_channel = engine.CreateSendChannel( - call.get(), webrtc::MediaConfig(), webrtc::AudioOptions(), + env, call.get(), webrtc::MediaConfig(), webrtc::AudioOptions(), webrtc::CryptoOptions(), webrtc::AudioCodecPairId::Create()); EXPECT_TRUE(send_channel); std::unique_ptr<webrtc::VoiceMediaReceiveChannelInterface> receive_channel = engine.CreateReceiveChannel( - call.get(), webrtc::MediaConfig(), webrtc::AudioOptions(), + env, call.get(), webrtc::MediaConfig(), webrtc::AudioOptions(), webrtc::CryptoOptions(), webrtc::AudioCodecPairId::Create()); EXPECT_TRUE(receive_channel); } @@ -3944,7 +3944,7 @@ TEST(WebRtcVoiceEngineTest, Has32Channels) { while (channels.size() < 32) { std::unique_ptr<webrtc::VoiceMediaSendChannelInterface> channel = engine.CreateSendChannel( - call.get(), webrtc::MediaConfig(), webrtc::AudioOptions(), + env, call.get(), webrtc::MediaConfig(), webrtc::AudioOptions(), webrtc::CryptoOptions(), webrtc::AudioCodecPairId::Create()); if (!channel) break; @@ -3977,7 +3977,7 @@ TEST(WebRtcVoiceEngineTest, SetRecvCodecs) { engine.Init(); std::unique_ptr<Call> call = Call::Create(CallConfig(env)); webrtc::WebRtcVoiceReceiveChannel channel( - &engine, webrtc::MediaConfig(), webrtc::AudioOptions(), + env, &engine, webrtc::MediaConfig(), webrtc::AudioOptions(), webrtc::CryptoOptions(), call.get(), webrtc::AudioCodecPairId::Create()); webrtc::AudioReceiverParameters parameters; @@ -4006,7 +4006,7 @@ TEST(WebRtcVoiceEngineTest, SetRtpSendParametersMaxBitrate) { } std::unique_ptr<Call> call = Call::Create(std::move(call_config)); webrtc::WebRtcVoiceSendChannel channel( - &engine, webrtc::MediaConfig(), webrtc::AudioOptions(), + env, &engine, webrtc::MediaConfig(), webrtc::AudioOptions(), webrtc::CryptoOptions(), call.get(), webrtc::AudioCodecPairId::Create()); { webrtc::AudioSenderParameter params; diff --git a/third_party/libwebrtc/moz-patch-stack/s0119.patch b/third_party/libwebrtc/moz-patch-stack/s0119.patch @@ -12,10 +12,10 @@ Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/19164e58323d59c1f 3 files changed, 7 insertions(+), 22 deletions(-) diff --git a/call/call.cc b/call/call.cc -index 01c6cc7be6..7b9ef6b5a9 100644 +index 0b756c03a1..8cbffd0374 100644 --- a/call/call.cc +++ b/call/call.cc -@@ -517,19 +517,6 @@ class Call final : public webrtc::Call, +@@ -513,19 +513,6 @@ class Call final : public webrtc::Call, }; } // namespace internal @@ -36,10 +36,10 @@ index 01c6cc7be6..7b9ef6b5a9 100644 std::unique_ptr<RtpTransportControllerSendInterface> transport_send; if (config.rtp_transport_controller_send_factory != nullptr) { diff --git a/call/call.h b/call/call.h -index f100da4d15..4361577be4 100644 +index 5e3d3de221..aa9da48ebe 100644 --- a/call/call.h +++ b/call/call.h -@@ -27,6 +27,7 @@ +@@ -25,6 +25,7 @@ #include "api/transport/bitrate_settings.h" #include "call/audio_receive_stream.h" #include "call/audio_send_stream.h" @@ -47,7 +47,7 @@ index f100da4d15..4361577be4 100644 #include "call/call_config.h" #include "call/flexfec_receive_stream.h" #include "call/packet_receiver.h" -@@ -52,15 +53,7 @@ namespace webrtc { +@@ -50,15 +51,7 @@ namespace webrtc { class Call { public: diff --git a/third_party/libwebrtc/pc/rtp_sender_receiver_unittest.cc b/third_party/libwebrtc/pc/rtp_sender_receiver_unittest.cc @@ -114,13 +114,13 @@ class RtpSenderReceiverTest // Create the channels, discard the result; we get them later. // Fake media channels are owned by the media engine. voice_media_send_channel_ = media_engine_->voice().CreateSendChannel( - &fake_call_, MediaConfig(), AudioOptions(), CryptoOptions(), + env_, &fake_call_, MediaConfig(), AudioOptions(), CryptoOptions(), AudioCodecPairId::Create()); video_media_send_channel_ = media_engine_->video().CreateSendChannel( env_, &fake_call_, MediaConfig(), VideoOptions(), CryptoOptions(), video_bitrate_allocator_factory_.get()); voice_media_receive_channel_ = media_engine_->voice().CreateReceiveChannel( - &fake_call_, MediaConfig(), AudioOptions(), CryptoOptions(), + env_, &fake_call_, MediaConfig(), AudioOptions(), CryptoOptions(), AudioCodecPairId::Create()); video_media_receive_channel_ = media_engine_->video().CreateReceiveChannel( env_, &fake_call_, MediaConfig(), VideoOptions(), CryptoOptions()); diff --git a/third_party/libwebrtc/pc/rtp_transceiver.cc b/third_party/libwebrtc/pc/rtp_transceiver.cc @@ -234,11 +234,11 @@ RTCError RtpTransceiver::CreateChannel( std::unique_ptr<VoiceMediaSendChannelInterface> media_send_channel = media_engine()->voice().CreateSendChannel( - call_ptr, media_config, audio_options, crypto_options, + env_, call_ptr, media_config, audio_options, crypto_options, codec_pair_id); std::unique_ptr<VoiceMediaReceiveChannelInterface> media_receive_channel = media_engine()->voice().CreateReceiveChannel( - call_ptr, media_config, audio_options, crypto_options, + env_, call_ptr, media_config, audio_options, crypto_options, codec_pair_id); // Note that this is safe because both sending and // receiving channels will be deleted at the same time.