Record Class SDL_CameraSpec
java.lang.Object
java.lang.Record
club.doki7.sdl3.datatype.SDL_CameraSpec
- All Implemented Interfaces:
IPointer,ISDL_CameraSpec
@ValueBasedCandidate
@UnsafeConstructor
public record SDL_CameraSpec(@NotNull MemorySegment segment)
extends Record
implements ISDL_CameraSpec
The details of an output format for a camera device.
Cameras often support multiple formats; each one will be encapsulated in this struct.
Since: This struct is available since SDL 3.2.0.
See also:
SDL_GetCameraSupportedFormatsSDL_GetCameraFormat
Structure
typedef struct SDL_CameraSpec {
SDL_PixelFormat format;
SDL_Colorspace colorspace;
int width;
int height;
int framerate_numerator;
int framerate_denominator;
} SDL_CameraSpec;
Contracts
The property segment() should always be not-null
(segment != NULL && !segment.equals(MemorySegment.NULL)), and properly aligned to
LAYOUT.byteAlignment() bytes. To represent null pointer, you may use a Java
null instead. See the documentation of IPointer.segment() for more details.
The constructor of this class is marked as UnsafeConstructor, because it does not
perform any runtime check. The constructor can be useful for automatic code generators.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final StructLayoutstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final longstatic final longstatic final longstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionSDL_CameraSpec(@NotNull MemorySegment segment) Creates an instance of aSDL_CameraSpecrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_CameraSpecstatic SDL_CameraSpec.Ptrstatic SDL_CameraSpecclone(Arena arena, SDL_CameraSpec src) intcolorspace(int value) final booleanIndicates whether some other object is "equal to" this one.intformat()format(int value) intframerate_denominator(int value) intframerate_numerator(int value) final inthashCode()Returns a hash code value for this object.intheight()height(int value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.final StringtoString()Returns a string representation of this record class.intwidth()width(int value)
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$format
-
PATH$colorspace
-
PATH$width
-
PATH$height
-
PATH$framerate_numerator
-
PATH$framerate_denominator
-
LAYOUT$format
-
LAYOUT$colorspace
-
LAYOUT$width
-
LAYOUT$height
-
LAYOUT$framerate_numerator
-
LAYOUT$framerate_denominator
-
SIZE$format
public static final long SIZE$format -
SIZE$colorspace
public static final long SIZE$colorspace -
SIZE$width
public static final long SIZE$width -
SIZE$height
public static final long SIZE$height -
SIZE$framerate_numerator
public static final long SIZE$framerate_numerator -
SIZE$framerate_denominator
public static final long SIZE$framerate_denominator -
OFFSET$format
public static final long OFFSET$format -
OFFSET$colorspace
public static final long OFFSET$colorspace -
OFFSET$width
public static final long OFFSET$width -
OFFSET$height
public static final long OFFSET$height -
OFFSET$framerate_numerator
public static final long OFFSET$framerate_numerator -
OFFSET$framerate_denominator
public static final long OFFSET$framerate_denominator
-
-
Constructor Details
-
SDL_CameraSpec
Creates an instance of aSDL_CameraSpecrecord class.- Parameters:
segment- the value for thesegmentrecord component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
format
-
format
-
colorspace
-
colorspace
-
width
public int width() -
width
-
height
public int height() -
height
-
framerate_numerator
public int framerate_numerator() -
framerate_numerator
-
framerate_denominator
public int framerate_denominator() -
framerate_denominator
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
segment
Returns the value of thesegmentrecord component.
-