Package com.sinch.android.rtc.video
Interface LocalVideoFrameListener
-
public interface LocalVideoFrameListener
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onFrame(VideoFrame frame, ProcessedVideoFrameListener processedFrameListener)
Called on a worker thread when a new frame is available from the local camera.
-
-
-
Method Detail
-
onFrame
void onFrame(VideoFrame frame, ProcessedVideoFrameListener processedFrameListener)
Called on a worker thread when a new frame is available from the local camera. It provides the possibility for developer to process the local video frames (e.g. applying filters on the frames), and send the updated video frames to the remote client. Updated frames are also shown on preview. The video frames are in YUV I420 planar or semi-planar (but not fully interleaved) format.ImageFormat.YUV_420_888
- Parameters:
frame
- The YUV I420 frame object.processedFrameListener
- use it to inform that processing is complete and send frames (updated or original) to remote clientIMPORTANT: When processing is complete, call
onFrameProcessed()
method ofProcessedVideoFrameListener
interface. Failure to do so will lead to remote side not getting any frames. It is allowed to call processedFrameListener.onFrameProcessed() with either original or updated or entirely new frame. The call toonFrameProcessed()
should be invoked from same thread asonFrame()
callback.
-
-