Package org.freedesktop.gstreamer.video
Interface VideoFormatUnpack
- 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 VideoFormatUnpack
extends FunctionPointer
Functional interface declaration of the
VideoFormatUnpack callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidrun(VideoFormatInfo info, Set<VideoPackFlags> flags, @Nullable MemorySegment dest, @Nullable MemorySegment data, MemorySegment stride, int x, int y, int width) Unpackswidthpixels from the given planes and strides containing data of formatinfo.The pixels will be unpacked intodestwith each component interleaved as perinfo'sunpack_format, which will usually be one ofGST_VIDEO_FORMAT_ARGB,GST_VIDEO_FORMAT_AYUV,GST_VIDEO_FORMAT_ARGB64orGST_VIDEO_FORMAT_AYUV64depending on the format to unpack.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, int, int, int)method.default voidupcall(MemorySegment info, int flags, MemorySegment dest, MemorySegment data, MemorySegment stride, int x, int y, int width) Theupcallmethod is called from native code.
-
Method Details
-
run
void run(VideoFormatInfo info, Set<VideoPackFlags> flags, @Nullable MemorySegment dest, @Nullable MemorySegment data, MemorySegment stride, int x, int y, int width) Unpackswidthpixels from the given planes and strides containing data of formatinfo.The pixels will be unpacked intodestwith each component interleaved as perinfo'sunpack_format, which will usually be one ofGST_VIDEO_FORMAT_ARGB,GST_VIDEO_FORMAT_AYUV,GST_VIDEO_FORMAT_ARGB64orGST_VIDEO_FORMAT_AYUV64depending on the format to unpack.destshould at least be big enough to holdwidth* bytes_per_pixel bytes where bytes_per_pixel relates to the unpack format and will usually be either 4 or 8 depending on the unpack format. bytes_per_pixel will be the same as the pixel stride for plane 0 for the above formats.For subsampled formats, the components will be duplicated in the destination array. Reconstruction of the missing components can be performed in a separate step after unpacking.
-
upcall
default void upcall(MemorySegment info, int flags, MemorySegment dest, MemorySegment data, MemorySegment stride, int x, 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, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, int, int, int)is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, int, java.lang.foreign.MemorySegment, 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
-