public class MediaVideoEncoder extends MediaEncoder implements IVideoEncoder
MediaEncoder.MediaEncoderListener| Modifier and Type | Field and Description |
|---|---|
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 |
|---|
MediaVideoEncoder(MediaMuxerWrapper muxer,
int width,
int height,
MediaEncoder.MediaEncoderListener listener) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
frameAvailableSoon()
This method does not work correctly on this class,
use #frameAvailableSoon(final float[]) instead
|
boolean |
frameAvailableSoon(float[] tex_matrix) |
protected void |
prepare() |
protected void |
release()
Release all releated objects
|
protected static int |
selectColorFormat(android.media.MediaCodecInfo codecInfo,
java.lang.String mimeType)
select color format available on specific codec and we can use.
|
protected static android.media.MediaCodecInfo |
selectVideoCodec(java.lang.String mimeType)
select the first codec that match a specific MIME type
|
void |
setEglContext(EGLBase.IContext sharedContext,
int tex_id) |
drain, encode, encode, getOutputPath, getPTSUs, run, signalEndOfInputStreamprotected static int[] recognizedFormats
public MediaVideoEncoder(MediaMuxerWrapper muxer, int width, int height, MediaEncoder.MediaEncoderListener listener)
public boolean frameAvailableSoon(float[] tex_matrix)
public boolean frameAvailableSoon()
frameAvailableSoon in interface IVideoEncoderframeAvailableSoon in class MediaEncoderprotected void prepare()
throws java.io.IOException
java.io.IOExceptionpublic void setEglContext(EGLBase.IContext sharedContext,
int tex_id)
protected void release()
MediaEncoderrelease in class MediaEncoderprotected static final android.media.MediaCodecInfo selectVideoCodec(java.lang.String mimeType)
mimeType - protected static final int selectColorFormat(android.media.MediaCodecInfo codecInfo,
java.lang.String mimeType)