summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/sdk
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/libwebrtc/sdk')
-rw-r--r--third_party/libwebrtc/sdk/BUILD.gn12
-rw-r--r--third_party/libwebrtc/sdk/android/api/org/webrtc/EglRenderer.java4
-rw-r--r--third_party/libwebrtc/sdk/android/api/org/webrtc/RenderSynchronizer.java11
-rw-r--r--third_party/libwebrtc/sdk/android/src/java/org/webrtc/HardwareVideoEncoder.java2
-rw-r--r--third_party/libwebrtc/sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm22
-rw-r--r--third_party/libwebrtc/sdk/objc/components/audio/RTCAudioSession.mm6
6 files changed, 31 insertions, 26 deletions
diff --git a/third_party/libwebrtc/sdk/BUILD.gn b/third_party/libwebrtc/sdk/BUILD.gn
index eea26dc31d..586d4d1911 100644
--- a/third_party/libwebrtc/sdk/BUILD.gn
+++ b/third_party/libwebrtc/sdk/BUILD.gn
@@ -254,7 +254,7 @@ if (is_ios || is_mac) {
visibility = [ "*" ]
allow_poison = [
"audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
- "default_task_queue",
+ "environment_construction",
]
sources = [
"objc/components/renderer/opengl/RTCDisplayLinkTimer.h",
@@ -482,7 +482,7 @@ if (is_ios || is_mac) {
rtc_library("audio_device_objc") {
visibility = [ "*" ]
- allow_poison = [ "default_task_queue" ]
+ allow_poison = [ "environment_construction" ]
sources = [
"objc/native/src/objc_audio_device.h",
"objc/native/src/objc_audio_device.mm",
@@ -515,7 +515,7 @@ if (is_ios || is_mac) {
rtc_library("objc_audio_device_module") {
visibility = [ "*" ]
- allow_poison = [ "default_task_queue" ]
+ allow_poison = [ "environment_construction" ]
sources = [
"objc/native/api/objc_audio_device_module.h",
"objc/native/api/objc_audio_device_module.mm",
@@ -601,7 +601,7 @@ if (is_ios || is_mac) {
visibility = [ "*" ]
allow_poison = [
"audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
- "default_task_queue",
+ "environment_construction",
]
sources = [
"objc/components/renderer/metal/RTCMTLI420Renderer.h",
@@ -925,7 +925,7 @@ if (is_ios || is_mac) {
visibility = [ "*" ]
allow_poison = [
"audio_codecs", # TODO(bugs.webrtc.org/8396): Remove.
- "default_task_queue",
+ "environment_construction",
]
configs += [ "..:no_global_constructors" ]
sources = [
@@ -1056,6 +1056,7 @@ if (is_ios || is_mac) {
":videosource_objc",
":videotoolbox_objc",
"../api:dtmf_sender_interface",
+ "../api:enable_media",
"../api:libjingle_peerconnection_api",
"../api:media_stream_interface",
"../api:rtc_event_log_output_file",
@@ -1076,7 +1077,6 @@ if (is_ios || is_mac) {
"../api/video_codecs:video_codecs_api",
"../common_video",
"../media:media_constants",
- "../media:rtc_audio_video",
"../media:rtc_media_base",
"../modules/audio_device:audio_device_api",
"../modules/audio_processing",
diff --git a/third_party/libwebrtc/sdk/android/api/org/webrtc/EglRenderer.java b/third_party/libwebrtc/sdk/android/api/org/webrtc/EglRenderer.java
index 921abe66e4..0a0479b311 100644
--- a/third_party/libwebrtc/sdk/android/api/org/webrtc/EglRenderer.java
+++ b/third_party/libwebrtc/sdk/android/api/org/webrtc/EglRenderer.java
@@ -332,7 +332,6 @@ public class EglRenderer implements VideoSink {
* Set if the video stream should be mirrored horizontally or not.
*/
public void setMirror(final boolean mirror) {
- logD("setMirrorHorizontally: " + mirror);
synchronized (layoutLock) {
this.mirrorHorizontally = mirror;
}
@@ -342,7 +341,6 @@ public class EglRenderer implements VideoSink {
* Set if the video stream should be mirrored vertically or not.
*/
public void setMirrorVertically(final boolean mirrorVertically) {
- logD("setMirrorVertically: " + mirrorVertically);
synchronized (layoutLock) {
this.mirrorVertically = mirrorVertically;
}
@@ -353,7 +351,6 @@ public class EglRenderer implements VideoSink {
* Set this to 0 to disable cropping.
*/
public void setLayoutAspectRatio(float layoutAspectRatio) {
- logD("setLayoutAspectRatio: " + layoutAspectRatio);
synchronized (layoutLock) {
this.layoutAspectRatio = layoutAspectRatio;
}
@@ -366,7 +363,6 @@ public class EglRenderer implements VideoSink {
* reduction.
*/
public void setFpsReduction(float fps) {
- logD("setFpsReduction: " + fps);
synchronized (fpsReductionLock) {
final long previousRenderPeriodNs = minRenderPeriodNs;
if (fps <= 0) {
diff --git a/third_party/libwebrtc/sdk/android/api/org/webrtc/RenderSynchronizer.java b/third_party/libwebrtc/sdk/android/api/org/webrtc/RenderSynchronizer.java
index b1ade84298..c89f798c9c 100644
--- a/third_party/libwebrtc/sdk/android/api/org/webrtc/RenderSynchronizer.java
+++ b/third_party/libwebrtc/sdk/android/api/org/webrtc/RenderSynchronizer.java
@@ -10,8 +10,11 @@
package org.webrtc;
+import android.os.Build.VERSION;
+import android.os.Build.VERSION_CODES;
import android.os.Handler;
import android.os.Looper;
+import android.os.Trace;
import android.view.Choreographer;
import androidx.annotation.GuardedBy;
import java.util.List;
@@ -100,8 +103,15 @@ public final class RenderSynchronizer {
}
}
+ private void traceRenderWindowChange() {
+ if (VERSION.SDK_INT >= VERSION_CODES.Q) {
+ Trace.setCounter("RenderWindow", renderWindowOpen ? 1 : 0);
+ }
+ }
+
private void openRenderWindow() {
renderWindowOpen = true;
+ traceRenderWindowChange();
for (Listener listener : listeners) {
listener.onRenderWindowOpen();
}
@@ -109,6 +119,7 @@ public final class RenderSynchronizer {
private void closeRenderWindow() {
renderWindowOpen = false;
+ traceRenderWindowChange();
for (Listener listener : listeners) {
listener.onRenderWindowClose();
}
diff --git a/third_party/libwebrtc/sdk/android/src/java/org/webrtc/HardwareVideoEncoder.java b/third_party/libwebrtc/sdk/android/src/java/org/webrtc/HardwareVideoEncoder.java
index 94dfdf0728..4512d9a049 100644
--- a/third_party/libwebrtc/sdk/android/src/java/org/webrtc/HardwareVideoEncoder.java
+++ b/third_party/libwebrtc/sdk/android/src/java/org/webrtc/HardwareVideoEncoder.java
@@ -292,7 +292,7 @@ class HardwareVideoEncoder implements VideoEncoder {
updateInputFormat(codec.getInputFormat());
codec.start();
- } catch (IllegalStateException e) {
+ } catch (IllegalArgumentException | IllegalStateException e) {
Logging.e(TAG, "initEncodeInternal failed", e);
release();
return VideoCodecStatus.FALLBACK_SOFTWARE;
diff --git a/third_party/libwebrtc/sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm b/third_party/libwebrtc/sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm
index 62b55543d4..15f9eb9ee4 100644
--- a/third_party/libwebrtc/sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm
+++ b/third_party/libwebrtc/sdk/objc/api/peerconnection/RTCPeerConnectionFactory.mm
@@ -32,12 +32,12 @@
#include "api/audio_codecs/builtin_audio_decoder_factory.h"
#include "api/audio_codecs/builtin_audio_encoder_factory.h"
+#include "api/enable_media.h"
#include "api/rtc_event_log/rtc_event_log_factory.h"
#include "api/task_queue/default_task_queue_factory.h"
#include "api/transport/field_trial_based_config.h"
#import "components/video_codec/RTCVideoDecoderFactoryH264.h"
#import "components/video_codec/RTCVideoEncoderFactoryH264.h"
-#include "media/engine/webrtc_media_engine.h"
#include "modules/audio_device/include/audio_device.h"
#include "modules/audio_processing/include/audio_processing.h"
@@ -195,21 +195,17 @@
dependencies.trials = std::make_unique<webrtc::FieldTrialBasedConfig>();
dependencies.task_queue_factory =
webrtc::CreateDefaultTaskQueueFactory(dependencies.trials.get());
- cricket::MediaEngineDependencies media_deps;
- media_deps.adm = std::move(audioDeviceModule);
- media_deps.task_queue_factory = dependencies.task_queue_factory.get();
- media_deps.audio_encoder_factory = std::move(audioEncoderFactory);
- media_deps.audio_decoder_factory = std::move(audioDecoderFactory);
- media_deps.video_encoder_factory = std::move(videoEncoderFactory);
- media_deps.video_decoder_factory = std::move(videoDecoderFactory);
+ dependencies.adm = std::move(audioDeviceModule);
+ dependencies.audio_encoder_factory = std::move(audioEncoderFactory);
+ dependencies.audio_decoder_factory = std::move(audioDecoderFactory);
+ dependencies.video_encoder_factory = std::move(videoEncoderFactory);
+ dependencies.video_decoder_factory = std::move(videoDecoderFactory);
if (audioProcessingModule) {
- media_deps.audio_processing = std::move(audioProcessingModule);
+ dependencies.audio_processing = std::move(audioProcessingModule);
} else {
- media_deps.audio_processing = webrtc::AudioProcessingBuilder().Create();
+ dependencies.audio_processing = webrtc::AudioProcessingBuilder().Create();
}
- media_deps.trials = dependencies.trials.get();
- dependencies.media_engine = cricket::CreateMediaEngine(std::move(media_deps));
- dependencies.call_factory = webrtc::CreateCallFactory();
+ webrtc::EnableMedia(dependencies);
dependencies.event_log_factory =
std::make_unique<webrtc::RtcEventLogFactory>(dependencies.task_queue_factory.get());
dependencies.network_controller_factory = std::move(networkControllerFactory);
diff --git a/third_party/libwebrtc/sdk/objc/components/audio/RTCAudioSession.mm b/third_party/libwebrtc/sdk/objc/components/audio/RTCAudioSession.mm
index f6b91d5409..641d2ed8c7 100644
--- a/third_party/libwebrtc/sdk/objc/components/audio/RTCAudioSession.mm
+++ b/third_party/libwebrtc/sdk/objc/components/audio/RTCAudioSession.mm
@@ -399,8 +399,10 @@ ABSL_CONST_INIT thread_local bool mutex_locked = false;
// Set isActive and decrement activation count on deactivation
// whether or not it succeeded.
if (!active) {
- self.isActive = active;
- [self notifyDidSetActive:active];
+ if (shouldSetActive) {
+ self.isActive = active;
+ [self notifyDidSetActive:active];
+ }
[self decrementActivationCount];
}
RTCLog(@"Number of current activations: %d", _activationCount.load());