Module webrtc.java

Interface VideoFrameBuffer

  • All Superinterfaces:
    dev.onvoid.webrtc.internal.RefCounted
    All Known Subinterfaces:
    I420Buffer
    All Known Implementing Classes:
    NativeI420Buffer

    public interface VideoFrameBuffer
    extends dev.onvoid.webrtc.internal.RefCounted
    Base class for frame buffers of different types of pixel format and storage.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      VideoFrameBuffer cropAndScale​(int cropX, int cropY, int cropWidth, int cropHeight, int scaleWidth, int scaleHeight)
      Crops a region defined by |cropx|, |cropY|, |cropWidth| and |cropHeight|.
      int getHeight()  
      int getWidth()
      Resolution of the buffer in pixels.
      I420Buffer toI420()
      Returns a memory-backed frame in I420 format.
      • Methods inherited from interface dev.onvoid.webrtc.internal.RefCounted

        release, retain
    • Method Detail

      • getWidth

        int getWidth()
        Resolution of the buffer in pixels.
      • getHeight

        int getHeight()
      • toI420

        I420Buffer toI420()
        Returns a memory-backed frame in I420 format. If the pixel data is in another format, a conversion will take place. All implementations must provide a fallback to I420 for compatibility with e.g. the internal WebRTC software encoders.
      • cropAndScale

        VideoFrameBuffer cropAndScale​(int cropX,
                                      int cropY,
                                      int cropWidth,
                                      int cropHeight,
                                      int scaleWidth,
                                      int scaleHeight)
        Crops a region defined by |cropx|, |cropY|, |cropWidth| and |cropHeight|. Scales it to size |scaleWidth| x |scaleHeight|.