Interface VideoFormatPack

All Superinterfaces:
FunctionPointer
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface @Generated("org.javagi.JavaGI") public interface VideoFormatPack extends FunctionPointer

Functional interface declaration of the VideoFormatPack callback.

See Also:
  • Method Details

    • run

      void run(VideoFormatInfo info, Set<VideoPackFlags> flags, @Nullable MemorySegment src, int sstride, @Nullable MemorySegment data, MemorySegment stride, Set<VideoChromaSite> chromaSite, int y, int width)

      Packs width pixels from src to the given planes and strides in the format info. The pixels from source have each component interleaved and will be packed into the planes in data.

      This function operates on pack_lines lines, meaning that src should contain at least pack_lines lines with a stride of sstride and y should be a multiple of pack_lines.

      Subsampled formats will use the horizontally and vertically cosited component from the source. Subsampling should be performed before packing.

      Because this function does not have a x coordinate, it is not possible to pack pixels starting from an unaligned position. For tiled images this means that packing should start from a tile coordinate. For subsampled formats this means that a complete pixel needs to be packed.

      Parameters:
      info - a GstVideoFormatInfo
      flags - flags to control the packing
      src - a source array
      sstride - the source array stride
      data - pointers to the destination data planes
      stride - strides of the destination planes
      chromaSite - the chroma siting of the target when subsampled (not used)
      y - the y position in the image to pack to
      width - the amount of pixels to pack.
    • upcall

      default void upcall(MemorySegment info, int flags, MemorySegment src, int sstride, MemorySegment data, MemorySegment stride, int chromaSite, int y, int width)
      The upcall method is called from native code. The parameters are marshaled and run(VideoFormatInfo, Set, MemorySegment, int, MemorySegment, MemorySegment, Set, int, int) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer