public class MediaVideoEncoder extends MediaEncoder
| Modifier and Type | Field and Description |
|---|---|
protected static int[] |
recognizedFormats
color formats that we can use in this class
|
mIsAudio, mIsCapturing, mIsEOS, mIsPrepared, mMediaCodec, mMuxerStarted, mRequestStop, mSync, mTrackIndex, mWeakMuxerTIMEOUT_USEC| Constructor and Description |
|---|
MediaVideoEncoder(int width,
int height,
MediaMovieRecorder muxer,
IMediaCodecCallback listener) |
MediaVideoEncoder(MediaMovieRecorder muxer,
IMediaCodecCallback listener) |
| Modifier and Type | Method and Description |
|---|---|
int |
getHeight() |
android.view.Surface |
getInputSurface() |
int |
getWidth() |
void |
prepare() |
void |
release()
Release all related 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 |
setVideoSize(int width,
int height) |
callErrorHandler, callOnPrepared, callOnRelease, callOnStart, callOnStop, drain, encode, frameAvailableSoon, getPTSUs, isAudio, isPrepared, isRunning, signalEndOfInputStream, start, stopprotected static int[] recognizedFormats
public MediaVideoEncoder(MediaMovieRecorder muxer, IMediaCodecCallback listener)
public MediaVideoEncoder(int width,
int height,
MediaMovieRecorder muxer,
IMediaCodecCallback listener)
public void prepare()
throws java.io.IOException
java.io.IOExceptionpublic void release()
MediaEncoderrelease in interface IMediaCodecrelease in class MediaEncoderpublic void setVideoSize(int width,
int height)
throws java.lang.IllegalArgumentException,
java.lang.IllegalStateException
java.lang.IllegalArgumentExceptionjava.lang.IllegalStateExceptionpublic android.view.Surface getInputSurface()
throws java.lang.IllegalStateException
java.lang.IllegalStateExceptionpublic int getWidth()
public int getHeight()
protected static final android.media.MediaCodecInfo selectVideoCodec(java.lang.String mimeType)
mimeType - protected static final int selectColorFormat(android.media.MediaCodecInfo codecInfo,
java.lang.String mimeType)