Package org.freedesktop.gstreamer.video
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("io.github.jwharm.JavaGI")
public interface VideoFormatPack
extends FunctionPointer
Functional interface declaration of the
VideoFormatPack callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidrun(VideoFormatInfo info, Set<VideoPackFlags> flags, @Nullable MemorySegment src, int sstride, @Nullable MemorySegment data, MemorySegment stride, Set<VideoChromaSite> chromaSite, int y, int width) Packswidthpixels fromsrcto the given planes and strides in the formatinfo.The pixels from source have each component interleaved and will be packed into the planes indata.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, java.lang.foreign.MemorySegment, int, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, int, int, int)method.default voidupcall(MemorySegment info, int flags, MemorySegment src, int sstride, MemorySegment data, MemorySegment stride, int chromaSite, int y, int width) Theupcallmethod is called from native code.
-
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) Packswidthpixels fromsrcto the given planes and strides in the formatinfo.The pixels from source have each component interleaved and will be packed into the planes indata.This function operates on pack_lines lines, meaning that
srcshould contain at least pack_lines lines with a stride ofsstrideandyshould 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.
-
upcall
default void upcall(MemorySegment info, int flags, MemorySegment src, int sstride, MemorySegment data, MemorySegment stride, int chromaSite, int y, int width) Theupcallmethod is called from native code. The parameters are marshaled andrun(org.freedesktop.gstreamer.video.VideoFormatInfo, java.util.Set<org.freedesktop.gstreamer.video.VideoPackFlags>, java.lang.foreign.MemorySegment, int, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.util.Set<org.freedesktop.gstreamer.video.VideoChromaSite>, int, int)is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, java.lang.foreign.MemorySegment, int, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, int, int, int)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-