List of usage examples for android.media MediaCodec getInputBuffer
@Nullable public ByteBuffer getInputBuffer(int index)
From source file:Main.java
public static ByteBuffer getInputBuffer(MediaCodec codec, int index) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { return codec.getInputBuffer(index); } else {/*from w ww .jav a 2 s. c om*/ return codec.getInputBuffers()[index]; } }