public class

AVDecoderCapture

extends Object
java.lang.Object
   ↳ com.ksyun.media.shortvideo.capture.AVDecoderCapture

Class Overview

Decoder capture

Summary

Nested Classes
interface AVDecoderCapture.AVDecoderListener  
interface AVDecoderCapture.OnAudioPtsChangedListener  
interface AVDecoderCapture.OnVideoPtsChangedListener  
class AVDecoderCapture.PinAdapter<T extends AVFrameBase>  
Constants
int ERROR_DECODER_FAILED
int ERROR_DEMUXER_FAILED
int INFO_DECODER_AUDIO_STARTED
int INFO_DECODER_AUDIO_STOPPED
int INFO_DECODER_STOPPED
int INFO_DECODER_VIDEO_STARTED
int INFO_DECODER_VIDEO_STOPPED
int INFO_DEMUXER_PREPARED
int INFO_DEMUXER_STARTED
int INFO_DEMUXER_STOPPED
int INFO_MEDIA_PREPARED
int INFO_MEDIA_STOPPED
Public Constructors
AVDecoderCapture(GLRender glRender)
Public Methods
void createDummyCapture()
AVDemuxerCapture getAVDemuxerCapture()
getAudioSrcPin()
String getDecoderUrl()
int getDuration()
MediaInfo getMediaInfo()
float getProgress()
getVideoSrcPin()
boolean isStarted()
void release()
void reset()
void setAVDecoderListener(AVDecoderCapture.AVDecoderListener listener)
void setAudioDecodeMethod(int decodeMethod)
Set encode method for audio.
void setAutoStart(boolean autoStart)
void setAvDemuxerCaptureRanges(long startTimeMs, long endTimeMs)
set demux ranges
void setDataSource(String url)
void setNeedSendEos(boolean needSendEos)
void setOnAudioPtsChangedListener(AVDecoderCapture.OnAudioPtsChangedListener listener)
void setOnVideoPtsChangedListener(AVDecoderCapture.OnVideoPtsChangedListener listener)
void setSpeed(float speed)
void setVideoDecodeMethod(int decodeMethod)
Set decode method for video.
void start()
void stop()
Protected Methods
void postError(int err, long msg)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int ERROR_DECODER_FAILED

Constant Value: -1000 (0xfffffc18)

public static final int ERROR_DEMUXER_FAILED

Constant Value: -100 (0xffffff9c)

public static final int INFO_DECODER_AUDIO_STARTED

Constant Value: 1001 (0x000003e9)

public static final int INFO_DECODER_AUDIO_STOPPED

Constant Value: 1003 (0x000003eb)

public static final int INFO_DECODER_STOPPED

Constant Value: 1004 (0x000003ec)

public static final int INFO_DECODER_VIDEO_STARTED

Constant Value: 1000 (0x000003e8)

public static final int INFO_DECODER_VIDEO_STOPPED

Constant Value: 1002 (0x000003ea)

public static final int INFO_DEMUXER_PREPARED

Constant Value: 100 (0x00000064)

public static final int INFO_DEMUXER_STARTED

Constant Value: 101 (0x00000065)

public static final int INFO_DEMUXER_STOPPED

Constant Value: 102 (0x00000066)

public static final int INFO_MEDIA_PREPARED

Constant Value: 100 (0x00000064)

public static final int INFO_MEDIA_STOPPED

Constant Value: 1005 (0x000003ed)

Public Constructors

public AVDecoderCapture (GLRender glRender)

Public Methods

public void createDummyCapture ()

public AVDemuxerCapture getAVDemuxerCapture ()

public getAudioSrcPin ()

public String getDecoderUrl ()

public int getDuration ()

public MediaInfo getMediaInfo ()

public float getProgress ()

public getVideoSrcPin ()

public boolean isStarted ()

public void release ()

public void reset ()

public void setAVDecoderListener (AVDecoderCapture.AVDecoderListener listener)

public void setAudioDecodeMethod (int decodeMethod)

Set encode method for audio.
Must not be set while decoding.

Parameters
decodeMethod Decode method.
Throws
IllegalStateException
IllegalArgumentException
IllegalStateException
See Also
  • StreamerConstants#DECODE_METHOD_SOFTWARE
  • StreamerConstants#DECODE_METHOD_HARDWARE

public void setAutoStart (boolean autoStart)

public void setAvDemuxerCaptureRanges (long startTimeMs, long endTimeMs)

set demux ranges

Parameters
startTimeMs Demuxer start ts (ms)
endTimeMs Demuxer end ts (ms)

public void setDataSource (String url)

public void setNeedSendEos (boolean needSendEos)

public void setOnAudioPtsChangedListener (AVDecoderCapture.OnAudioPtsChangedListener listener)

public void setOnVideoPtsChangedListener (AVDecoderCapture.OnVideoPtsChangedListener listener)

public void setSpeed (float speed)

public void setVideoDecodeMethod (int decodeMethod)

Set decode method for video.
Must not be set while decoding.

Parameters
decodeMethod Decode method.
Throws
IllegalStateException
IllegalArgumentException
IllegalStateException
See Also
  • StreamerConstants#DECODE_METHOD_SOFTWARE
  • StreamerConstants#DECODE_METHOD_HARDWARE

public void start ()

public void stop ()

Protected Methods

protected void postError (int err, long msg)