public class MediaSurfaceEncoder 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 |
|---|
MediaSurfaceEncoder(MediaMuxerWrapper muxer,
int width,
int height,
MediaEncoder.MediaEncoderListener listener) |
| Modifier and Type | Method and Description |
|---|---|
android.view.Surface |
getInputSurface()
Returns the encoder's input surface.
|
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
|
drain, encode, encode, frameAvailableSoon, getOutputPath, getPTSUs, run, signalEndOfInputStreamclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitframeAvailableSoonprotected static int[] recognizedFormats
public MediaSurfaceEncoder(MediaMuxerWrapper muxer, int width, int height, MediaEncoder.MediaEncoderListener listener)
public android.view.Surface getInputSurface()
protected void prepare()
throws java.io.IOException
java.io.IOExceptionprotected 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)