Skip to content

Instantly share code, notes, and snippets.

@a-chernykh
Created June 28, 2014 10:03
Show Gist options
  • Save a-chernykh/8891c03143294c8fa690 to your computer and use it in GitHub Desktop.
Save a-chernykh/8891c03143294c8fa690 to your computer and use it in GitHub Desktop.
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