Class VkVideoEncodeRateControlInfoKHR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkVideoEncodeRateControlInfoKHR
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkVideoEncodeRateControlInfoKHR extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure to set encode stream rate control parameters.Description
In order to provide video encode stream rate control settings, add a
VkVideoEncodeRateControlInfoKHRstructure to thepNextchain of theVkVideoCodingControlInfoKHRstructure passed to theCmdControlVideoCodingKHRcommand.A codec-specific extension structure for further encode stream rate control parameter settings may be chained to
VkVideoEncodeRateControlInfoKHR.To ensure that the video session is properly initalized with stream-level rate control settings, the application must call
CmdControlVideoCodingKHRwith stream-level rate control settings at least once in execution order before the firstCmdEncodeVideoKHRcommand that is executed after video session reset. If not provided, default implementation-specific stream rate control settings will be used.Stream rate control settings can also be re-initialized during an active video encoding session. The re-initialization takes effect whenever the
VkVideoEncodeRateControlInfoKHRstructure is included in thepNextchain of theVkVideoCodingControlInfoKHRstructure in the call toCmdControlVideoCodingKHR, and only impactsCmdEncodeVideoKHRoperations that follow in execution order.Valid Usage
VkVideoEncodeH264RateControlInfoEXTmust be included in thepNextchain ofVkVideoEncodeRateControlInfoKHRif and only ifVkVideoEncodeRateControlInfoKHR::rateControlModeis notVIDEO_ENCODE_RATE_CONTROL_MODE_NONE_BIT_KHRand the bound video session was created withVkVideoProfileKHR::videoCodecOperationset toVIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT.- If
VkVideoEncodeRateControlInfoKHR::layerCountis greater than 1, thenVkVideoEncodeH264RateControlInfoEXT::temporalLayerCountmust be equal tolayerCount. VkVideoEncodeH265RateControlInfoEXTmust be included in thepNextchain ofVkVideoEncodeRateControlInfoKHRif and only ifVkVideoEncodeRateControlInfoKHR::rateControlModeis notVIDEO_ENCODE_RATE_CONTROL_MODE_NONE_BIT_KHRand the bound video session was created withVkVideoProfileKHR::videoCodecOperationset toVIDEO_CODEC_OPERATION_ENCODE_H265_BIT_EXT.- If
VkVideoEncodeRateControlInfoKHR::layerCountis greater than 1, thenVkVideoEncodeH265RateControlInfoEXT::subLayerCountmust be equal tolayerCount.
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHRrateControlModemust be a validVkVideoEncodeRateControlModeFlagBitsKHRvaluepLayerConfigsmust be a valid pointer to an array oflayerCountvalidVkVideoEncodeRateControlLayerInfoKHRstructureslayerCountmust be greater than 0
See Also
VkVideoEncodeRateControlLayerInfoKHRLayout
struct VkVideoEncodeRateControlInfoKHR { VkStructureTypesType(); void const *pNext(); VkVideoEncodeRateControlFlagsKHRflags(); VkVideoEncodeRateControlModeFlagBitsKHRrateControlMode(); uint8_tlayerCount();VkVideoEncodeRateControlLayerInfoKHRconst *pLayerConfigs(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkVideoEncodeRateControlInfoKHR.BufferAn array ofVkVideoEncodeRateControlInfoKHRstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intFLAGS
LAYERCOUNT
PLAYERCONFIGS
PNEXT
RATECONTROLMODEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkVideoEncodeRateControlInfoKHR(java.nio.ByteBuffer container)Creates aVkVideoEncodeRateControlInfoKHRinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkVideoEncodeRateControlInfoKHRcalloc()Returns a newVkVideoEncodeRateControlInfoKHRinstance allocated withmemCalloc.static VkVideoEncodeRateControlInfoKHR.Buffercalloc(int capacity)Returns a newVkVideoEncodeRateControlInfoKHR.Bufferinstance allocated withmemCalloc.static VkVideoEncodeRateControlInfoKHR.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkVideoEncodeRateControlInfoKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkVideoEncodeRateControlInfoKHRcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkVideoEncodeRateControlInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkVideoEncodeRateControlInfoKHRcreate()Returns a newVkVideoEncodeRateControlInfoKHRinstance allocated withBufferUtils.static VkVideoEncodeRateControlInfoKHR.Buffercreate(int capacity)Returns a newVkVideoEncodeRateControlInfoKHR.Bufferinstance allocated withBufferUtils.static VkVideoEncodeRateControlInfoKHRcreate(long address)Returns a newVkVideoEncodeRateControlInfoKHRinstance for the specified memory address.static VkVideoEncodeRateControlInfoKHR.Buffercreate(long address, int capacity)Create aVkVideoEncodeRateControlInfoKHR.Bufferinstance at the specified memory.static VkVideoEncodeRateControlInfoKHRcreateSafe(long address)static VkVideoEncodeRateControlInfoKHR.BuffercreateSafe(long address, int capacity)intflags()a bitmask ofVkVideoEncodeRateControlFlagBitsKHRspecifying encode rate control flags.VkVideoEncodeRateControlInfoKHRflags(int value)Sets the specified value to theflags()field.bytelayerCount()specifies the number of rate control layers in the video encode stream.static VkVideoEncodeRateControlInfoKHRmalloc()Returns a newVkVideoEncodeRateControlInfoKHRinstance allocated withmemAlloc.static VkVideoEncodeRateControlInfoKHR.Buffermalloc(int capacity)Returns a newVkVideoEncodeRateControlInfoKHR.Bufferinstance allocated withmemAlloc.static VkVideoEncodeRateControlInfoKHR.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkVideoEncodeRateControlInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.static VkVideoEncodeRateControlInfoKHRmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkVideoEncodeRateControlInfoKHRinstance allocated on the specifiedMemoryStack.static intnflags(long struct)Unsafe version offlags().static voidnflags(long struct, int value)Unsafe version offlags.static bytenlayerCount(long struct)Unsafe version oflayerCount().static voidnlayerCount(long struct, byte value)Sets the specified value to thelayerCountfield of the specifiedstruct.static VkVideoEncodeRateControlLayerInfoKHR.BuffernpLayerConfigs(long struct)Unsafe version ofpLayerConfigs().static voidnpLayerConfigs(long struct, VkVideoEncodeRateControlLayerInfoKHR.Buffer value)Unsafe version ofpLayerConfigs.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static intnrateControlMode(long struct)Unsafe version ofrateControlMode().static voidnrateControlMode(long struct, int value)Unsafe version ofrateControlMode.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.VkVideoEncodeRateControlLayerInfoKHR.BufferpLayerConfigs()a pointer to an array ofVkVideoEncodeRateControlLayerInfoKHRstructures specifying the rate control configurations oflayerCountrate control layers.VkVideoEncodeRateControlInfoKHRpLayerConfigs(VkVideoEncodeRateControlLayerInfoKHR.Buffer value)Sets the address of the specifiedVkVideoEncodeRateControlLayerInfoKHR.Bufferto thepLayerConfigs()field.longpNext()NULLor a pointer to a structure extending this structure.VkVideoEncodeRateControlInfoKHRpNext(long value)Sets the specified value to thepNext()field.VkVideoEncodeRateControlInfoKHRpNext(VkVideoEncodeH264RateControlInfoEXT value)Prepends the specifiedVkVideoEncodeH264RateControlInfoEXTvalue to thepNextchain.VkVideoEncodeRateControlInfoKHRpNext(VkVideoEncodeH265RateControlInfoEXT value)Prepends the specifiedVkVideoEncodeH265RateControlInfoEXTvalue to thepNextchain.intrateControlMode()aVkVideoEncodeRateControlModeFlagBitsKHRvalue specifying the encode stream rate control mode.VkVideoEncodeRateControlInfoKHRrateControlMode(int value)Sets the specified value to therateControlMode()field.VkVideoEncodeRateControlInfoKHRset(int sType, long pNext, int flags, int rateControlMode, VkVideoEncodeRateControlLayerInfoKHR.Buffer pLayerConfigs)Initializes this struct with the specified values.VkVideoEncodeRateControlInfoKHRset(VkVideoEncodeRateControlInfoKHR src)Copies the specified struct data to this struct.intsizeof()intsType()the type of this structure.VkVideoEncodeRateControlInfoKHRsType(int value)Sets the specified value to thesType()field.VkVideoEncodeRateControlInfoKHRsType$Default()Sets theSTRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHRvalue to thesType()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
VkVideoEncodeRateControlInfoKHR
public VkVideoEncodeRateControlInfoKHR(java.nio.ByteBuffer container)
Creates aVkVideoEncodeRateControlInfoKHRinstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
sType
public int sType()
the type of this structure.
-
pNext
public long pNext()
NULLor a pointer to a structure extending this structure.
-
flags
public int flags()
a bitmask ofVkVideoEncodeRateControlFlagBitsKHRspecifying encode rate control flags.
-
rateControlMode
public int rateControlMode()
aVkVideoEncodeRateControlModeFlagBitsKHRvalue specifying the encode stream rate control mode.
-
layerCount
public byte layerCount()
specifies the number of rate control layers in the video encode stream.
-
pLayerConfigs
public VkVideoEncodeRateControlLayerInfoKHR.Buffer pLayerConfigs()
a pointer to an array ofVkVideoEncodeRateControlLayerInfoKHRstructures specifying the rate control configurations oflayerCountrate control layers.
-
sType
public VkVideoEncodeRateControlInfoKHR sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkVideoEncodeRateControlInfoKHR sType$Default()
Sets theSTRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHRvalue to thesType()field.
-
pNext
public VkVideoEncodeRateControlInfoKHR pNext(long value)
Sets the specified value to thepNext()field.
-
pNext
public VkVideoEncodeRateControlInfoKHR pNext(VkVideoEncodeH264RateControlInfoEXT value)
Prepends the specifiedVkVideoEncodeH264RateControlInfoEXTvalue to thepNextchain.
-
pNext
public VkVideoEncodeRateControlInfoKHR pNext(VkVideoEncodeH265RateControlInfoEXT value)
Prepends the specifiedVkVideoEncodeH265RateControlInfoEXTvalue to thepNextchain.
-
flags
public VkVideoEncodeRateControlInfoKHR flags(int value)
Sets the specified value to theflags()field.
-
rateControlMode
public VkVideoEncodeRateControlInfoKHR rateControlMode(int value)
Sets the specified value to therateControlMode()field.
-
pLayerConfigs
public VkVideoEncodeRateControlInfoKHR pLayerConfigs(VkVideoEncodeRateControlLayerInfoKHR.Buffer value)
Sets the address of the specifiedVkVideoEncodeRateControlLayerInfoKHR.Bufferto thepLayerConfigs()field.
-
set
public VkVideoEncodeRateControlInfoKHR set(int sType, long pNext, int flags, int rateControlMode, VkVideoEncodeRateControlLayerInfoKHR.Buffer pLayerConfigs)
Initializes this struct with the specified values.
-
set
public VkVideoEncodeRateControlInfoKHR set(VkVideoEncodeRateControlInfoKHR src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkVideoEncodeRateControlInfoKHR malloc()
Returns a newVkVideoEncodeRateControlInfoKHRinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkVideoEncodeRateControlInfoKHR calloc()
Returns a newVkVideoEncodeRateControlInfoKHRinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkVideoEncodeRateControlInfoKHR create()
Returns a newVkVideoEncodeRateControlInfoKHRinstance allocated withBufferUtils.
-
create
public static VkVideoEncodeRateControlInfoKHR create(long address)
Returns a newVkVideoEncodeRateControlInfoKHRinstance for the specified memory address.
-
createSafe
@Nullable public static VkVideoEncodeRateControlInfoKHR createSafe(long address)
-
malloc
public static VkVideoEncodeRateControlInfoKHR.Buffer malloc(int capacity)
Returns a newVkVideoEncodeRateControlInfoKHR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkVideoEncodeRateControlInfoKHR.Buffer calloc(int capacity)
Returns a newVkVideoEncodeRateControlInfoKHR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkVideoEncodeRateControlInfoKHR.Buffer create(int capacity)
Returns a newVkVideoEncodeRateControlInfoKHR.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkVideoEncodeRateControlInfoKHR.Buffer create(long address, int capacity)
Create aVkVideoEncodeRateControlInfoKHR.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkVideoEncodeRateControlInfoKHR.Buffer createSafe(long address, int capacity)
-
malloc
public static VkVideoEncodeRateControlInfoKHR malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkVideoEncodeRateControlInfoKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkVideoEncodeRateControlInfoKHR calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkVideoEncodeRateControlInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkVideoEncodeRateControlInfoKHR.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkVideoEncodeRateControlInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkVideoEncodeRateControlInfoKHR.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkVideoEncodeRateControlInfoKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nsType
public static int nsType(long struct)
Unsafe version ofsType().
-
npNext
public static long npNext(long struct)
Unsafe version ofpNext().
-
nflags
public static int nflags(long struct)
Unsafe version offlags().
-
nrateControlMode
public static int nrateControlMode(long struct)
Unsafe version ofrateControlMode().
-
nlayerCount
public static byte nlayerCount(long struct)
Unsafe version oflayerCount().
-
npLayerConfigs
public static VkVideoEncodeRateControlLayerInfoKHR.Buffer npLayerConfigs(long struct)
Unsafe version ofpLayerConfigs().
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
nflags
public static void nflags(long struct, int value)Unsafe version offlags.
-
nrateControlMode
public static void nrateControlMode(long struct, int value)Unsafe version ofrateControlMode.
-
nlayerCount
public static void nlayerCount(long struct, byte value)Sets the specified value to thelayerCountfield of the specifiedstruct.
-
npLayerConfigs
public static void npLayerConfigs(long struct, VkVideoEncodeRateControlLayerInfoKHR.Buffer value)Unsafe version ofpLayerConfigs.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-