forked from shiguredo-webrtc-build/webrtc-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'm132.6834.5.8' into feature/m132.6834
- Loading branch information
Showing
12 changed files
with
738 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
WEBRTC_BUILD_VERSION=131.6778.4.0 | ||
WEBRTC_VERSION=131.6778.4 | ||
WEBRTC_READABLE_VERSION=M131.6778@{#4} | ||
WEBRTC_COMMIT=79aff54b0fa9238ce3518dd9eaf9610cd6f22e82 | ||
WEBRTC_BUILD_VERSION=132.6834.5.8 | ||
WEBRTC_VERSION=132.6834.5 | ||
WEBRTC_READABLE_VERSION=M132.6834@{#5} | ||
WEBRTC_COMMIT=afaf497805cbb502da89991c2dcd783201efdd08 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
diff --git a/sdk/android/api/org/webrtc/RtpParameters.java b/sdk/android/api/org/webrtc/RtpParameters.java | ||
index d6a22662bb..a0bfdc65a5 100644 | ||
--- a/sdk/android/api/org/webrtc/RtpParameters.java | ||
+++ b/sdk/android/api/org/webrtc/RtpParameters.java | ||
@@ -43,6 +43,27 @@ public class RtpParameters { | ||
} | ||
} | ||
|
||
+ public static class ResolutionRestriction { | ||
+ public int maxWidth; | ||
+ public int maxHeight; | ||
+ | ||
+ @CalledByNative("ResolutionRestriction") | ||
+ ResolutionRestriction(int maxWidth, int maxHeight) { | ||
+ this.maxWidth = maxWidth; | ||
+ this.maxHeight = maxHeight; | ||
+ } | ||
+ | ||
+ @CalledByNative("ResolutionRestriction") | ||
+ int getMaxWidth() { | ||
+ return maxWidth; | ||
+ } | ||
+ | ||
+ @CalledByNative("ResolutionRestriction") | ||
+ int getMaxHeight() { | ||
+ return maxHeight; | ||
+ } | ||
+ } | ||
+ | ||
public static class Encoding { | ||
// If non-null, this represents the RID that identifies this encoding layer. | ||
// RIDs are used to identify layers in simulcast. | ||
@@ -76,6 +97,7 @@ public class RtpParameters { | ||
// If non-null, scale the width and height down by this factor for video. If null, | ||
// implementation default scaling factor will be used. | ||
@Nullable public Double scaleResolutionDownBy; | ||
+ @Nullable public ResolutionRestriction scaleResolutionDownTo; | ||
@Nullable public String scalabilityMode; | ||
// SSRC to be used by this encoding. | ||
// Can't be changed between getParameters/setParameters. | ||
@@ -94,7 +116,7 @@ public class RtpParameters { | ||
@CalledByNative("Encoding") | ||
Encoding(String rid, boolean active, double bitratePriority, @Priority int networkPriority, | ||
Integer maxBitrateBps, Integer minBitrateBps, Integer maxFramerate, | ||
- Integer numTemporalLayers, Double scaleResolutionDownBy, String scalabilityMode, Long ssrc, | ||
+ Integer numTemporalLayers, Double scaleResolutionDownBy, ResolutionRestriction scaleResolutionDownTo, String scalabilityMode, Long ssrc, | ||
boolean adaptiveAudioPacketTime) { | ||
this.rid = rid; | ||
this.active = active; | ||
@@ -105,6 +127,7 @@ public class RtpParameters { | ||
this.maxFramerate = maxFramerate; | ||
this.numTemporalLayers = numTemporalLayers; | ||
this.scaleResolutionDownBy = scaleResolutionDownBy; | ||
+ this.scaleResolutionDownTo = scaleResolutionDownTo; | ||
this.scalabilityMode = scalabilityMode; | ||
this.ssrc = ssrc; | ||
this.adaptiveAudioPacketTime = adaptiveAudioPacketTime; | ||
@@ -168,6 +191,12 @@ public class RtpParameters { | ||
return scaleResolutionDownBy; | ||
} | ||
|
||
+ @Nullable | ||
+ @CalledByNative("Encoding") | ||
+ ResolutionRestriction getScaleResolutionDownTo() { | ||
+ return scaleResolutionDownTo; | ||
+ } | ||
+ | ||
@CalledByNative("Encoding") | ||
Long getSsrc() { | ||
return ssrc; | ||
diff --git a/sdk/android/src/jni/pc/rtp_parameters.cc b/sdk/android/src/jni/pc/rtp_parameters.cc | ||
index dfc7f17f6d..a7858b0dcf 100644 | ||
--- a/sdk/android/src/jni/pc/rtp_parameters.cc | ||
+++ b/sdk/android/src/jni/pc/rtp_parameters.cc | ||
@@ -42,6 +42,24 @@ webrtc::DegradationPreference JavaToNativeDegradationPreference( | ||
return webrtc::DegradationPreference::DISABLED; | ||
} | ||
|
||
+ScopedJavaLocalRef<jobject> NativeToJavaResolutionRestriction( | ||
+ JNIEnv* env, | ||
+ const webrtc::Resolution& resolution) { | ||
+ return Java_ResolutionRestriction_Constructor( | ||
+ env, resolution.width, resolution.height); | ||
+} | ||
+ | ||
+webrtc::Resolution JavaToNativeResolutionRestriction( | ||
+ JNIEnv* jni, | ||
+ const JavaRef<jobject>& j_resolution) { | ||
+ jint width = Java_ResolutionRestriction_getMaxWidth(jni, j_resolution); | ||
+ jint height = Java_ResolutionRestriction_getMaxHeight(jni, j_resolution); | ||
+ webrtc::Resolution resolution; | ||
+ resolution.width = width; | ||
+ resolution.height = height; | ||
+ return resolution; | ||
+} | ||
+ | ||
ScopedJavaLocalRef<jobject> NativeToJavaRtpEncodingParameter( | ||
JNIEnv* env, | ||
const RtpEncodingParameters& encoding) { | ||
@@ -53,6 +71,7 @@ ScopedJavaLocalRef<jobject> NativeToJavaRtpEncodingParameter( | ||
NativeToJavaInteger(env, encoding.max_framerate), | ||
NativeToJavaInteger(env, encoding.num_temporal_layers), | ||
NativeToJavaDouble(env, encoding.scale_resolution_down_by), | ||
+ encoding.scale_resolution_down_to ? NativeToJavaResolutionRestriction(env, *encoding.scale_resolution_down_to) : nullptr, | ||
NativeToJavaString(env, encoding.scalability_mode), | ||
encoding.ssrc ? NativeToJavaLong(env, *encoding.ssrc) : nullptr, | ||
encoding.adaptive_ptime); | ||
@@ -117,6 +136,11 @@ RtpEncodingParameters JavaToNativeRtpEncodingParameters( | ||
Java_Encoding_getScaleResolutionDownBy(jni, j_encoding_parameters); | ||
encoding.scale_resolution_down_by = | ||
JavaToNativeOptionalDouble(jni, j_scale_resolution_down_by); | ||
+ ScopedJavaLocalRef<jobject> j_scale_resolution_down_to = | ||
+ Java_Encoding_getScaleResolutionDownTo(jni, j_encoding_parameters); | ||
+ if (!IsNull(jni, j_scale_resolution_down_to)) { | ||
+ encoding.scale_resolution_down_to = JavaToNativeResolutionRestriction(jni, j_scale_resolution_down_to); | ||
+ } | ||
ScopedJavaLocalRef<jstring> j_scalability_mode = | ||
Java_Encoding_getScalabilityMode(jni, j_encoding_parameters); | ||
if (!IsNull(jni, j_scalability_mode)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.