Interface LocalVideoFrameListener

  • All Implemented Interfaces:

    
    public interface LocalVideoFrameListener
    
                        

    Listener 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.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract Unit onFrame(VideoFrame frame, ProcessedVideoFrameListener processedFrameListener) Called on a worker thread when a new frame is available from the local camera.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • 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.