RootEncoder
RootEncoder copied to clipboard
Hardware and Software acceleration
Does this library support hardware acceleration? If it does, how to enable software acceleration in which devices don't support hardware acceleration?
Hello,
The library support software and hardware acceleration. This depend of the Codec selected by MediaCodec class. You can force one type of codec with this method:
// by default use CodecUtil.CodecType.FIRST_COMPATIBLE_FOUND
genericStream.forceCodecType(codecTypeVideo = CodecUtil.CodecType.HARDWARE, codecTypeAudio = CodecUtil.CodecType.HARDWARE)
genericStream.forceCodecType(codecTypeVideo = CodecUtil.CodecType.SOFTWARE, codecTypeAudio = CodecUtil.CodecType.SOFTWARE)
If your device can't find a codec compatible with the type required the prepareVideo or prepareAudio methods will return false.