Skip to content
Snippets Groups Projects
Commit 5f45cd12 authored by Alexander Lussier-Cullen's avatar Alexander Lussier-Cullen Committed by Adrien Béraud
Browse files

CameraService: cleanup codec parameters

Change-Id: Ib21d2b99acb1712cc34d303ab503c5f68cadc65a
parent 01b7dd32
No related branches found
No related tags found
No related merge requests found
...@@ -387,17 +387,10 @@ class CameraService internal constructor(c: Context) { ...@@ -387,17 +387,10 @@ class CameraService internal constructor(c: Context) {
setInteger(MediaFormat.KEY_REPEAT_PREVIOUS_FRAME_AFTER, 1000000 / frameRate) setInteger(MediaFormat.KEY_REPEAT_PREVIOUS_FRAME_AFTER, 1000000 / frameRate)
setInteger(MediaFormat.KEY_CHANNEL_COUNT, 1) setInteger(MediaFormat.KEY_CHANNEL_COUNT, 1)
setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 5) setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 5)
setInteger(MediaFormat.KEY_FRAME_RATE, 24) //setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, -1)
//setInteger(MediaFormat.KEY_INTRA_REFRESH_PERIOD, 5)
} }
/*if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, -1);
format.setInteger(MediaFormat.KEY_INTRA_REFRESH_PERIOD, 5);
} else {
format.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 5);
}*/
//format.setInteger(MediaFormat.KEY_BITRATE_MODE, MediaCodecInfo.CodecCapabilities.BITRATE_MODE_VBR);
val codecs = MediaCodecList(MediaCodecList.REGULAR_CODECS) val codecs = MediaCodecList(MediaCodecList.REGULAR_CODECS)
//listSupportedCodecs(codecs);
val codecName = codecs.findEncoderForFormat(format) ?: return Pair(null, null) val codecName = codecs.findEncoderForFormat(format) ?: return Pair(null, null)
var encoderInput: Surface? = null var encoderInput: Surface? = null
var codec: MediaCodec? = null var codec: MediaCodec? = null
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment