public class AVAssetTrackCodecDecoder extends java.lang.Object implements AVAssetTrackDecoder
AVAssetTrackSampleBufferOutput.AVAssetTrackSampleBufferInput
构造器和说明 |
---|
AVAssetTrackCodecDecoder(AVAssetTrackOutputSouce souce) |
限定符和类型 | 方法和说明 |
---|---|
void |
addTarget(AVAssetTrackSampleBufferOutput.AVAssetTrackSampleBufferInput input) |
void |
addTarget(AVAssetTrackSampleBufferOutput.AVAssetTrackSampleBufferInput input,
int atIndex) |
boolean |
drainOutputBuffer()
吐出解码后的数据
|
long |
durationTimeUs()
输出总时长 单位: us
|
boolean |
feedInputBuffer()
喂入数据到解码器
|
boolean |
isDecodeCompleted()
验证是否解码完成
|
boolean |
isOutputDone() |
protected void |
maybeInitCodec()
初始化 MediaCodec 解码器
|
void |
onInputFormatChanged(android.media.MediaFormat format)
格式信息改变
|
long |
outputTimeUs()
解码的输出时间
|
protected void |
releaseCodec()
释放 MediaCodec 解码器
|
void |
removeTarget(AVAssetTrackSampleBufferOutput.AVAssetTrackSampleBufferInput input) |
boolean |
renderOutputBuffer()
负责调用 feedInputBuffer 及 drainOutputBuffer 每次只吐出一帧数据
|
boolean |
renderOutputBuffers()
负责调用 feedInputBuffer 及 drainOutputBuffer
|
void |
reset()
复位解码器
|
boolean |
seekTo(long timeUs,
boolean accurate)
是否精准 seek,通常精准 seek 时会花费较长的时间
|
void |
setOutputSurface(android.view.Surface outputSurface)
设置 Surface AVAssetTrack mediaType == AVMediaVideo
|
java.util.List<AVAssetTrackSampleBufferOutput.AVAssetTrackSampleBufferInput> |
targets() |
public AVAssetTrackCodecDecoder(AVAssetTrackOutputSouce souce)
public void setOutputSurface(android.view.Surface outputSurface)
outputSurface
- protected void maybeInitCodec()
protected void releaseCodec()
public void onInputFormatChanged(android.media.MediaFormat format)
onInputFormatChanged
在接口中 AVAssetTrackDecoder
format
- 格式信息public long durationTimeUs()
durationTimeUs
在接口中 AVAssetTrackDecoder
public long outputTimeUs()
outputTimeUs
在接口中 AVAssetTrackDecoder
public boolean seekTo(long timeUs, boolean accurate)
seekTo
在接口中 AVAssetTrackDecoder
timeUs
- 搜寻的媒体帧时间accurate
- 是否精准获取public boolean isDecodeCompleted()
isDecodeCompleted
在接口中 AVAssetTrackDecoder
public void reset()
reset
在接口中 AVAssetTrackDecoder
public boolean renderOutputBuffers()
renderOutputBuffers
在接口中 AVAssetTrackDecoder
public boolean renderOutputBuffer()
renderOutputBuffer
在接口中 AVAssetTrackDecoder
public boolean isOutputDone()
public boolean feedInputBuffer()
feedInputBuffer
在接口中 AVAssetTrackDecoder
public boolean drainOutputBuffer()
drainOutputBuffer
在接口中 AVAssetTrackDecoder
public java.util.List<AVAssetTrackSampleBufferOutput.AVAssetTrackSampleBufferInput> targets()
public void addTarget(AVAssetTrackSampleBufferOutput.AVAssetTrackSampleBufferInput input, int atIndex)
public void addTarget(AVAssetTrackSampleBufferOutput.AVAssetTrackSampleBufferInput input)
public void removeTarget(AVAssetTrackSampleBufferOutput.AVAssetTrackSampleBufferInput input)