Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f0fa588 authored by Lubin Yin's avatar Lubin Yin Committed by Linux Build Service Account
Browse files

MediaRecorder: video: add H265 encoder

Add support to set HEVC video encoder (H265).

Change-Id: Ic514799beeae42aa9a71476e25cfebb3b5867758
parent 4b450ee4
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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;
    }

    /**
+3 −1
Original line number Diff line number Diff line
@@ -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;
    }