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 TypeMethodDescriptionvoid
run
(VideoFormatInfo info, Set<VideoPackFlags> flags, @Nullable MemorySegment src, int sstride, @Nullable MemorySegment data, MemorySegment stride, Set<VideoChromaSite> chromaSite, int y, int width) Packswidth
pixels fromsrc
to the given planes and strides in the formatinfo
.default MemorySegment
toCallback
(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 void
upcall
(MemorySegment info, int flags, MemorySegment src, int sstride, MemorySegment data, MemorySegment stride, int chromaSite, int y, int width) Theupcall
method is called from native code.
-
Method Details
-
run
void run(VideoFormatInfo info, Set<VideoPackFlags> flags, @Nullable @Nullable MemorySegment src, int sstride, @Nullable @Nullable MemorySegment data, MemorySegment stride, Set<VideoChromaSite> chromaSite, int y, int width) Packswidth
pixels fromsrc
to 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
src
should contain at least pack_lines lines with a stride ofsstride
andy
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.
-
upcall
default void upcall(MemorySegment info, int flags, MemorySegment src, int sstride, MemorySegment data, MemorySegment stride, int chromaSite, int y, int width) Theupcall
method 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:
toCallback
in interfaceFunctionPointer
- Parameters:
arena
- the function pointer will be allocated in this arena- Returns:
- the native function pointer
-