public abstract class AVChatExternalVideoCapturer extends ExternalVideoCapturer implements AVChatVideoCapturer
Constructor and Description |
---|
AVChatExternalVideoCapturer() |
Modifier and Type | Method and Description |
---|---|
IVideoCapturer |
asVideoCapturer() |
abstract void |
changeCaptureFormat(int width,
int height,
int frameRate)
Edit capture parameters
|
abstract void |
dispose()
Dispose video data
|
int |
onByteBufferFrameCaptured(byte[] data,
int dataLen,
int width,
int height,
int rotation,
int frameRate,
int format,
long timeStamp,
boolean mirror)
External call for submitting each frame of video data
|
void |
onCapturerStarted(boolean success)
External call used to notify the SDK whether video data capture starts.
|
void |
onCapturerStopped()
External call used to notify the SDK whether video data capture stops.
|
abstract void |
startCapture(int width,
int height,
int frameRate)
Start capure video data
|
abstract void |
stopCapture()
Stop capture video data
|
public abstract void startCapture(int width, int height, int frameRate)
width
- widthheight
- heightframeRate
- frame ratepublic abstract void stopCapture() throws java.lang.InterruptedException
java.lang.InterruptedException
public abstract void changeCaptureFormat(int width, int height, int frameRate)
width
- widthheight
- heightframeRate
- frame ratepublic abstract void dispose()
public IVideoCapturer asVideoCapturer()
asVideoCapturer
in interface AVChatVideoCapturer
public void onCapturerStarted(boolean success)
success
- indicates whether the video data capture starts with success.public void onCapturerStopped()
public int onByteBufferFrameCaptured(byte[] data, int dataLen, int width, int height, int rotation, int frameRate, int format, long timeStamp, boolean mirror)
data
- Video datadataLen
- Video data lengthwidth
- Video data widthheight
- Video data heightrotation
- angle of rotation. The mutiple of 90 degree in clockwise directionframeRate
- frame rate, greater than 0. If the value is large, frame loss may apply.format
- Video format AVChatImageFormat.I420
、AVChatImageFormat.NV21
timeStamp
- video timestamp starting from AVChatManagerLite.enableRtc()
by calling SystemClock#elapsedRealtime()
mirror
- specify if mirror is required. If the value is se to true
, mirroring is implemented after rotation-1- empty data or invalid length
-2- invalid width and length. The resolution exceeds the maximum supported size 1920*1080.
-3- invalid angle of rotation
-4- invalid frame rate
-5- invalid data format
-10- other errors