summaryrefslogtreecommitdiffstats
path: root/third_party/libwebrtc/sdk/android
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/libwebrtc/sdk/android')
-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
3 files changed, 12 insertions, 5 deletions
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;