¡@

Home 

2014/10/16 ¤W¤È 08:15:58

android Programming Glossary: inputbuffers

Encoding H.264 from camera with Android MediaCodec

http://stackoverflow.com/questions/13458289/encoding-h-264-from-camera-with-android-mediacodec

class public void offerEncoder byte input try ByteBuffer inputBuffers mediaCodec.getInputBuffers ByteBuffer outputBuffers mediaCodec.getOutputBuffers.. 1 if inputBufferIndex 0 ByteBuffer inputBuffer inputBuffers inputBufferIndex inputBuffer.clear inputBuffer.put input mediaCodec.queueInputBuffer..

Using MediaCodec to save series of images as Video

http://stackoverflow.com/questions/18795353/using-mediacodec-to-save-series-of-images-as-video

MediaCodec.CONFIGURE_FLAG_ENCODE codec.start ByteBuffer inputBuffers codec.getInputBuffers ByteBuffer outputBuffers codec.getOutputBuffers.. 0 if sawInputEOS int samplesiz dat.length inputBuffers inputBufferIndex .put dat codec.queueInputBuffer inputBufferIndex.. codec.releaseOutputBuffer outputBufferIndex false inputBuffers inputBufferIndex .clear outputBuffers outputBufferIndex .clear..

Encoding H.264 from camera with Android MediaCodec

http://stackoverflow.com/questions/13458289/encoding-h-264-from-camera-with-android-mediacodec

called from Camera.setPreviewCallbackWithBuffer ... in other class public void offerEncoder byte input try ByteBuffer inputBuffers mediaCodec.getInputBuffers ByteBuffer outputBuffers mediaCodec.getOutputBuffers int inputBufferIndex mediaCodec.dequeueInputBuffer.. int inputBufferIndex mediaCodec.dequeueInputBuffer 1 if inputBufferIndex 0 ByteBuffer inputBuffer inputBuffers inputBufferIndex inputBuffer.clear inputBuffer.put input mediaCodec.queueInputBuffer inputBufferIndex 0 input.length 0..

Using MediaCodec to save series of images as Video

http://stackoverflow.com/questions/18795353/using-mediacodec-to-save-series-of-images-as-video

5 codec.configure mediaFormat null null MediaCodec.CONFIGURE_FLAG_ENCODE codec.start ByteBuffer inputBuffers codec.getInputBuffers ByteBuffer outputBuffers codec.getOutputBuffers boolean sawInputEOS false int inputBufferIndex 1 outputBufferIndex.. WAITTIME if bytesread 0 sawInputEOS true if inputBufferIndex 0 if sawInputEOS int samplesiz dat.length inputBuffers inputBufferIndex .put dat codec.queueInputBuffer inputBufferIndex 0 samplesiz presentationTime 0 presentationTime 100.. dos.write array catch IOException e e.printStackTrace codec.releaseOutputBuffer outputBufferIndex false inputBuffers inputBufferIndex .clear outputBuffers outputBufferIndex .clear if sawInputEOS break else codec.queueInputBuffer inputBufferIndex..