diff options
-rw-r--r-- | src/com/android/camera/CameraSettings.java | 8 | ||||
-rw-r--r-- | src/com/android/camera/VideoModule.java | 8 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java index da203d52c..6c4247dd8 100644 --- a/src/com/android/camera/CameraSettings.java +++ b/src/com/android/camera/CameraSettings.java @@ -278,7 +278,13 @@ public class CameraSettings { //video encoders VIDEO_ENCODER_TABLE.put(MediaRecorder.VideoEncoder.H263, "h263"); VIDEO_ENCODER_TABLE.put(MediaRecorder.VideoEncoder.H264, "h264"); - // VIDEO_ENCODER_TABLE.put(MediaRecorder.VideoEncoder.H265, "h265"); + int h265 = ApiHelper.getIntFieldIfExists(MediaRecorder.VideoEncoder.class, + "HEVC", null, MediaRecorder.VideoEncoder.DEFAULT); + if (h265 == MediaRecorder.VideoEncoder.DEFAULT) { + h265 = ApiHelper.getIntFieldIfExists(MediaRecorder.VideoEncoder.class, + "H265", null, MediaRecorder.VideoEncoder.DEFAULT); + } + VIDEO_ENCODER_TABLE.put(h265, "h265"); VIDEO_ENCODER_TABLE.put(MediaRecorder.VideoEncoder.MPEG_4_SP, "m4v"); //video qualities diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java index 9ad8f0197..96423044f 100644 --- a/src/com/android/camera/VideoModule.java +++ b/src/com/android/camera/VideoModule.java @@ -315,7 +315,13 @@ public class VideoModule implements CameraModule, VIDEO_ENCODER_TABLE.put("h263", MediaRecorder.VideoEncoder.H263); VIDEO_ENCODER_TABLE.put("h264", MediaRecorder.VideoEncoder.H264); - // VIDEO_ENCODER_TABLE.put("h265", MediaRecorder.VideoEncoder.H265); + int h265 = ApiHelper.getIntFieldIfExists(MediaRecorder.VideoEncoder.class, + "HEVC", null, MediaRecorder.VideoEncoder.DEFAULT); + if (h265 == MediaRecorder.VideoEncoder.DEFAULT) { + h265 = ApiHelper.getIntFieldIfExists(MediaRecorder.VideoEncoder.class, + "H265", null, MediaRecorder.VideoEncoder.DEFAULT); + } + VIDEO_ENCODER_TABLE.put("h265", h265); VIDEO_ENCODER_TABLE.put("m4v", MediaRecorder.VideoEncoder.MPEG_4_SP); VIDEO_ENCODER_TABLE.putDefault(MediaRecorder.VideoEncoder.DEFAULT); |