Package com.sinch.android.rtc.video
Interface LocalVideoFrameListener
-
- All Implemented Interfaces:
public interface LocalVideoFrameListenerListener for video frames captured from the local camera.
Allows observing and modifying frames before they are encoded and sent to the remote party. Modified frames are also reflected in the local preview.
Register via VideoController.setLocalVideoFrameListener.
-
-
Method Summary
Modifier and Type Method Description abstract UnitonFrame(VideoFrame frame, ProcessedVideoFrameListener processedFrameListener)Called on a worker thread when a new frame is available from the local camera. -
-
Method Detail
-
onFrame
abstract Unit onFrame(VideoFrame frame, ProcessedVideoFrameListener processedFrameListener)
Called on a worker thread when a new frame is available from the local camera.
Frames are in YUV I420 planar or semi-planar (not fully interleaved) format.
Important: processedFrameListener must be called exactly once when processing is complete, from the same thread as this callback. Failure to do so will stop frames from reaching the remote party. The listener accepts the original frame, a modified frame, or an entirely new frame.
- Parameters:
frame- The YUV I420 frame captured from the local camera.processedFrameListener- Must be called once processing is complete to deliver the frame to WebRTC for encoding and transmission.
-
-
-
-