public interface IVideoFrameObserver
Modifier and Type | Field and Description |
---|---|
static int |
POSITION_POST_CAPTURER
The position after capturing the video data, which corresponds to the onCaptureVideoFrame
callback.
|
static int |
POSITION_PRE_ENCODER
The position before encoding the video data, which corresponds to the onPreEncodeVideoFrame
callback.
|
static int |
POSITION_PRE_RENDERER
The position before receiving the remote video data, which corresponds to the
onRenderVideoFrame callback.
|
static int |
PROCESS_MODE_READ_ONLY
Observer works as a pure renderer and will not modify the original frame.
|
static int |
PROCESS_MODE_READ_WRITE
Observer works as a filter that will process the video frame and affect the following frame
processing in SDK.
|
static int |
VIDEO_PIXEL_BGRA
2: BGRA.
|
static int |
VIDEO_PIXEL_DEFAULT
0: Default format.
|
static int |
VIDEO_PIXEL_I420
1: I420.
|
static int |
VIDEO_PIXEL_I422
16: I422.
|
static int |
VIDEO_PIXEL_NV12
8: NV12.
|
static int |
VIDEO_PIXEL_NV21
3: NV21.
|
static int |
VIDEO_PIXEL_RGBA
4: RGBA.
|
static int |
VIDEO_TEXTURE_2D
10: GL_TEXTURE_2D
|
static int |
VIDEO_TEXTURE_OES
11: GL_TEXTURE_OES
|
Modifier and Type | Method and Description |
---|---|
boolean |
getMirrorApplied()
Occurs each time needs to get whether mirror is applied or not.
|
int |
getObservedFramePosition()
Sets the frame position for the video observer.
|
boolean |
getRotationApplied()
Occurs each time needs to get rotation angle.
|
int |
getVideoFormatPreference() |
int |
getVideoFrameProcessMode()
Indicate the video frame mode of the observer.
|
boolean |
onCaptureVideoFrame(VideoFrame videoFrame)
Occurs each time the SDK receives a video frame captured by the local camera.
|
boolean |
onMediaPlayerVideoFrame(VideoFrame videoFrame,
int mediaPlayerId)
Occurs each time the SDK receives a video frame decoded by the MediaPlayer.
|
boolean |
onPreEncodeScreenVideoFrame(VideoFrame videoFrame) |
boolean |
onPreEncodeVideoFrame(VideoFrame videoFrame)
Occurs each time the SDK receives a video frame before encoding.
|
boolean |
onRenderVideoFrame(java.lang.String channelId,
int uid,
VideoFrame videoFrame)
Occurs each time the SDK receives a video frame sent by the remote user.
|
boolean |
onScreenCaptureVideoFrame(VideoFrame videoFrame)
Occurs each time the SDK receives a video frame captured by the screen.
|
static final int PROCESS_MODE_READ_ONLY
static final int PROCESS_MODE_READ_WRITE
static final int POSITION_POST_CAPTURER
static final int POSITION_PRE_RENDERER
static final int POSITION_PRE_ENCODER
static final int VIDEO_PIXEL_DEFAULT
static final int VIDEO_PIXEL_I420
static final int VIDEO_PIXEL_BGRA
static final int VIDEO_PIXEL_NV21
static final int VIDEO_PIXEL_RGBA
static final int VIDEO_PIXEL_NV12
static final int VIDEO_TEXTURE_2D
static final int VIDEO_TEXTURE_OES
static final int VIDEO_PIXEL_I422
boolean onCaptureVideoFrame(VideoFrame videoFrame)
videoFrame
- A pointer to the video frame.boolean onPreEncodeVideoFrame(VideoFrame videoFrame)
videoFrame
- A pointer to the video frame: VideoFrameboolean onScreenCaptureVideoFrame(VideoFrame videoFrame)
videoFrame
- A pointer to the video frame: VideoFrameboolean onPreEncodeScreenVideoFrame(VideoFrame videoFrame)
boolean onMediaPlayerVideoFrame(VideoFrame videoFrame, int mediaPlayerId)
videoFrame
- A pointer to the video frame: VideoFramemediaPlayerId
- of the mediaPlayer.boolean onRenderVideoFrame(java.lang.String channelId, int uid, VideoFrame videoFrame)
channelId
- Channel name.uid
- ID of the remote user who sends the current video frame.videoFrame
- A pointer to the video frame.int getVideoFrameProcessMode()
PROCESS_MODE_READ_ONLY
or PROCESS_MODE_READ_WRITE
int getVideoFormatPreference()
boolean getRotationApplied()
boolean getMirrorApplied()
int getObservedFramePosition()