Package org.freedesktop.gstreamer.audio
Class AudioFormatInfo
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.freedesktop.gstreamer.audio.AudioFormatInfo
-
Constructor Summary
ConstructorDescriptionAllocate a new AudioFormatInfo.AudioFormatInfo
(Arena arena) Allocate a new AudioFormatInfo.AudioFormatInfo
(MemorySegment address) Create a AudioFormatInfo proxy instance for the provided memory address.AudioFormatInfo
(AudioFormat format, String name, String description, Set<AudioFormatFlags> flags, int endianness, int width, int depth, byte[] silence, AudioFormat unpackFormat, AudioFormatUnpack unpackFunc, AudioFormatPack packFunc) Allocate a new AudioFormatInfo with the fields set to the provided values.AudioFormatInfo
(AudioFormat format, String name, String description, Set<AudioFormatFlags> flags, int endianness, int width, int depth, byte[] silence, AudioFormat unpackFormat, AudioFormatUnpack unpackFunc, AudioFormatPack packFunc, Arena arena) Allocate a new AudioFormatInfo with the fields set to the provided values. -
Method Summary
Modifier and TypeMethodDescriptionvoid
fillSilence
(byte[] dest) Filllength
bytes indest
with silence samples for this AudioFormatInfo.static MemoryLayout
The memory layout of the native struct.static Type
getType()
Get the GType of the AudioFormatInfo classint
Read the value of the fielddepth
.Read the value of the fielddescription
.int
Read the value of the fieldendianness
.Read the value of the fieldflags
.Read the value of the fieldformat
.readName()
Read the value of the fieldname
.Read the value of the fieldpack_func
.byte[]
Read the value of the fieldsilence
.Read the value of the fieldunpack_format
.Read the value of the fieldunpack_func
.int
Read the value of the fieldwidth
.void
writeDepth
(int depth) Write a value in the fielddepth
.void
writeDescription
(String description, Arena _arena) Write a value in the fielddescription
.void
writeEndianness
(int endianness) Write a value in the fieldendianness
.void
writeFlags
(Set<AudioFormatFlags> flags) Write a value in the fieldflags
.void
writeFormat
(AudioFormat format) Write a value in the fieldformat
.void
Write a value in the fieldname
.void
writePackFunc
(AudioFormatPack packFunc, Arena _arena) Write a value in the fieldpack_func
.void
writeSilence
(byte[] silence, Arena _arena) Write a value in the fieldsilence
.void
writeUnpackFormat
(AudioFormat unpackFormat) Write a value in the fieldunpack_format
.void
writeUnpackFunc
(AudioFormatUnpack unpackFunc, Arena _arena) Write a value in the fieldunpack_func
.void
writeWidth
(int width) Write a value in the fieldwidth
.Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
AudioFormatInfo
Create a AudioFormatInfo proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
AudioFormatInfo
Allocate a new AudioFormatInfo.- Parameters:
arena
- to control the memory allocation scope
-
AudioFormatInfo
public AudioFormatInfo()Allocate a new AudioFormatInfo. The memory is allocated withArena.ofAuto()
. -
AudioFormatInfo
public AudioFormatInfo(AudioFormat format, String name, String description, Set<AudioFormatFlags> flags, int endianness, int width, int depth, byte[] silence, AudioFormat unpackFormat, AudioFormatUnpack unpackFunc, AudioFormatPack packFunc, Arena arena) Allocate a new AudioFormatInfo with the fields set to the provided values.- Parameters:
format
- value for the fieldformat
name
- value for the fieldname
description
- value for the fielddescription
flags
- value for the fieldflags
endianness
- value for the fieldendianness
width
- value for the fieldwidth
depth
- value for the fielddepth
silence
- value for the fieldsilence
unpackFormat
- value for the fieldunpackFormat
unpackFunc
- value for the fieldunpackFunc
packFunc
- value for the fieldpackFunc
arena
- to control the memory allocation scope
-
AudioFormatInfo
public AudioFormatInfo(AudioFormat format, String name, String description, Set<AudioFormatFlags> flags, int endianness, int width, int depth, byte[] silence, AudioFormat unpackFormat, AudioFormatUnpack unpackFunc, AudioFormatPack packFunc) Allocate a new AudioFormatInfo with the fields set to the provided values. The memory is allocated withArena.ofAuto()
.- Parameters:
format
- value for the fieldformat
name
- value for the fieldname
description
- value for the fielddescription
flags
- value for the fieldflags
endianness
- value for the fieldendianness
width
- value for the fieldwidth
depth
- value for the fielddepth
silence
- value for the fieldsilence
unpackFormat
- value for the fieldunpackFormat
unpackFunc
- value for the fieldunpackFunc
packFunc
- value for the fieldpackFunc
-
-
Method Details
-
getType
-
getMemoryLayout
The memory layout of the native struct.- Returns:
- the memory layout
-
readFormat
Read the value of the fieldformat
.- Returns:
- The value of the field
format
-
writeFormat
Write a value in the fieldformat
.- Parameters:
format
- The new value for the fieldformat
-
readName
-
writeName
-
readDescription
Read the value of the fielddescription
.- Returns:
- The value of the field
description
-
writeDescription
-
readFlags
Read the value of the fieldflags
.- Returns:
- The value of the field
flags
-
writeFlags
Write a value in the fieldflags
.- Parameters:
flags
- The new value for the fieldflags
-
readEndianness
public int readEndianness()Read the value of the fieldendianness
.- Returns:
- The value of the field
endianness
-
writeEndianness
public void writeEndianness(int endianness) Write a value in the fieldendianness
.- Parameters:
endianness
- The new value for the fieldendianness
-
readWidth
public int readWidth()Read the value of the fieldwidth
.- Returns:
- The value of the field
width
-
writeWidth
public void writeWidth(int width) Write a value in the fieldwidth
.- Parameters:
width
- The new value for the fieldwidth
-
readDepth
public int readDepth()Read the value of the fielddepth
.- Returns:
- The value of the field
depth
-
writeDepth
public void writeDepth(int depth) Write a value in the fielddepth
.- Parameters:
depth
- The new value for the fielddepth
-
readSilence
public byte[] readSilence()Read the value of the fieldsilence
.- Returns:
- The value of the field
silence
-
writeSilence
Write a value in the fieldsilence
.- Parameters:
silence
- The new value for the fieldsilence
_arena
- to control the memory allocation scope
-
readUnpackFormat
Read the value of the fieldunpack_format
.- Returns:
- The value of the field
unpack_format
-
writeUnpackFormat
Write a value in the fieldunpack_format
.- Parameters:
unpackFormat
- The new value for the fieldunpack_format
-
readUnpackFunc
Read the value of the fieldunpack_func
.- Returns:
- The value of the field
unpack_func
-
writeUnpackFunc
Write a value in the fieldunpack_func
.- Parameters:
unpackFunc
- The new value for the fieldunpack_func
_arena
- to control the memory allocation scope
-
readPackFunc
Read the value of the fieldpack_func
.- Returns:
- The value of the field
pack_func
-
writePackFunc
Write a value in the fieldpack_func
.- Parameters:
packFunc
- The new value for the fieldpack_func
_arena
- to control the memory allocation scope
-
fillSilence
public void fillSilence(byte[] dest) Filllength
bytes indest
with silence samples for this AudioFormatInfo.- Parameters:
dest
- a destination to fill
-