summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorLajos Molnar <lajos@google.com>2015-04-23 13:35:43 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-04-23 13:35:44 +0000
commitc3e41da5456d4aeab78d6c5280945b13f5b93d4e (patch)
treed8179415930ae458f2928c4e25d9835ad2355047 /media
parent8bd73751158969f98fe3e3b77d5c1c31cba6c1f5 (diff)
parent38a296a65f89b0b16a717fe29f583db21e5c46df (diff)
downloadframeworks_base-c3e41da5456d4aeab78d6c5280945b13f5b93d4e.zip
frameworks_base-c3e41da5456d4aeab78d6c5280945b13f5b93d4e.tar.gz
frameworks_base-c3e41da5456d4aeab78d6c5280945b13f5b93d4e.tar.bz2
Merge "media: VideoCapabilities: publish codec performance data"
Diffstat (limited to 'media')
-rw-r--r--media/java/android/media/MediaCodecInfo.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/media/java/android/media/MediaCodecInfo.java b/media/java/android/media/MediaCodecInfo.java
index b497001..ff1b57d 100644
--- a/media/java/android/media/MediaCodecInfo.java
+++ b/media/java/android/media/MediaCodecInfo.java
@@ -1136,6 +1136,27 @@ public final class MediaCodecInfo {
}
/**
+ * Returns the range of achievable video frame rates for a video size.
+ * May return {@code null}, if the codec did not publish any measurement
+ * data.
+ * <p>
+ * This is a performance estimate, based on full-speed decoding
+ * and encoding measurements of common video sizes supported by the codec.
+ *
+ * @param width the width of the video
+ * @param height the height of the video
+ *
+ * @throws IllegalArgumentException if the video size is not supported.
+ */
+ public Range<Double> getAchievableFrameRatesFor(int width, int height) {
+ if (!supports(width, height, null)) {
+ throw new IllegalArgumentException("unsupported size");
+ }
+ // TODO: get this data from the codec
+ return null;
+ }
+
+ /**
* Returns whether a given video size ({@code width} and
* {@code height}) and {@code frameRate} combination is supported.
*/