Interface TypeFindHelperGetRangeFunction
- 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 TypeFindHelperGetRangeFunction
extends FunctionPointer
Functional interface declaration of the TypeFindHelperGetRangeFunction callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionThis function will be called by gst_type_find_helper_get_range() when typefinding functions request to peek at the data of a stream at certain offsets.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(MemorySegment, MemorySegment, long, int, MemorySegment)method.default intupcall(MemorySegment obj, MemorySegment parent, long offset, int length, MemorySegment buffer) Theupcallmethod is called from native code.
-
Method Details
-
run
FlowReturn run(GstObject obj, @Nullable GstObject parent, long offset, int length, Out<Buffer> buffer) This function will be called by gst_type_find_helper_get_range() when typefinding functions request to peek at the data of a stream at certain offsets. If this function returns GST_FLOW_OK, the result buffer will be stored in
buffer.The contents ofbufferis invalid for any other return value.This function is supposed to behave exactly like a
GstPadGetRangeFunction.- Parameters:
obj- aGstObjectthat will handle the getrange requestparent- the parent ofobjornulloffset- the offset of the rangelength- the length of the rangebuffer- a memory location to hold the result buffer- Returns:
- GST_FLOW_OK for success
-
upcall
default int upcall(MemorySegment obj, MemorySegment parent, long offset, int length, MemorySegment buffer) Theupcallmethod is called from native code. The parameters are marshaled andrun(GstObject, GstObject, long, int, Out)is executed. -
toCallback
Creates a native function pointer to theupcall(MemorySegment, MemorySegment, long, int, MemorySegment)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-