public class MediaVideoBufferEncoder extends MediaEncoder implements IVideoEncoder
MediaEncoder.MediaEncoderListener| Modifier and Type | Field and Description |
|---|---|
protected int |
mColorFormat |
protected static int[] |
recognizedFormats
color formats that we can use in this class
|
mIsCapturing, mIsEOS, mListener, mMediaCodec, mMuxerStarted, mRequestStop, MSG_FRAME_AVAILABLE, MSG_STOP_RECORDING, mSync, mTrackIndex, mWeakMuxer, TIMEOUT_USEC| Constructor and Description |
|---|
MediaVideoBufferEncoder(MediaMuxerWrapper muxer,
int width,
int height,
MediaEncoder.MediaEncoderListener listener) |
| Modifier and Type | Method and Description |
|---|---|
void |
encode(java.nio.ByteBuffer buffer) |
protected void |
prepare() |
protected static int |
selectColorFormat(android.media.MediaCodecInfo codecInfo,
java.lang.String mimeType)
select color format available on specific codec and we can use.
|
protected android.media.MediaCodecInfo |
selectVideoCodec(java.lang.String mimeType)
select the first codec that match a specific MIME type
|
drain, encode, encode, frameAvailableSoon, getOutputPath, getPTSUs, release, run, signalEndOfInputStreamclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitframeAvailableSoonprotected int mColorFormat
protected static int[] recognizedFormats
public MediaVideoBufferEncoder(MediaMuxerWrapper muxer, int width, int height, MediaEncoder.MediaEncoderListener listener)
public void encode(java.nio.ByteBuffer buffer)
protected void prepare()
throws java.io.IOException
java.io.IOExceptionprotected final android.media.MediaCodecInfo selectVideoCodec(java.lang.String mimeType)
mimeType - protected static final int selectColorFormat(android.media.MediaCodecInfo codecInfo,
java.lang.String mimeType)