diff options
-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; } |