public abstract class EditorCallBack
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
boolean |
mNeedPacketCallback
Added in v3.32.0
Sets the packet callbacks to be enabled.
|
int |
mNeedRenderCallback
Sets the texture callbacks to be enabled.
|
static int |
RENDER_CALLBACK_CUSTOM
The video texture before effects are added to the video.
|
static int |
RENDER_CALLBACK_NONE
Use no callback.
|
static int |
RENDER_CALLBACK_TEXTURE
The video texture after effects are added to the video.
|
Constructor and Description |
---|
EditorCallBack() |
Modifier and Type | Method and Description |
---|---|
abstract int |
onCustomRender(int srcTextureID,
int width,
int height,
long frameTime)
The callback that outputs the texture id before adding effects to the video.
|
abstract void |
onDataReady()
The callback when the playback data is ready to use.
|
abstract void |
onEnd(int state)
The callback when the editing is complete.
|
abstract void |
onError(int rv)
The callback when an error occurs.
|
void |
onPacketSeek(long offset,
int whence)
Added in v3.32.0
The callback that packet seek.
|
abstract void |
onPlayProgress(long currentPlayTime,
long currentStreamPlayTime)
The callback that outputs the progress of playback.
|
void |
onPlayStateChanged(boolean isPlaying)
Added in v3.33.0
The callback when the play State changed.
|
void |
onRenderDestroy() |
void |
onRenderSetup() |
abstract int |
onTextureRender(int srcTextureID,
int width,
int height,
long frameTime)
The callback that outputs the texture id after adding effects to the video.
|
void |
onWritePacket(java.nio.ByteBuffer buffer,
int bufferSize)
Added in v3.32.0
The callback that packet.
|
public static final int RENDER_CALLBACK_NONE
public static final int RENDER_CALLBACK_CUSTOM
public static final int RENDER_CALLBACK_TEXTURE
public int mNeedRenderCallback
public boolean mNeedPacketCallback
public abstract void onEnd(int state)
state
- 0 indicates playback the video. 1 indicates export the video.public abstract void onError(int rv)
rv
- The error code.
VideoPool:
AliyunErrorCode.ALIVC_FRAMEWORK_MEDIA_POOL_WRONG_STATE
indicates that the state is incorrect.
AliyunErrorCode.ALIVC_FRAMEWORK_DEMUXER_INIT_MULTI_TIMES
indicates that DEMUXER is initialized multiple times.
AliyunErrorCode.ALIVC_FRAMEWORK_DEMUXER_OPEN_FILE_FAILED
indicates that an error occurred while starting DEMUXER.
AliyunErrorCode.ALIVC_FRAMEWORK_DEMUXER_FIND_STREAM_INFO_FAILED
indicates that DEMUXER failed to obtain stream information.
AliyunErrorCode.ALIVC_FRAMEWORK_VIDEO_DECODER_CREATE_DECODER_FAILED
indicates that an error occurred while creating the decoder.
AliyunErrorCode.ALIVC_FRAMEWORK_VIDEO_DECODER_ERROR_STATE
indicates that the decoder state is incorrect.
AliyunErrorCode.ALIVC_FRAMEWORK_VIDEO_DECODER_ERROR_INPUT
indicates that the decoder input is incorrect.
AliyunErrorCode.ALIVC_FRAMEWORK_VIDEO_DECODER_SPS_PPS_NULL
indicates that the SPSPPS parameter of the decoder is null.
AliyunErrorCode.ALIVC_FRAMEWORK_VIDEO_DECODER_CREATE_H264_PARAM_SET_FAILED
indicates that an error occurred while creating H264 decoding parameters.
AliyunErrorCode.ALIVC_FRAMEWORK_VIDEO_DECODER_CREATE_HEVC_PARAM_SET_FAILED
indicates that an error occurred while creating HEVC decoding parameters.
AliyunErrorCode.ALIVC_FRAMEWORK_MEDIA_POOL_CACHE_DATA_SIZE_OVERFLOW
indicates that the cache memory is full.
AudioPool:
AliyunErrorCode.ALIVC_FRAMEWORK_MEDIA_POOL_WRONG_STATE
indicates that the state is incorrect.
AliyunErrorCode.ALIVC_FRAMEWORK_DEMUXER_INIT_MULTI_TIMES
indicates that DEMUXER is initialized multiple times.
AliyunErrorCode.ALIVC_FRAMEWORK_DEMUXER_OPEN_FILE_FAILED
indicates that an error occurred while starting DEMUXER.
AliyunErrorCode.ALIVC_FRAMEWORK_DEMUXER_FIND_STREAM_INFO_FAILED
indicates that DEMUXER failed to obtain stream information.
AliyunErrorCode.ALIVC_FRAMEWORK_AUDIO_DECODER_CREATE_DECODER_FAILED
indicates that an error occurred while creating the decoder.
AliyunErrorCode.ALIVC_FRAMEWORK_AUDIO_DECODER_ERROR_STATE
indicates that the decoder state is incorrect.
AliyunErrorCode.ALIVC_FRAMEWORK_AUDIO_DECODER_ERROR_INPUT
indicates that the decoder input is incorrect.public void onRenderSetup()
public void onRenderDestroy()
public abstract int onCustomRender(int srcTextureID, int width, int height, long frameTime)
srcTextureID
- The old texture id.width
- The width of the texture.height
- The height of the texture.frameTime
- frame render time relative to editor timeline in microsecond unitpublic abstract int onTextureRender(int srcTextureID, int width, int height, long frameTime)
srcTextureID
- The old texture id.width
- The width of the texture.height
- The height of the texture.frameTime
- frame render time relative to editor timeline in microsecond unitpublic abstract void onPlayProgress(long currentPlayTime, long currentStreamPlayTime)
currentPlayTime
- The current time on the playback timeline.currentStreamPlayTime
- The current time on the stream timeline.public abstract void onDataReady()
public void onPlayStateChanged(boolean isPlaying)
isPlaying
- is playingpublic void onWritePacket(java.nio.ByteBuffer buffer, int bufferSize)
buffer
- databufferSize
- data sizepublic void onPacketSeek(long offset, int whence)
offset
- offsetwhence
- whence