Interface BufferFormatCallback

All Known Implementing Classes:
BufferFormatCallbackAdapter

public interface BufferFormatCallback
Callback invoked by the CallbackVideoSurface when the format of the video changes.
  • Method Details

    • getBufferFormat

      BufferFormat getBufferFormat(int sourceWidth, int sourceHeight)
      Returns a BufferFormat instance specifying how the CallbackVideoSurface should structure its internal buffers.

      Note that it is possible that some versions of VLC provide the wrong value for the sourceHeight parameter, and more than that it might invoke this callback multiple times with different values for the sourceHeight. Your own callback implementation may need to mitigate this (e.g. by ignoring the sourceHeight changes on subsequent invocations of your callback).

      Parameters:
      sourceWidth - video width
      sourceHeight - video height
      Returns:
      buffer format, must never be null
    • allocatedBuffers

      void allocatedBuffers(ByteBuffer[] buffers)
      Invoked when new video buffers have been allocated.
      Parameters:
      buffers - buffers that were allocated