prepareVideo

fun prepareVideo(width: Int, height: Int, bitrate: Int, fps: Int = 30, iFrameInterval: Int = 2, rotation: Int = 0, profile: Int = -1, level: Int = -1): Boolean

Necessary only one time before start preview, stream or record. If you want change values stop preview, stream and record is necessary.

Return

True if success, False if failed

Parameters

profile

codec value from MediaCodecInfo.CodecProfileLevel class

level

codec value from MediaCodecInfo.CodecProfileLevel class

Throws

if current video parameters are not supported by the VideoSource