com.nextbreakpoint.ffmpeg4java.AVOutputFormat 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 AVOutputFormat {
* char *name;
* char *long_name;
* char *mime_type;
* char *extensions;
* enum AVCodecID audio_codec;
* enum AVCodecID video_codec;
* enum AVCodecID subtitle_codec;
* int flags;
* struct AVCodecTag **codec_tag;
* AVClass *priv_class;
* }
* }
*/
public class AVOutputFormat {
AVOutputFormat() {
// Should not be called directly
}
private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
Libffmpeg.C_POINTER.withName("name"),
Libffmpeg.C_POINTER.withName("long_name"),
Libffmpeg.C_POINTER.withName("mime_type"),
Libffmpeg.C_POINTER.withName("extensions"),
Libffmpeg.C_INT.withName("audio_codec"),
Libffmpeg.C_INT.withName("video_codec"),
Libffmpeg.C_INT.withName("subtitle_codec"),
Libffmpeg.C_INT.withName("flags"),
Libffmpeg.C_POINTER.withName("codec_tag"),
Libffmpeg.C_POINTER.withName("priv_class")
).withName("AVOutputFormat");
/**
* The layout of this struct
*/
public static final GroupLayout layout() {
return $LAYOUT;
}
private static final AddressLayout name$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("name"));
/**
* Layout for field:
* {@snippet lang=c :
* char *name
* }
*/
public static final AddressLayout name$layout() {
return name$LAYOUT;
}
private static final long name$OFFSET = 0;
/**
* Offset for field:
* {@snippet lang=c :
* char *name
* }
*/
public static final long name$offset() {
return name$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* char *name
* }
*/
public static MemorySegment name(MemorySegment struct) {
return struct.get(name$LAYOUT, name$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* char *name
* }
*/
public static void name(MemorySegment struct, MemorySegment fieldValue) {
struct.set(name$LAYOUT, name$OFFSET, fieldValue);
}
private static final AddressLayout long_name$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("long_name"));
/**
* Layout for field:
* {@snippet lang=c :
* char *long_name
* }
*/
public static final AddressLayout long_name$layout() {
return long_name$LAYOUT;
}
private static final long long_name$OFFSET = 8;
/**
* Offset for field:
* {@snippet lang=c :
* char *long_name
* }
*/
public static final long long_name$offset() {
return long_name$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* char *long_name
* }
*/
public static MemorySegment long_name(MemorySegment struct) {
return struct.get(long_name$LAYOUT, long_name$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* char *long_name
* }
*/
public static void long_name(MemorySegment struct, MemorySegment fieldValue) {
struct.set(long_name$LAYOUT, long_name$OFFSET, fieldValue);
}
private static final AddressLayout mime_type$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("mime_type"));
/**
* Layout for field:
* {@snippet lang=c :
* char *mime_type
* }
*/
public static final AddressLayout mime_type$layout() {
return mime_type$LAYOUT;
}
private static final long mime_type$OFFSET = 16;
/**
* Offset for field:
* {@snippet lang=c :
* char *mime_type
* }
*/
public static final long mime_type$offset() {
return mime_type$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* char *mime_type
* }
*/
public static MemorySegment mime_type(MemorySegment struct) {
return struct.get(mime_type$LAYOUT, mime_type$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* char *mime_type
* }
*/
public static void mime_type(MemorySegment struct, MemorySegment fieldValue) {
struct.set(mime_type$LAYOUT, mime_type$OFFSET, fieldValue);
}
private static final AddressLayout extensions$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("extensions"));
/**
* Layout for field:
* {@snippet lang=c :
* char *extensions
* }
*/
public static final AddressLayout extensions$layout() {
return extensions$LAYOUT;
}
private static final long extensions$OFFSET = 24;
/**
* Offset for field:
* {@snippet lang=c :
* char *extensions
* }
*/
public static final long extensions$offset() {
return extensions$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* char *extensions
* }
*/
public static MemorySegment extensions(MemorySegment struct) {
return struct.get(extensions$LAYOUT, extensions$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* char *extensions
* }
*/
public static void extensions(MemorySegment struct, MemorySegment fieldValue) {
struct.set(extensions$LAYOUT, extensions$OFFSET, fieldValue);
}
private static final OfInt audio_codec$LAYOUT = (OfInt)$LAYOUT.select(groupElement("audio_codec"));
/**
* Layout for field:
* {@snippet lang=c :
* enum AVCodecID audio_codec
* }
*/
public static final OfInt audio_codec$layout() {
return audio_codec$LAYOUT;
}
private static final long audio_codec$OFFSET = 32;
/**
* Offset for field:
* {@snippet lang=c :
* enum AVCodecID audio_codec
* }
*/
public static final long audio_codec$offset() {
return audio_codec$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* enum AVCodecID audio_codec
* }
*/
public static int audio_codec(MemorySegment struct) {
return struct.get(audio_codec$LAYOUT, audio_codec$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* enum AVCodecID audio_codec
* }
*/
public static void audio_codec(MemorySegment struct, int fieldValue) {
struct.set(audio_codec$LAYOUT, audio_codec$OFFSET, fieldValue);
}
private static final OfInt video_codec$LAYOUT = (OfInt)$LAYOUT.select(groupElement("video_codec"));
/**
* Layout for field:
* {@snippet lang=c :
* enum AVCodecID video_codec
* }
*/
public static final OfInt video_codec$layout() {
return video_codec$LAYOUT;
}
private static final long video_codec$OFFSET = 36;
/**
* Offset for field:
* {@snippet lang=c :
* enum AVCodecID video_codec
* }
*/
public static final long video_codec$offset() {
return video_codec$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* enum AVCodecID video_codec
* }
*/
public static int video_codec(MemorySegment struct) {
return struct.get(video_codec$LAYOUT, video_codec$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* enum AVCodecID video_codec
* }
*/
public static void video_codec(MemorySegment struct, int fieldValue) {
struct.set(video_codec$LAYOUT, video_codec$OFFSET, fieldValue);
}
private static final OfInt subtitle_codec$LAYOUT = (OfInt)$LAYOUT.select(groupElement("subtitle_codec"));
/**
* Layout for field:
* {@snippet lang=c :
* enum AVCodecID subtitle_codec
* }
*/
public static final OfInt subtitle_codec$layout() {
return subtitle_codec$LAYOUT;
}
private static final long subtitle_codec$OFFSET = 40;
/**
* Offset for field:
* {@snippet lang=c :
* enum AVCodecID subtitle_codec
* }
*/
public static final long subtitle_codec$offset() {
return subtitle_codec$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* enum AVCodecID subtitle_codec
* }
*/
public static int subtitle_codec(MemorySegment struct) {
return struct.get(subtitle_codec$LAYOUT, subtitle_codec$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* enum AVCodecID subtitle_codec
* }
*/
public static void subtitle_codec(MemorySegment struct, int fieldValue) {
struct.set(subtitle_codec$LAYOUT, subtitle_codec$OFFSET, 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 = 44;
/**
* 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 AddressLayout codec_tag$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("codec_tag"));
/**
* Layout for field:
* {@snippet lang=c :
* struct AVCodecTag **codec_tag
* }
*/
public static final AddressLayout codec_tag$layout() {
return codec_tag$LAYOUT;
}
private static final long codec_tag$OFFSET = 48;
/**
* Offset for field:
* {@snippet lang=c :
* struct AVCodecTag **codec_tag
* }
*/
public static final long codec_tag$offset() {
return codec_tag$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* struct AVCodecTag **codec_tag
* }
*/
public static MemorySegment codec_tag(MemorySegment struct) {
return struct.get(codec_tag$LAYOUT, codec_tag$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* struct AVCodecTag **codec_tag
* }
*/
public static void codec_tag(MemorySegment struct, MemorySegment fieldValue) {
struct.set(codec_tag$LAYOUT, codec_tag$OFFSET, fieldValue);
}
private static final AddressLayout priv_class$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("priv_class"));
/**
* Layout for field:
* {@snippet lang=c :
* AVClass *priv_class
* }
*/
public static final AddressLayout priv_class$layout() {
return priv_class$LAYOUT;
}
private static final long priv_class$OFFSET = 56;
/**
* Offset for field:
* {@snippet lang=c :
* AVClass *priv_class
* }
*/
public static final long priv_class$offset() {
return priv_class$OFFSET;
}
/**
* Getter for field:
* {@snippet lang=c :
* AVClass *priv_class
* }
*/
public static MemorySegment priv_class(MemorySegment struct) {
return struct.get(priv_class$LAYOUT, priv_class$OFFSET);
}
/**
* Setter for field:
* {@snippet lang=c :
* AVClass *priv_class
* }
*/
public static void priv_class(MemorySegment struct, MemorySegment fieldValue) {
struct.set(priv_class$LAYOUT, priv_class$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);
}
}