diff options
author | Lubin Yin <lubiny@codeaurora.org> | 2015-07-29 17:23:20 +0800 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:27:33 -0600 |
commit | 5f0fa58869ffc00e4cc9dc1b2e8d6e82b348e2c2 (patch) | |
tree | 7c858dcd18bac6ebabf0b4921b23e9706121231b | |
parent | 4b450ee47386bd982a96c6bf460d010521cf0cff (diff) | |
download | frameworks_base-5f0fa58869ffc00e4cc9dc1b2e8d6e82b348e2c2.zip frameworks_base-5f0fa58869ffc00e4cc9dc1b2e8d6e82b348e2c2.tar.gz frameworks_base-5f0fa58869ffc00e4cc9dc1b2e8d6e82b348e2c2.tar.bz2 |
MediaRecorder: video: add H265 encoder
Add support to set HEVC video encoder (H265).
Change-Id: Ic514799beeae42aa9a71476e25cfebb3b5867758
-rw-r--r-- | media/java/android/media/MediaRecorder.java | 2 | ||||
-rw-r--r-- | media/jni/android_media_MediaRecorder.cpp | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java index 6dae6cc..a5aeec6 100644 --- a/media/java/android/media/MediaRecorder.java +++ b/media/java/android/media/MediaRecorder.java @@ -398,6 +398,8 @@ public class MediaRecorder public static final int H264 = 2; public static final int MPEG_4_SP = 3; public static final int VP8 = 4; + /** @hide **/ + public static final int H265 = 1001; } /** diff --git a/media/jni/android_media_MediaRecorder.cpp b/media/jni/android_media_MediaRecorder.cpp index f60af63..9e52111 100644 --- a/media/jni/android_media_MediaRecorder.cpp +++ b/media/jni/android_media_MediaRecorder.cpp @@ -219,7 +219,9 @@ static void android_media_MediaRecorder_setVideoEncoder(JNIEnv *env, jobject thiz, jint ve) { ALOGV("setVideoEncoder(%d)", ve); - if (ve < VIDEO_ENCODER_DEFAULT || ve >= VIDEO_ENCODER_LIST_END) { + if (ve < VIDEO_ENCODER_DEFAULT || + (ve >= VIDEO_ENCODER_LIST_END && ve <= VIDEO_ENCODER_LIST_VENDOR_START) || + ve >= VIDEO_ENCODER_LIST_VENDOR_END) { jniThrowException(env, "java/lang/IllegalArgumentException", "Invalid video encoder"); return; } |