Skip to content

Commit

Permalink
Merge pull request #78 from GetStream/fix/m114-patches1
Browse files Browse the repository at this point in the history
Fix m114 patches + update binary compatibilities
  • Loading branch information
skydoves authored Oct 17, 2023
2 parents e1cd1bc + d6f55b1 commit bc617d8
Show file tree
Hide file tree
Showing 17 changed files with 2,678 additions and 3 deletions.
68 changes: 65 additions & 3 deletions stream-webrtc-android/api/stream-webrtc-android.api
Original file line number Diff line number Diff line change
Expand Up @@ -863,8 +863,8 @@ public class org/webrtc/PeerConnection {
public fun getRemoteDescription ()Lorg/webrtc/SessionDescription;
public fun getSenders ()Ljava/util/List;
public fun getStats (Lorg/webrtc/RTCStatsCollectorCallback;)V
public fun getStats (Lorg/webrtc/RTCStatsCollectorCallback;Lorg/webrtc/RtpReceiver;)V
public fun getStats (Lorg/webrtc/RTCStatsCollectorCallback;Lorg/webrtc/RtpSender;)V
public fun getStats (Lorg/webrtc/RtpReceiver;Lorg/webrtc/RTCStatsCollectorCallback;)V
public fun getStats (Lorg/webrtc/RtpSender;Lorg/webrtc/RTCStatsCollectorCallback;)V
public fun getStats (Lorg/webrtc/StatsObserver;Lorg/webrtc/MediaStreamTrack;)Z
public fun getTransceivers ()Ljava/util/List;
public fun iceConnectionState ()Lorg/webrtc/PeerConnection$IceConnectionState;
Expand Down Expand Up @@ -1041,7 +1041,6 @@ public class org/webrtc/PeerConnection$RTCConfiguration {
public field continualGatheringPolicy Lorg/webrtc/PeerConnection$ContinualGatheringPolicy;
public field cryptoOptions Lorg/webrtc/CryptoOptions;
public field disableIPv6OnWifi Z
public field disableIpv6 Z
public field enableCpuOveruseDetection Z
public field enableDscp Z
public field enableImplicitRollback Z
Expand Down Expand Up @@ -1142,6 +1141,8 @@ public class org/webrtc/PeerConnectionFactory {
public static fun fieldTrialsFindFullName (Ljava/lang/String;)Ljava/lang/String;
public fun getNativeOwnedFactoryAndThreads ()J
public fun getNativePeerConnectionFactory ()J
public fun getRtpReceiverCapabilities (Lorg/webrtc/MediaStreamTrack$MediaType;)Lorg/webrtc/RtpCapabilities;
public fun getRtpSenderCapabilities (Lorg/webrtc/MediaStreamTrack$MediaType;)Lorg/webrtc/RtpCapabilities;
public static fun initialize (Lorg/webrtc/PeerConnectionFactory$InitializationOptions;)V
public static fun initializeFieldTrials (Ljava/lang/String;)V
public fun printInternalStackTraces (Z)V
Expand Down Expand Up @@ -1182,6 +1183,13 @@ public class org/webrtc/PeerConnectionFactory$InitializationOptions$Builder {
}

public class org/webrtc/PeerConnectionFactory$Options {
public static final field ADAPTER_TYPE_ANY I
public static final field ADAPTER_TYPE_CELLULAR I
public static final field ADAPTER_TYPE_ETHERNET I
public static final field ADAPTER_TYPE_LOOPBACK I
public static final field ADAPTER_TYPE_UNKNOWN I
public static final field ADAPTER_TYPE_VPN I
public static final field ADAPTER_TYPE_WIFI I
public field disableEncryption Z
public field disableNetworkMonitor Z
public field networkIgnoreMask I
Expand Down Expand Up @@ -1280,6 +1288,29 @@ public class org/webrtc/RtcCertificatePem {
public static fun generateCertificate (Lorg/webrtc/PeerConnection$KeyType;J)Lorg/webrtc/RtcCertificatePem;
}

public class org/webrtc/RtpCapabilities {
public field codecs Ljava/util/List;
public field headerExtensions Ljava/util/List;
public fun getHeaderExtensions ()Ljava/util/List;
}

public class org/webrtc/RtpCapabilities$CodecCapability {
public field clockRate Ljava/lang/Integer;
public field kind Lorg/webrtc/MediaStreamTrack$MediaType;
public field mimeType Ljava/lang/String;
public field name Ljava/lang/String;
public field numChannels Ljava/lang/Integer;
public field parameters Ljava/util/Map;
public field preferredPayloadType I
public fun <init> ()V
}

public class org/webrtc/RtpCapabilities$HeaderExtensionCapability {
public fun getPreferredEncrypted ()Z
public fun getPreferredId ()I
public fun getUri ()Ljava/lang/String;
}

public class org/webrtc/RtpParameters {
public final field codecs Ljava/util/List;
public field degradationPreference Lorg/webrtc/RtpParameters$DegradationPreference;
Expand Down Expand Up @@ -1316,6 +1347,7 @@ public class org/webrtc/RtpParameters$Encoding {
public field networkPriority I
public field numTemporalLayers Ljava/lang/Integer;
public field rid Ljava/lang/String;
public field scalabilityMode Ljava/lang/String;
public field scaleResolutionDownBy Ljava/lang/Double;
public field ssrc Ljava/lang/Long;
public fun <init> (Ljava/lang/String;ZLjava/lang/Double;)V
Expand Down Expand Up @@ -1370,6 +1402,7 @@ public class org/webrtc/RtpTransceiver {
public fun getReceiver ()Lorg/webrtc/RtpReceiver;
public fun getSender ()Lorg/webrtc/RtpSender;
public fun isStopped ()Z
public fun setCodecPreferences (Ljava/util/List;)V
public fun setDirection (Lorg/webrtc/RtpTransceiver$RtpTransceiverDirection;)Z
public fun stop ()V
public fun stopInternal ()V
Expand Down Expand Up @@ -1625,6 +1658,7 @@ public class org/webrtc/VideoCodecInfo {
public final field name Ljava/lang/String;
public final field params Ljava/util/Map;
public final field payload I
public field scalabilityModes [I
public fun <init> (ILjava/lang/String;Ljava/util/Map;)V
public fun <init> (Ljava/lang/String;Ljava/util/Map;)V
public fun equals (Ljava/lang/Object;)Z
Expand Down Expand Up @@ -1862,6 +1896,17 @@ public final class org/webrtc/VideoFrame$TextureBuffer$Type : java/lang/Enum {
public static fun values ()[Lorg/webrtc/VideoFrame$TextureBuffer$Type;
}

public abstract interface annotation class org/webrtc/VideoFrameBufferType : java/lang/annotation/Annotation {
public static final field I010 I
public static final field I210 I
public static final field I420 I
public static final field I420A I
public static final field I422 I
public static final field I444 I
public static final field NATIVE I
public static final field NV12 I
}

public class org/webrtc/VideoFrameDrawer {
public static final field TAG Ljava/lang/String;
public fun <init> ()V
Expand Down Expand Up @@ -1918,6 +1963,8 @@ public class org/webrtc/VideoTrack : org/webrtc/MediaStreamTrack {
public fun addSink (Lorg/webrtc/VideoSink;)V
public fun dispose ()V
public fun removeSink (Lorg/webrtc/VideoSink;)V
public fun setShouldReceive (Z)V
public fun shouldReceive ()Z
}

public final class org/webrtc/WebRTCException : java/lang/RuntimeException {
Expand Down Expand Up @@ -1946,6 +1993,12 @@ public abstract class org/webrtc/WrappedNativeVideoEncoder : org/webrtc/VideoEnc
public final fun setRateAllocation (Lorg/webrtc/VideoEncoder$BitrateAllocation;I)Lorg/webrtc/VideoCodecStatus;
}

public class org/webrtc/WrappedVideoDecoderFactory : org/webrtc/VideoDecoderFactory {
public fun <init> (Lorg/webrtc/EglBase$Context;)V
public fun createDecoder (Lorg/webrtc/VideoCodecInfo;)Lorg/webrtc/VideoDecoder;
public fun getSupportedCodecs ()[Lorg/webrtc/VideoCodecInfo;
}

public final class org/webrtc/YuvConverter {
public fun <init> ()V
public fun <init> (Lorg/webrtc/VideoFrameDrawer;)V
Expand All @@ -1957,6 +2010,7 @@ public class org/webrtc/YuvHelper {
public fun <init> ()V
public static fun ABGRToI420 (Ljava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;III)V
public static fun I420Copy (Ljava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;II)V
public static fun I420Copy (Ljava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;IIII)V
public static fun I420Copy (Ljava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;IIIIII)V
public static fun I420Copy (Ljava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;III)V
public static fun I420Rotate (Ljava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;III)V
Expand Down Expand Up @@ -2060,6 +2114,14 @@ public abstract interface class org/webrtc/audio/JavaAudioDeviceModule$SamplesRe
public abstract fun onWebRtcAudioRecordSamplesReady (Lorg/webrtc/audio/JavaAudioDeviceModule$AudioSamples;)V
}

public class org/webrtc/audio/LegacyAudioDeviceModule : org/webrtc/audio/AudioDeviceModule {
public fun <init> ()V
public fun getNativeAudioDeviceModulePointer ()J
public fun release ()V
public fun setMicrophoneMute (Z)V
public fun setSpeakerMute (Z)V
}

public final class org/webrtc/voiceengine/BuildInfo {
public fun <init> ()V
public static fun getAndroidBuildId ()Ljava/lang/String;
Expand Down
45 changes: 45 additions & 0 deletions stream-webrtc-android/src/main/java/org/webrtc/ContextUtils.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
* Copyright 2017 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/

package org.webrtc;

import android.content.Context;

/**
* Class for storing the application context and retrieving it in a static context. Similar to
* org.chromium.base.ContextUtils.
*/
public class ContextUtils {
private static final String TAG = "ContextUtils";
private static Context applicationContext;

/**
* Stores the application context that will be returned by getApplicationContext. This is called
* by PeerConnectionFactory.initialize. The application context must be set before creating
* a PeerConnectionFactory and must not be modified while it is alive.
*/
public static void initialize(Context applicationContext) {
if (applicationContext == null) {
throw new IllegalArgumentException(
"Application context cannot be null for ContextUtils.initialize.");
}
ContextUtils.applicationContext = applicationContext;
}

/**
* Returns the stored application context.
*
* @deprecated crbug.com/webrtc/8937
*/
@Deprecated
public static Context getApplicationContext() {
return applicationContext;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.webrtc;

public class LibaomAv1Decoder extends WrappedNativeVideoDecoder {
public LibaomAv1Decoder() {
}

public long createNativeVideoDecoder() {
return nativeCreateDecoder();
}

static native long nativeCreateDecoder();

static native boolean nativeIsSupported();
}
22 changes: 22 additions & 0 deletions stream-webrtc-android/src/main/java/org/webrtc/Loggable.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/

package org.webrtc;

import org.webrtc.Logging.Severity;

/**
* Java interface for WebRTC logging. The default implementation uses webrtc.Logging.
*
* When injected, the Loggable will receive logging from both Java and native.
*/
public interface Loggable {
public void onLogMessage(String message, Severity severity, String tag);
}
Loading

0 comments on commit bc617d8

Please sign in to comment.