Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(328)

Unified Diff: webrtc/sdk/android/api/org/webrtc/VideoEncoder.java

Issue 3003873002: Bindings for injectable Java video encoders. (Closed)
Patch Set: Fix tests Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/sdk/android/api/org/webrtc/VideoEncoder.java
diff --git a/webrtc/sdk/android/api/org/webrtc/VideoEncoder.java b/webrtc/sdk/android/api/org/webrtc/VideoEncoder.java
index 08671816d2b8508b6a1861cdfb77efb71deeca0e..1fb96011d0ae08daedb027f0cb5490adeba3b7e5 100644
--- a/webrtc/sdk/android/api/org/webrtc/VideoEncoder.java
+++ b/webrtc/sdk/android/api/org/webrtc/VideoEncoder.java
@@ -22,13 +22,16 @@ public interface VideoEncoder {
public final int height;
public final int startBitrate; // Kilobits per second.
public final int maxFramerate;
+ public final boolean automaticResizeOn;
- public Settings(int numberOfCores, int width, int height, int startBitrate, int maxFramerate) {
+ public Settings(int numberOfCores, int width, int height, int startBitrate, int maxFramerate,
+ boolean automaticResizeOn) {
this.numberOfCores = numberOfCores;
this.width = width;
this.height = height;
this.startBitrate = startBitrate;
this.maxFramerate = maxFramerate;
+ this.automaticResizeOn = automaticResizeOn;
}
}
@@ -84,11 +87,22 @@ public interface VideoEncoder {
/** Settings for WebRTC quality based scaling. */
public class ScalingSettings {
public final boolean on;
- public final int low;
- public final int high;
+ public final Integer low;
+ public final Integer high;
/**
- * Creates quality based scaling settings.
+ * Creates quality based scaling setting.
+ *
+ * @param on True if quality scaling is turned on.
+ */
+ public ScalingSettings(boolean on) {
+ this.on = on;
+ this.low = null;
+ this.high = null;
+ }
+
+ /**
+ * Creates quality based scaling settings with custom thresholds.
*
* @param on True if quality scaling is turned on.
* @param low Average QP at which to scale up the resolution.
@@ -129,6 +143,6 @@ public interface VideoEncoder {
VideoCodecStatus setRateAllocation(BitrateAllocation allocation, int framerate);
/** Any encoder that wants to use WebRTC provided quality scaler must implement this method. */
ScalingSettings getScalingSettings();
- /** Should return a descriptive name for the implementation. */
+ /** Should return a descriptive name for the implementation. Gets called once and cached. */
String getImplementationName();
}
« no previous file with comments | « webrtc/sdk/android/api/org/webrtc/EncodedImage.java ('k') | webrtc/sdk/android/api/org/webrtc/VideoEncoderFactory.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698