Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
MediaCodec configuration sample
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN
&& MediaCodecFormatSelector.forDevice().isSupported()) {
binder.bind(VideoEncoder.class).to(MediaCodecVideoEncoder.class);
} else {
binder.bind(VideoEncoder.class).to(JpegVideoEncoder.class);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment