com.nextbreakpoint.ffmpeg4java.AVCodecParserContext Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.nextbreakpoint.ffmpeg4java.windows Show documentation
Show all versions of com.nextbreakpoint.ffmpeg4java.windows Show documentation
FFmpeg4Java provides a Java wrapper of FFmpeg library
The newest version!
// Generated by jextract
package com.nextbreakpoint.ffmpeg4java;
import java.lang.invoke.*;
import java.lang.foreign.*;
import java.nio.ByteOrder;
import java.util.*;
import java.util.function.*;
import java.util.stream.*;
import static java.lang.foreign.ValueLayout.*;
import static java.lang.foreign.MemoryLayout.PathElement.*;
/**
* {@snippet lang=c :
* struct AVCodecParserContext {
* void *priv_data;
* struct AVCodecParser *parser;
* int64_t frame_offset;
* int64_t cur_offset;
* int64_t next_frame_offset;
* int pict_type;
* int repeat_pict;
* int64_t pts;
* int64_t dts;
* int64_t last_pts;
* int64_t last_dts;
* int fetch_timestamp;
* int cur_frame_start_index;
* int64_t cur_frame_offset[4];
* int64_t cur_frame_pts[4];
* int64_t cur_frame_dts[4];
* int flags;
* int64_t offset;
* int64_t cur_frame_end[4];
* int key_frame;
* int dts_sync_point;
* int dts_ref_dts_delta;
* int pts_dts_delta;
* int64_t cur_frame_pos[4];
* int64_t pos;
* int64_t last_pos;
* int duration;
* enum AVFieldOrder field_order;
* enum AVPictureStructure picture_structure;
* int output_picture_number;
* int width;
* int height;
* int coded_width;
* int coded_height;
* int format;
* }
* }
*/
public class AVCodecParserContext {
AVCodecParserContext() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Libffmpeg.C_POINTER.withName("priv_data"),
Libffmpeg.C_POINTER.withName("parser"),
Libffmpeg.C_LONG_LONG.withName("frame_offset"),
Libffmpeg.C_LONG_LONG.withName("cur_offset"),
Libffmpeg.C_LONG_LONG.withName("next_frame_offset"),
Libffmpeg.C_INT.withName("pict_type"),
Libffmpeg.C_INT.withName("repeat_pict"),
Libffmpeg.C_LONG_LONG.withName("pts"),
Libffmpeg.C_LONG_LONG.withName("dts"),
Libffmpeg.C_LONG_LONG.withName("last_pts"),
Libffmpeg.C_LONG_LONG.withName("last_dts"),
Libffmpeg.C_INT.withName("fetch_timestamp"),
Libffmpeg.C_INT.withName("cur_frame_start_index"),
MemoryLayout.sequenceLayout(4, Libffmpeg.C_LONG_LONG).withName("cur_frame_offset"),
MemoryLayout.sequenceLayout(4, Libffmpeg.C_LONG_LONG).withName("cur_frame_pts"),
MemoryLayout.sequenceLayout(4, Libffmpeg.C_LONG_LONG).withName("cur_frame_dts"),
Libffmpeg.C_INT.withName("flags"),
MemoryLayout.paddingLayout(4),
Libffmpeg.C_LONG_LONG.withName("offset"),
MemoryLayout.sequenceLayout(4, Libffmpeg.C_LONG_LONG).withName("cur_frame_end"),
Libffmpeg.C_INT.withName("key_frame"),
Libffmpeg.C_INT.withName("dts_sync_point"),
Libffmpeg.C_INT.withName("dts_ref_dts_delta"),
Libffmpeg.C_INT.withName("pts_dts_delta"),
MemoryLayout.sequenceLayout(4, Libffmpeg.C_LONG_LONG).withName("cur_frame_pos"),
Libffmpeg.C_LONG_LONG.withName("pos"),
Libffmpeg.C_LONG_LONG.withName("last_pos"),
Libffmpeg.C_INT.withName("duration"),
Libffmpeg.C_INT.withName("field_order"),
Libffmpeg.C_INT.withName("picture_structure"),
Libffmpeg.C_INT.withName("output_picture_number"),
Libffmpeg.C_INT.withName("width"),
Libffmpeg.C_INT.withName("height"),
Libffmpeg.C_INT.withName("coded_width"),
Libffmpeg.C_INT.withName("coded_height"),
Libffmpeg.C_INT.withName("format"),
MemoryLayout.paddingLayout(4)
).withName("AVCodecParserContext");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final AddressLayout priv_data$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("priv_data"));
/**
* Layout for field:
* {@snippet lang=c :
* void *priv_data
* }
*/
public static final AddressLayout priv_data$layout() {
return priv_data$LAYOUT;
}
private static final long priv_data$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* void *priv_data
* }
*/
public static final long priv_data$offset() {
return priv_data$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* void *priv_data
* }
*/
public static MemorySegment priv_data(MemorySegment struct) {
return struct.get(priv_data$LAYOUT, priv_data$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* void *priv_data
* }
*/
public static void priv_data(MemorySegment struct, MemorySegment fieldValue) {
struct.set(priv_data$LAYOUT, priv_data$OFFSET, fieldValue);
}
private static final AddressLayout parser$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("parser"));
/**
* Layout for field:
* {@snippet lang=c :
* struct AVCodecParser *parser
* }
*/
public static final AddressLayout parser$layout() {
return parser$LAYOUT;
}
private static final long parser$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* struct AVCodecParser *parser
* }
*/
public static final long parser$offset() {
return parser$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct AVCodecParser *parser
* }
*/
public static MemorySegment parser(MemorySegment struct) {
return struct.get(parser$LAYOUT, parser$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* struct AVCodecParser *parser
* }
*/
public static void parser(MemorySegment struct, MemorySegment fieldValue) {
struct.set(parser$LAYOUT, parser$OFFSET, fieldValue);
}
private static final OfLong frame_offset$LAYOUT = (OfLong)$LAYOUT.select(groupElement("frame_offset"));
/**
* Layout for field:
* {@snippet lang=c :
* int64_t frame_offset
* }
*/
public static final OfLong frame_offset$layout() {
return frame_offset$LAYOUT;
}
private static final long frame_offset$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* int64_t frame_offset
* }
*/
public static final long frame_offset$offset() {
return frame_offset$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int64_t frame_offset
* }
*/
public static long frame_offset(MemorySegment struct) {
return struct.get(frame_offset$LAYOUT, frame_offset$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int64_t frame_offset
* }
*/
public static void frame_offset(MemorySegment struct, long fieldValue) {
struct.set(frame_offset$LAYOUT, frame_offset$OFFSET, fieldValue);
}
private static final OfLong cur_offset$LAYOUT = (OfLong)$LAYOUT.select(groupElement("cur_offset"));
/**
* Layout for field:
* {@snippet lang=c :
* int64_t cur_offset
* }
*/
public static final OfLong cur_offset$layout() {
return cur_offset$LAYOUT;
}
private static final long cur_offset$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* int64_t cur_offset
* }
*/
public static final long cur_offset$offset() {
return cur_offset$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int64_t cur_offset
* }
*/
public static long cur_offset(MemorySegment struct) {
return struct.get(cur_offset$LAYOUT, cur_offset$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int64_t cur_offset
* }
*/
public static void cur_offset(MemorySegment struct, long fieldValue) {
struct.set(cur_offset$LAYOUT, cur_offset$OFFSET, fieldValue);
}
private static final OfLong next_frame_offset$LAYOUT = (OfLong)$LAYOUT.select(groupElement("next_frame_offset"));
/**
* Layout for field:
* {@snippet lang=c :
* int64_t next_frame_offset
* }
*/
public static final OfLong next_frame_offset$layout() {
return next_frame_offset$LAYOUT;
}
private static final long next_frame_offset$OFFSET = 32;
/**
* Offset for field:
* {@snippet lang=c :
* int64_t next_frame_offset
* }
*/
public static final long next_frame_offset$offset() {
return next_frame_offset$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int64_t next_frame_offset
* }
*/
public static long next_frame_offset(MemorySegment struct) {
return struct.get(next_frame_offset$LAYOUT, next_frame_offset$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int64_t next_frame_offset
* }
*/
public static void next_frame_offset(MemorySegment struct, long fieldValue) {
struct.set(next_frame_offset$LAYOUT, next_frame_offset$OFFSET, fieldValue);
}
private static final OfInt pict_type$LAYOUT = (OfInt)$LAYOUT.select(groupElement("pict_type"));
/**
* Layout for field:
* {@snippet lang=c :
* int pict_type
* }
*/
public static final OfInt pict_type$layout() {
return pict_type$LAYOUT;
}
private static final long pict_type$OFFSET = 40;
/**
* Offset for field:
* {@snippet lang=c :
* int pict_type
* }
*/
public static final long pict_type$offset() {
return pict_type$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int pict_type
* }
*/
public static int pict_type(MemorySegment struct) {
return struct.get(pict_type$LAYOUT, pict_type$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int pict_type
* }
*/
public static void pict_type(MemorySegment struct, int fieldValue) {
struct.set(pict_type$LAYOUT, pict_type$OFFSET, fieldValue);
}
private static final OfInt repeat_pict$LAYOUT = (OfInt)$LAYOUT.select(groupElement("repeat_pict"));
/**
* Layout for field:
* {@snippet lang=c :
* int repeat_pict
* }
*/
public static final OfInt repeat_pict$layout() {
return repeat_pict$LAYOUT;
}
private static final long repeat_pict$OFFSET = 44;
/**
* Offset for field:
* {@snippet lang=c :
* int repeat_pict
* }
*/
public static final long repeat_pict$offset() {
return repeat_pict$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int repeat_pict
* }
*/
public static int repeat_pict(MemorySegment struct) {
return struct.get(repeat_pict$LAYOUT, repeat_pict$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int repeat_pict
* }
*/
public static void repeat_pict(MemorySegment struct, int fieldValue) {
struct.set(repeat_pict$LAYOUT, repeat_pict$OFFSET, fieldValue);
}
private static final OfLong pts$LAYOUT = (OfLong)$LAYOUT.select(groupElement("pts"));
/**
* Layout for field:
* {@snippet lang=c :
* int64_t pts
* }
*/
public static final OfLong pts$layout() {
return pts$LAYOUT;
}
private static final long pts$OFFSET = 48;
/**
* Offset for field:
* {@snippet lang=c :
* int64_t pts
* }
*/
public static final long pts$offset() {
return pts$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int64_t pts
* }
*/
public static long pts(MemorySegment struct) {
return struct.get(pts$LAYOUT, pts$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int64_t pts
* }
*/
public static void pts(MemorySegment struct, long fieldValue) {
struct.set(pts$LAYOUT, pts$OFFSET, fieldValue);
}
private static final OfLong dts$LAYOUT = (OfLong)$LAYOUT.select(groupElement("dts"));
/**
* Layout for field:
* {@snippet lang=c :
* int64_t dts
* }
*/
public static final OfLong dts$layout() {
return dts$LAYOUT;
}
private static final long dts$OFFSET = 56;
/**
* Offset for field:
* {@snippet lang=c :
* int64_t dts
* }
*/
public static final long dts$offset() {
return dts$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int64_t dts
* }
*/
public static long dts(MemorySegment struct) {
return struct.get(dts$LAYOUT, dts$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int64_t dts
* }
*/
public static void dts(MemorySegment struct, long fieldValue) {
struct.set(dts$LAYOUT, dts$OFFSET, fieldValue);
}
private static final OfLong last_pts$LAYOUT = (OfLong)$LAYOUT.select(groupElement("last_pts"));
/**
* Layout for field:
* {@snippet lang=c :
* int64_t last_pts
* }
*/
public static final OfLong last_pts$layout() {
return last_pts$LAYOUT;
}
private static final long last_pts$OFFSET = 64;
/**
* Offset for field:
* {@snippet lang=c :
* int64_t last_pts
* }
*/
public static final long last_pts$offset() {
return last_pts$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int64_t last_pts
* }
*/
public static long last_pts(MemorySegment struct) {
return struct.get(last_pts$LAYOUT, last_pts$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int64_t last_pts
* }
*/
public static void last_pts(MemorySegment struct, long fieldValue) {
struct.set(last_pts$LAYOUT, last_pts$OFFSET, fieldValue);
}
private static final OfLong last_dts$LAYOUT = (OfLong)$LAYOUT.select(groupElement("last_dts"));
/**
* Layout for field:
* {@snippet lang=c :
* int64_t last_dts
* }
*/
public static final OfLong last_dts$layout() {
return last_dts$LAYOUT;
}
private static final long last_dts$OFFSET = 72;
/**
* Offset for field:
* {@snippet lang=c :
* int64_t last_dts
* }
*/
public static final long last_dts$offset() {
return last_dts$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int64_t last_dts
* }
*/
public static long last_dts(MemorySegment struct) {
return struct.get(last_dts$LAYOUT, last_dts$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int64_t last_dts
* }
*/
public static void last_dts(MemorySegment struct, long fieldValue) {
struct.set(last_dts$LAYOUT, last_dts$OFFSET, fieldValue);
}
private static final OfInt fetch_timestamp$LAYOUT = (OfInt)$LAYOUT.select(groupElement("fetch_timestamp"));
/**
* Layout for field:
* {@snippet lang=c :
* int fetch_timestamp
* }
*/
public static final OfInt fetch_timestamp$layout() {
return fetch_timestamp$LAYOUT;
}
private static final long fetch_timestamp$OFFSET = 80;
/**
* Offset for field:
* {@snippet lang=c :
* int fetch_timestamp
* }
*/
public static final long fetch_timestamp$offset() {
return fetch_timestamp$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int fetch_timestamp
* }
*/
public static int fetch_timestamp(MemorySegment struct) {
return struct.get(fetch_timestamp$LAYOUT, fetch_timestamp$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int fetch_timestamp
* }
*/
public static void fetch_timestamp(MemorySegment struct, int fieldValue) {
struct.set(fetch_timestamp$LAYOUT, fetch_timestamp$OFFSET, fieldValue);
}
private static final OfInt cur_frame_start_index$LAYOUT = (OfInt)$LAYOUT.select(groupElement("cur_frame_start_index"));
/**
* Layout for field:
* {@snippet lang=c :
* int cur_frame_start_index
* }
*/
public static final OfInt cur_frame_start_index$layout() {
return cur_frame_start_index$LAYOUT;
}
private static final long cur_frame_start_index$OFFSET = 84;
/**
* Offset for field:
* {@snippet lang=c :
* int cur_frame_start_index
* }
*/
public static final long cur_frame_start_index$offset() {
return cur_frame_start_index$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int cur_frame_start_index
* }
*/
public static int cur_frame_start_index(MemorySegment struct) {
return struct.get(cur_frame_start_index$LAYOUT, cur_frame_start_index$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int cur_frame_start_index
* }
*/
public static void cur_frame_start_index(MemorySegment struct, int fieldValue) {
struct.set(cur_frame_start_index$LAYOUT, cur_frame_start_index$OFFSET, fieldValue);
}
private static final SequenceLayout cur_frame_offset$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("cur_frame_offset"));
/**
* Layout for field:
* {@snippet lang=c :
* int64_t cur_frame_offset[4]
* }
*/
public static final SequenceLayout cur_frame_offset$layout() {
return cur_frame_offset$LAYOUT;
}
private static final long cur_frame_offset$OFFSET = 88;
/**
* Offset for field:
* {@snippet lang=c :
* int64_t cur_frame_offset[4]
* }
*/
public static final long cur_frame_offset$offset() {
return cur_frame_offset$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int64_t cur_frame_offset[4]
* }
*/
public static MemorySegment cur_frame_offset(MemorySegment struct) {
return struct.asSlice(cur_frame_offset$OFFSET, cur_frame_offset$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* int64_t cur_frame_offset[4]
* }
*/
public static void cur_frame_offset(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, cur_frame_offset$OFFSET, cur_frame_offset$LAYOUT.byteSize());
}
private static long[] cur_frame_offset$DIMS = { 4 };
/**
* Dimensions for array field:
* {@snippet lang=c :
* int64_t cur_frame_offset[4]
* }
*/
public static long[] cur_frame_offset$dimensions() {
return cur_frame_offset$DIMS;
}
private static final VarHandle cur_frame_offset$ELEM_HANDLE = cur_frame_offset$LAYOUT.varHandle(sequenceElement());
/**
* Indexed getter for field:
* {@snippet lang=c :
* int64_t cur_frame_offset[4]
* }
*/
public static long cur_frame_offset(MemorySegment struct, long index0) {
return (long)cur_frame_offset$ELEM_HANDLE.get(struct, 0L, index0);
}
/**
* Indexed setter for field:
* {@snippet lang=c :
* int64_t cur_frame_offset[4]
* }
*/
public static void cur_frame_offset(MemorySegment struct, long index0, long fieldValue) {
cur_frame_offset$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
}
private static final SequenceLayout cur_frame_pts$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("cur_frame_pts"));
/**
* Layout for field:
* {@snippet lang=c :
* int64_t cur_frame_pts[4]
* }
*/
public static final SequenceLayout cur_frame_pts$layout() {
return cur_frame_pts$LAYOUT;
}
private static final long cur_frame_pts$OFFSET = 120;
/**
* Offset for field:
* {@snippet lang=c :
* int64_t cur_frame_pts[4]
* }
*/
public static final long cur_frame_pts$offset() {
return cur_frame_pts$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int64_t cur_frame_pts[4]
* }
*/
public static MemorySegment cur_frame_pts(MemorySegment struct) {
return struct.asSlice(cur_frame_pts$OFFSET, cur_frame_pts$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* int64_t cur_frame_pts[4]
* }
*/
public static void cur_frame_pts(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, cur_frame_pts$OFFSET, cur_frame_pts$LAYOUT.byteSize());
}
private static long[] cur_frame_pts$DIMS = { 4 };
/**
* Dimensions for array field:
* {@snippet lang=c :
* int64_t cur_frame_pts[4]
* }
*/
public static long[] cur_frame_pts$dimensions() {
return cur_frame_pts$DIMS;
}
private static final VarHandle cur_frame_pts$ELEM_HANDLE = cur_frame_pts$LAYOUT.varHandle(sequenceElement());
/**
* Indexed getter for field:
* {@snippet lang=c :
* int64_t cur_frame_pts[4]
* }
*/
public static long cur_frame_pts(MemorySegment struct, long index0) {
return (long)cur_frame_pts$ELEM_HANDLE.get(struct, 0L, index0);
}
/**
* Indexed setter for field:
* {@snippet lang=c :
* int64_t cur_frame_pts[4]
* }
*/
public static void cur_frame_pts(MemorySegment struct, long index0, long fieldValue) {
cur_frame_pts$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
}
private static final SequenceLayout cur_frame_dts$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("cur_frame_dts"));
/**
* Layout for field:
* {@snippet lang=c :
* int64_t cur_frame_dts[4]
* }
*/
public static final SequenceLayout cur_frame_dts$layout() {
return cur_frame_dts$LAYOUT;
}
private static final long cur_frame_dts$OFFSET = 152;
/**
* Offset for field:
* {@snippet lang=c :
* int64_t cur_frame_dts[4]
* }
*/
public static final long cur_frame_dts$offset() {
return cur_frame_dts$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int64_t cur_frame_dts[4]
* }
*/
public static MemorySegment cur_frame_dts(MemorySegment struct) {
return struct.asSlice(cur_frame_dts$OFFSET, cur_frame_dts$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* int64_t cur_frame_dts[4]
* }
*/
public static void cur_frame_dts(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, cur_frame_dts$OFFSET, cur_frame_dts$LAYOUT.byteSize());
}
private static long[] cur_frame_dts$DIMS = { 4 };
/**
* Dimensions for array field:
* {@snippet lang=c :
* int64_t cur_frame_dts[4]
* }
*/
public static long[] cur_frame_dts$dimensions() {
return cur_frame_dts$DIMS;
}
private static final VarHandle cur_frame_dts$ELEM_HANDLE = cur_frame_dts$LAYOUT.varHandle(sequenceElement());
/**
* Indexed getter for field:
* {@snippet lang=c :
* int64_t cur_frame_dts[4]
* }
*/
public static long cur_frame_dts(MemorySegment struct, long index0) {
return (long)cur_frame_dts$ELEM_HANDLE.get(struct, 0L, index0);
}
/**
* Indexed setter for field:
* {@snippet lang=c :
* int64_t cur_frame_dts[4]
* }
*/
public static void cur_frame_dts(MemorySegment struct, long index0, long fieldValue) {
cur_frame_dts$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
}
private static final OfInt flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("flags"));
/**
* Layout for field:
* {@snippet lang=c :
* int flags
* }
*/
public static final OfInt flags$layout() {
return flags$LAYOUT;
}
private static final long flags$OFFSET = 184;
/**
* Offset for field:
* {@snippet lang=c :
* int flags
* }
*/
public static final long flags$offset() {
return flags$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int flags
* }
*/
public static int flags(MemorySegment struct) {
return struct.get(flags$LAYOUT, flags$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int flags
* }
*/
public static void flags(MemorySegment struct, int fieldValue) {
struct.set(flags$LAYOUT, flags$OFFSET, fieldValue);
}
private static final OfLong offset$LAYOUT = (OfLong)$LAYOUT.select(groupElement("offset"));
/**
* Layout for field:
* {@snippet lang=c :
* int64_t offset
* }
*/
public static final OfLong offset$layout() {
return offset$LAYOUT;
}
private static final long offset$OFFSET = 192;
/**
* Offset for field:
* {@snippet lang=c :
* int64_t offset
* }
*/
public static final long offset$offset() {
return offset$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int64_t offset
* }
*/
public static long offset(MemorySegment struct) {
return struct.get(offset$LAYOUT, offset$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int64_t offset
* }
*/
public static void offset(MemorySegment struct, long fieldValue) {
struct.set(offset$LAYOUT, offset$OFFSET, fieldValue);
}
private static final SequenceLayout cur_frame_end$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("cur_frame_end"));
/**
* Layout for field:
* {@snippet lang=c :
* int64_t cur_frame_end[4]
* }
*/
public static final SequenceLayout cur_frame_end$layout() {
return cur_frame_end$LAYOUT;
}
private static final long cur_frame_end$OFFSET = 200;
/**
* Offset for field:
* {@snippet lang=c :
* int64_t cur_frame_end[4]
* }
*/
public static final long cur_frame_end$offset() {
return cur_frame_end$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int64_t cur_frame_end[4]
* }
*/
public static MemorySegment cur_frame_end(MemorySegment struct) {
return struct.asSlice(cur_frame_end$OFFSET, cur_frame_end$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* int64_t cur_frame_end[4]
* }
*/
public static void cur_frame_end(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, cur_frame_end$OFFSET, cur_frame_end$LAYOUT.byteSize());
}
private static long[] cur_frame_end$DIMS = { 4 };
/**
* Dimensions for array field:
* {@snippet lang=c :
* int64_t cur_frame_end[4]
* }
*/
public static long[] cur_frame_end$dimensions() {
return cur_frame_end$DIMS;
}
private static final VarHandle cur_frame_end$ELEM_HANDLE = cur_frame_end$LAYOUT.varHandle(sequenceElement());
/**
* Indexed getter for field:
* {@snippet lang=c :
* int64_t cur_frame_end[4]
* }
*/
public static long cur_frame_end(MemorySegment struct, long index0) {
return (long)cur_frame_end$ELEM_HANDLE.get(struct, 0L, index0);
}
/**
* Indexed setter for field:
* {@snippet lang=c :
* int64_t cur_frame_end[4]
* }
*/
public static void cur_frame_end(MemorySegment struct, long index0, long fieldValue) {
cur_frame_end$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
}
private static final OfInt key_frame$LAYOUT = (OfInt)$LAYOUT.select(groupElement("key_frame"));
/**
* Layout for field:
* {@snippet lang=c :
* int key_frame
* }
*/
public static final OfInt key_frame$layout() {
return key_frame$LAYOUT;
}
private static final long key_frame$OFFSET = 232;
/**
* Offset for field:
* {@snippet lang=c :
* int key_frame
* }
*/
public static final long key_frame$offset() {
return key_frame$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int key_frame
* }
*/
public static int key_frame(MemorySegment struct) {
return struct.get(key_frame$LAYOUT, key_frame$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int key_frame
* }
*/
public static void key_frame(MemorySegment struct, int fieldValue) {
struct.set(key_frame$LAYOUT, key_frame$OFFSET, fieldValue);
}
private static final OfInt dts_sync_point$LAYOUT = (OfInt)$LAYOUT.select(groupElement("dts_sync_point"));
/**
* Layout for field:
* {@snippet lang=c :
* int dts_sync_point
* }
*/
public static final OfInt dts_sync_point$layout() {
return dts_sync_point$LAYOUT;
}
private static final long dts_sync_point$OFFSET = 236;
/**
* Offset for field:
* {@snippet lang=c :
* int dts_sync_point
* }
*/
public static final long dts_sync_point$offset() {
return dts_sync_point$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int dts_sync_point
* }
*/
public static int dts_sync_point(MemorySegment struct) {
return struct.get(dts_sync_point$LAYOUT, dts_sync_point$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int dts_sync_point
* }
*/
public static void dts_sync_point(MemorySegment struct, int fieldValue) {
struct.set(dts_sync_point$LAYOUT, dts_sync_point$OFFSET, fieldValue);
}
private static final OfInt dts_ref_dts_delta$LAYOUT = (OfInt)$LAYOUT.select(groupElement("dts_ref_dts_delta"));
/**
* Layout for field:
* {@snippet lang=c :
* int dts_ref_dts_delta
* }
*/
public static final OfInt dts_ref_dts_delta$layout() {
return dts_ref_dts_delta$LAYOUT;
}
private static final long dts_ref_dts_delta$OFFSET = 240;
/**
* Offset for field:
* {@snippet lang=c :
* int dts_ref_dts_delta
* }
*/
public static final long dts_ref_dts_delta$offset() {
return dts_ref_dts_delta$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int dts_ref_dts_delta
* }
*/
public static int dts_ref_dts_delta(MemorySegment struct) {
return struct.get(dts_ref_dts_delta$LAYOUT, dts_ref_dts_delta$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int dts_ref_dts_delta
* }
*/
public static void dts_ref_dts_delta(MemorySegment struct, int fieldValue) {
struct.set(dts_ref_dts_delta$LAYOUT, dts_ref_dts_delta$OFFSET, fieldValue);
}
private static final OfInt pts_dts_delta$LAYOUT = (OfInt)$LAYOUT.select(groupElement("pts_dts_delta"));
/**
* Layout for field:
* {@snippet lang=c :
* int pts_dts_delta
* }
*/
public static final OfInt pts_dts_delta$layout() {
return pts_dts_delta$LAYOUT;
}
private static final long pts_dts_delta$OFFSET = 244;
/**
* Offset for field:
* {@snippet lang=c :
* int pts_dts_delta
* }
*/
public static final long pts_dts_delta$offset() {
return pts_dts_delta$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int pts_dts_delta
* }
*/
public static int pts_dts_delta(MemorySegment struct) {
return struct.get(pts_dts_delta$LAYOUT, pts_dts_delta$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int pts_dts_delta
* }
*/
public static void pts_dts_delta(MemorySegment struct, int fieldValue) {
struct.set(pts_dts_delta$LAYOUT, pts_dts_delta$OFFSET, fieldValue);
}
private static final SequenceLayout cur_frame_pos$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("cur_frame_pos"));
/**
* Layout for field:
* {@snippet lang=c :
* int64_t cur_frame_pos[4]
* }
*/
public static final SequenceLayout cur_frame_pos$layout() {
return cur_frame_pos$LAYOUT;
}
private static final long cur_frame_pos$OFFSET = 248;
/**
* Offset for field:
* {@snippet lang=c :
* int64_t cur_frame_pos[4]
* }
*/
public static final long cur_frame_pos$offset() {
return cur_frame_pos$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int64_t cur_frame_pos[4]
* }
*/
public static MemorySegment cur_frame_pos(MemorySegment struct) {
return struct.asSlice(cur_frame_pos$OFFSET, cur_frame_pos$LAYOUT.byteSize());
}
/**
* Setter for field:
* {@snippet lang=c :
* int64_t cur_frame_pos[4]
* }
*/
public static void cur_frame_pos(MemorySegment struct, MemorySegment fieldValue) {
MemorySegment.copy(fieldValue, 0L, struct, cur_frame_pos$OFFSET, cur_frame_pos$LAYOUT.byteSize());
}
private static long[] cur_frame_pos$DIMS = { 4 };
/**
* Dimensions for array field:
* {@snippet lang=c :
* int64_t cur_frame_pos[4]
* }
*/
public static long[] cur_frame_pos$dimensions() {
return cur_frame_pos$DIMS;
}
private static final VarHandle cur_frame_pos$ELEM_HANDLE = cur_frame_pos$LAYOUT.varHandle(sequenceElement());
/**
* Indexed getter for field:
* {@snippet lang=c :
* int64_t cur_frame_pos[4]
* }
*/
public static long cur_frame_pos(MemorySegment struct, long index0) {
return (long)cur_frame_pos$ELEM_HANDLE.get(struct, 0L, index0);
}
/**
* Indexed setter for field:
* {@snippet lang=c :
* int64_t cur_frame_pos[4]
* }
*/
public static void cur_frame_pos(MemorySegment struct, long index0, long fieldValue) {
cur_frame_pos$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
}
private static final OfLong pos$LAYOUT = (OfLong)$LAYOUT.select(groupElement("pos"));
/**
* Layout for field:
* {@snippet lang=c :
* int64_t pos
* }
*/
public static final OfLong pos$layout() {
return pos$LAYOUT;
}
private static final long pos$OFFSET = 280;
/**
* Offset for field:
* {@snippet lang=c :
* int64_t pos
* }
*/
public static final long pos$offset() {
return pos$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int64_t pos
* }
*/
public static long pos(MemorySegment struct) {
return struct.get(pos$LAYOUT, pos$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int64_t pos
* }
*/
public static void pos(MemorySegment struct, long fieldValue) {
struct.set(pos$LAYOUT, pos$OFFSET, fieldValue);
}
private static final OfLong last_pos$LAYOUT = (OfLong)$LAYOUT.select(groupElement("last_pos"));
/**
* Layout for field:
* {@snippet lang=c :
* int64_t last_pos
* }
*/
public static final OfLong last_pos$layout() {
return last_pos$LAYOUT;
}
private static final long last_pos$OFFSET = 288;
/**
* Offset for field:
* {@snippet lang=c :
* int64_t last_pos
* }
*/
public static final long last_pos$offset() {
return last_pos$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int64_t last_pos
* }
*/
public static long last_pos(MemorySegment struct) {
return struct.get(last_pos$LAYOUT, last_pos$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int64_t last_pos
* }
*/
public static void last_pos(MemorySegment struct, long fieldValue) {
struct.set(last_pos$LAYOUT, last_pos$OFFSET, fieldValue);
}
private static final OfInt duration$LAYOUT = (OfInt)$LAYOUT.select(groupElement("duration"));
/**
* Layout for field:
* {@snippet lang=c :
* int duration
* }
*/
public static final OfInt duration$layout() {
return duration$LAYOUT;
}
private static final long duration$OFFSET = 296;
/**
* Offset for field:
* {@snippet lang=c :
* int duration
* }
*/
public static final long duration$offset() {
return duration$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int duration
* }
*/
public static int duration(MemorySegment struct) {
return struct.get(duration$LAYOUT, duration$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int duration
* }
*/
public static void duration(MemorySegment struct, int fieldValue) {
struct.set(duration$LAYOUT, duration$OFFSET, fieldValue);
}
private static final OfInt field_order$LAYOUT = (OfInt)$LAYOUT.select(groupElement("field_order"));
/**
* Layout for field:
* {@snippet lang=c :
* enum AVFieldOrder field_order
* }
*/
public static final OfInt field_order$layout() {
return field_order$LAYOUT;
}
private static final long field_order$OFFSET = 300;
/**
* Offset for field:
* {@snippet lang=c :
* enum AVFieldOrder field_order
* }
*/
public static final long field_order$offset() {
return field_order$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* enum AVFieldOrder field_order
* }
*/
public static int field_order(MemorySegment struct) {
return struct.get(field_order$LAYOUT, field_order$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* enum AVFieldOrder field_order
* }
*/
public static void field_order(MemorySegment struct, int fieldValue) {
struct.set(field_order$LAYOUT, field_order$OFFSET, fieldValue);
}
private static final OfInt picture_structure$LAYOUT = (OfInt)$LAYOUT.select(groupElement("picture_structure"));
/**
* Layout for field:
* {@snippet lang=c :
* enum AVPictureStructure picture_structure
* }
*/
public static final OfInt picture_structure$layout() {
return picture_structure$LAYOUT;
}
private static final long picture_structure$OFFSET = 304;
/**
* Offset for field:
* {@snippet lang=c :
* enum AVPictureStructure picture_structure
* }
*/
public static final long picture_structure$offset() {
return picture_structure$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* enum AVPictureStructure picture_structure
* }
*/
public static int picture_structure(MemorySegment struct) {
return struct.get(picture_structure$LAYOUT, picture_structure$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* enum AVPictureStructure picture_structure
* }
*/
public static void picture_structure(MemorySegment struct, int fieldValue) {
struct.set(picture_structure$LAYOUT, picture_structure$OFFSET, fieldValue);
}
private static final OfInt output_picture_number$LAYOUT = (OfInt)$LAYOUT.select(groupElement("output_picture_number"));
/**
* Layout for field:
* {@snippet lang=c :
* int output_picture_number
* }
*/
public static final OfInt output_picture_number$layout() {
return output_picture_number$LAYOUT;
}
private static final long output_picture_number$OFFSET = 308;
/**
* Offset for field:
* {@snippet lang=c :
* int output_picture_number
* }
*/
public static final long output_picture_number$offset() {
return output_picture_number$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int output_picture_number
* }
*/
public static int output_picture_number(MemorySegment struct) {
return struct.get(output_picture_number$LAYOUT, output_picture_number$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int output_picture_number
* }
*/
public static void output_picture_number(MemorySegment struct, int fieldValue) {
struct.set(output_picture_number$LAYOUT, output_picture_number$OFFSET, fieldValue);
}
private static final OfInt width$LAYOUT = (OfInt)$LAYOUT.select(groupElement("width"));
/**
* Layout for field:
* {@snippet lang=c :
* int width
* }
*/
public static final OfInt width$layout() {
return width$LAYOUT;
}
private static final long width$OFFSET = 312;
/**
* Offset for field:
* {@snippet lang=c :
* int width
* }
*/
public static final long width$offset() {
return width$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int width
* }
*/
public static int width(MemorySegment struct) {
return struct.get(width$LAYOUT, width$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int width
* }
*/
public static void width(MemorySegment struct, int fieldValue) {
struct.set(width$LAYOUT, width$OFFSET, fieldValue);
}
private static final OfInt height$LAYOUT = (OfInt)$LAYOUT.select(groupElement("height"));
/**
* Layout for field:
* {@snippet lang=c :
* int height
* }
*/
public static final OfInt height$layout() {
return height$LAYOUT;
}
private static final long height$OFFSET = 316;
/**
* Offset for field:
* {@snippet lang=c :
* int height
* }
*/
public static final long height$offset() {
return height$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int height
* }
*/
public static int height(MemorySegment struct) {
return struct.get(height$LAYOUT, height$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int height
* }
*/
public static void height(MemorySegment struct, int fieldValue) {
struct.set(height$LAYOUT, height$OFFSET, fieldValue);
}
private static final OfInt coded_width$LAYOUT = (OfInt)$LAYOUT.select(groupElement("coded_width"));
/**
* Layout for field:
* {@snippet lang=c :
* int coded_width
* }
*/
public static final OfInt coded_width$layout() {
return coded_width$LAYOUT;
}
private static final long coded_width$OFFSET = 320;
/**
* Offset for field:
* {@snippet lang=c :
* int coded_width
* }
*/
public static final long coded_width$offset() {
return coded_width$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int coded_width
* }
*/
public static int coded_width(MemorySegment struct) {
return struct.get(coded_width$LAYOUT, coded_width$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int coded_width
* }
*/
public static void coded_width(MemorySegment struct, int fieldValue) {
struct.set(coded_width$LAYOUT, coded_width$OFFSET, fieldValue);
}
private static final OfInt coded_height$LAYOUT = (OfInt)$LAYOUT.select(groupElement("coded_height"));
/**
* Layout for field:
* {@snippet lang=c :
* int coded_height
* }
*/
public static final OfInt coded_height$layout() {
return coded_height$LAYOUT;
}
private static final long coded_height$OFFSET = 324;
/**
* Offset for field:
* {@snippet lang=c :
* int coded_height
* }
*/
public static final long coded_height$offset() {
return coded_height$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int coded_height
* }
*/
public static int coded_height(MemorySegment struct) {
return struct.get(coded_height$LAYOUT, coded_height$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int coded_height
* }
*/
public static void coded_height(MemorySegment struct, int fieldValue) {
struct.set(coded_height$LAYOUT, coded_height$OFFSET, fieldValue);
}
private static final OfInt format$LAYOUT = (OfInt)$LAYOUT.select(groupElement("format"));
/**
* Layout for field:
* {@snippet lang=c :
* int format
* }
*/
public static final OfInt format$layout() {
return format$LAYOUT;
}
private static final long format$OFFSET = 328;
/**
* Offset for field:
* {@snippet lang=c :
* int format
* }
*/
public static final long format$offset() {
return format$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* int format
* }
*/
public static int format(MemorySegment struct) {
return struct.get(format$LAYOUT, format$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* int format
* }
*/
public static void format(MemorySegment struct, int fieldValue) {
struct.set(format$LAYOUT, format$OFFSET, fieldValue);
}
/**
* Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
* The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
*/
public static MemorySegment asSlice(MemorySegment array, long index) {
return array.asSlice(layout().byteSize() * index);
}
/**
* The size (in bytes) of this struct
*/
public static long sizeof() { return layout().byteSize(); }
/**
* Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
*/
public static MemorySegment allocate(SegmentAllocator allocator) {
return allocator.allocate(layout());
}
/**
* Allocate an array of size {@code elementCount} using {@code allocator}.
* The returned segment has size {@code elementCount * layout().byteSize()}.
*/
public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
return reinterpret(addr, 1, arena, cleanup);
}
/**
* Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
* The returned segment has size {@code elementCount * layout().byteSize()}
*/
public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
}
}