public abstract class HardDecRender
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
HardDecRender.IDecoderDataOutCallBack |
static class |
HardDecRender.MediaCodecErrorType |
static interface |
HardDecRender.OnDecoderYUVListener |
| Modifier and Type | Field and Description |
|---|---|
protected java.lang.String |
mCrashTsFirst |
protected java.lang.String |
mCrashTsSecond |
protected android.media.MediaCodec |
mDecoder |
protected java.lang.String |
mDumpFrameName |
protected byte[] |
mDumpIDRFrame |
protected byte[] |
mDumpSpsPps |
protected android.media.MediaFormat |
mFormat |
protected long |
mGroupId |
protected int |
mHeight |
protected android.media.MediaCodec.BufferInfo |
mInfo |
protected boolean |
mInitialized |
protected java.nio.ByteBuffer[] |
mInputBuffers |
protected int |
mInputIndex |
protected boolean |
mIsExceptionOccured |
protected java.util.concurrent.atomic.AtomicBoolean |
mMediaCodecStopState |
protected boolean |
mNeedConfig |
protected int |
mNoFrameCnt |
protected java.nio.ByteBuffer[] |
mOutputBuffers |
protected java.util.concurrent.atomic.AtomicBoolean |
mSecondTsWriten |
protected long |
mStreamId |
protected int |
mStride |
protected android.view.Surface |
mSurface |
protected int |
mWidth |
| Modifier | Constructor and Description |
|---|---|
protected |
HardDecRender() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
awaitUninterruptibly(java.lang.Thread thread,
java.util.concurrent.CountDownLatch barrier,
long timeoutMs) |
void |
ConfigDone() |
protected void |
dumpIDRFrame(java.lang.String codecType,
byte[] bf,
long outPts) |
void |
EndofStream() |
protected static java.lang.String |
findCodecName(java.lang.String mime,
java.lang.String[] supportedPrefixes,
java.lang.String[] unSupportedPrefixes,
boolean isIgnoreCodecWhiteList) |
boolean |
GetAndClearExceptionFlag() |
long |
getCacheFrame() |
java.util.concurrent.atomic.AtomicBoolean |
getMediaCodecStopState() |
protected static boolean |
IsAvailable(java.lang.String codecName) |
boolean |
IsNeedConfig() |
abstract long |
PushFrame(android.view.Surface surface,
byte[] bf,
long pts,
boolean isHeader) |
protected long |
PushFrame(android.view.Surface surface,
java.lang.String codecName,
java.lang.String codecType,
byte[] bf,
long pts,
boolean isHeader) |
void |
release() |
abstract int |
reset() |
abstract int |
reset(android.view.Surface surface,
int width,
int height) |
protected int |
reset(android.view.Surface surface,
java.lang.String codecName,
java.lang.String codecType,
int width,
int height) |
void |
setDecoderDataOutCallBack(HardDecRender.IDecoderDataOutCallBack decoderDataOutCallBack) |
void |
setGroupId(long groupId) |
void |
setOnDecoderYUVListener(HardDecRender.OnDecoderYUVListener listener) |
void |
setStreamId(long streamId) |
protected android.media.MediaCodec mDecoder
protected android.view.Surface mSurface
protected android.media.MediaFormat mFormat
protected boolean mNeedConfig
protected int mWidth
protected int mHeight
protected int mStride
protected boolean mInitialized
protected java.nio.ByteBuffer[] mInputBuffers
protected java.nio.ByteBuffer[] mOutputBuffers
protected android.media.MediaCodec.BufferInfo mInfo
protected java.util.concurrent.atomic.AtomicBoolean mSecondTsWriten
protected java.lang.String mCrashTsFirst
protected java.lang.String mCrashTsSecond
protected int mNoFrameCnt
protected boolean mIsExceptionOccured
protected long mStreamId
protected long mGroupId
protected java.util.concurrent.atomic.AtomicBoolean mMediaCodecStopState
protected byte[] mDumpSpsPps
protected byte[] mDumpIDRFrame
protected java.lang.String mDumpFrameName
protected int mInputIndex
public boolean IsNeedConfig()
public void ConfigDone()
public java.util.concurrent.atomic.AtomicBoolean getMediaCodecStopState()
public void EndofStream()
public boolean GetAndClearExceptionFlag()
protected static boolean IsAvailable(java.lang.String codecName)
protected void dumpIDRFrame(java.lang.String codecType,
byte[] bf,
long outPts)
protected long PushFrame(android.view.Surface surface,
java.lang.String codecName,
java.lang.String codecType,
byte[] bf,
long pts,
boolean isHeader)
protected int reset(android.view.Surface surface,
java.lang.String codecName,
java.lang.String codecType,
int width,
int height)
public void release()
public static boolean awaitUninterruptibly(java.lang.Thread thread,
java.util.concurrent.CountDownLatch barrier,
long timeoutMs)
public abstract int reset()
public abstract int reset(android.view.Surface surface,
int width,
int height)
public abstract long PushFrame(android.view.Surface surface,
byte[] bf,
long pts,
boolean isHeader)
protected static java.lang.String findCodecName(java.lang.String mime,
java.lang.String[] supportedPrefixes,
java.lang.String[] unSupportedPrefixes,
boolean isIgnoreCodecWhiteList)
public void setStreamId(long streamId)
public void setGroupId(long groupId)
public void setDecoderDataOutCallBack(HardDecRender.IDecoderDataOutCallBack decoderDataOutCallBack)
public long getCacheFrame()
public void setOnDecoderYUVListener(HardDecRender.OnDecoderYUVListener listener)