public class MediaCodecAdapter
extends java.lang.Object
Constructor and Description |
---|
MediaCodecAdapter() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
bytes2HexString(byte[] b) |
static void |
configAndStart() |
static int |
dequeueInputBuffer(long timeoutUs) |
static int |
dequeueOutputBuffer(long timeoutUs) |
static int |
getCurrentOutputBufferFlag() |
static int |
getCurrentOutputBufferSize() |
static java.lang.Object |
getInputByteBuffer(int inputBufferIndex) |
static java.lang.Object |
getOutputByteBuffer(int outputBufferIndex) |
static int |
getOutputFormatColorFormat() |
static int |
getOutputFormatHeight() |
static int |
getOutputFormatWidth() |
static java.lang.String |
getSupportedCodecName(java.lang.String mime,
int profile,
int level,
boolean isEncoder) |
static void |
initMediaCodec(java.lang.String mimeType,
java.lang.String codecname,
int videoWidth,
int videoHeight) |
static boolean |
isStreamEOF() |
static void |
queueInputBuffer(int index,
int offset,
int size,
long presentationTimeUs,
int flags) |
static void |
releaseOutputBuffer(int outputBufferIndex,
boolean bRenderer) |
static void |
setConfigSurface(Surface surface) |
static void |
setSpsAndPPs(byte[] sps,
byte[] pps) |
static void |
stopAndReleaseCodec() |
public static void setConfigSurface(Surface surface)
public static java.lang.String bytes2HexString(byte[] b)
public static void initMediaCodec(java.lang.String mimeType, java.lang.String codecname, int videoWidth, int videoHeight)
public static void configAndStart()
public static void setSpsAndPPs(byte[] sps, byte[] pps)
public static int dequeueInputBuffer(long timeoutUs)
public static java.lang.Object getInputByteBuffer(int inputBufferIndex)
inputBufferIndex
- public static void queueInputBuffer(int index, int offset, int size, long presentationTimeUs, int flags)
public static int dequeueOutputBuffer(long timeoutUs)
public static int getOutputFormatWidth()
public static int getOutputFormatHeight()
public static int getOutputFormatColorFormat()
public static int getCurrentOutputBufferSize()
public static int getCurrentOutputBufferFlag()
public static java.lang.Object getOutputByteBuffer(int outputBufferIndex)
outputBufferIndex
- public static void releaseOutputBuffer(int outputBufferIndex, boolean bRenderer)
public static boolean isStreamEOF()
public static void stopAndReleaseCodec()
public static java.lang.String getSupportedCodecName(java.lang.String mime, int profile, int level, boolean isEncoder)