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

Unified Diff: webrtc/api/android/java/src/org/webrtc/VideoSource.java

Issue 2350933006: Android VideoSource: Add adaptOutputFormat function (Closed)
Patch Set: Change deprecated annotation Created 4 years, 3 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/api/android/java/src/org/webrtc/VideoSource.java
diff --git a/webrtc/api/android/java/src/org/webrtc/VideoSource.java b/webrtc/api/android/java/src/org/webrtc/VideoSource.java
index f664f19d2c6842ffc313c729dab05b6d4dc8eda0..f07f3060171896d3c65ab6d913a9ca424c5a6da8 100644
--- a/webrtc/api/android/java/src/org/webrtc/VideoSource.java
+++ b/webrtc/api/android/java/src/org/webrtc/VideoSource.java
@@ -22,4 +22,15 @@ public class VideoSource extends MediaSource {
public VideoSource(long nativeSource) {
super(nativeSource);
}
+
+ // Calling this function will cause frames to be scaled down to the requested resolution. Also,
sakal 2016/09/20 11:55:03 nit: Can you use the javadoc comment syntax? It is
magjed_webrtc 2016/09/20 12:27:40 Done.
+ // frames will be cropped to match the requested aspect ratio, and frames will be dropped to match
+ // the requested fps. The requested aspect ratio is orientation agnostic and will be adjusted to
+ // maintain the input orientation, so it doesn't matter if e.g. 1280x720 or 720x1280 is requested.
+ public void adaptOutputFormat(int width, int height, int fps) {
+ nativeAdaptOutputFormat(nativeSource, width, height, fps);
+ }
+
+ private static native void nativeAdaptOutputFormat(
+ long nativeSource, int width, int height, int fps);
}

Powered by Google App Engine
This is Rietveld 408576698