Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hardware and Software acceleration #1680

Open
RedwanSharafatKabir opened this issue Dec 14, 2024 · 1 comment
Open

Hardware and Software acceleration #1680

RedwanSharafatKabir opened this issue Dec 14, 2024 · 1 comment

Comments

@RedwanSharafatKabir
Copy link

Does this library support hardware acceleration? If it does, how to enable software acceleration in which devices don't support hardware acceleration?

@pedroSG94
Copy link
Owner

pedroSG94 commented Dec 16, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants