GstVulkan.VulkanInstance¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w |
Major version of the requested Vulkan API (0 = maximum supported) |
||
r/w |
Minor version of the requested Vulkan API |
Signals¶
- Inherited:
Name |
Short Description |
|---|---|
Overrides the |
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
|---|---|---|---|
instance |
r |
the Vulkan instance handle |
|
n_physical_devices |
r |
||
parent |
r |
parent |
|
physical_devices |
r |
list of vulkan physical device handles |
Class Details¶
- class GstVulkan.VulkanInstance(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
New in version 1.18.
- classmethod handle_context_query(element, query, instance)¶
- Parameters:
element (
Gst.Element) – aGst.Elementquery (
Gst.Query) – aGst.Queryof typeGst.QueryType.CONTEXTinstance (
GstVulkan.VulkanInstanceorNone) – theGstVulkan.VulkanInstance
- Returns:
whether query was responded to with instance
- Return type:
If a
GstVulkan.VulkanInstanceis requested in query, sets instance as the reply.Intended for use with element query handlers to respond to
Gst.QueryType.CONTEXTfor aGstVulkan.VulkanInstance.New in version 1.18.
- classmethod new()¶
- Returns:
a new uninitialized
GstVulkan.VulkanInstance- Return type:
New in version 1.18.
- classmethod run_context_query(element, instance)¶
- Parameters:
element (
Gst.Element) – aGst.Elementinstance (
GstVulkan.VulkanInstance) – aGstVulkan.VulkanInstance
- Returns:
whether instance contains a valid
GstVulkan.VulkanInstance- instance:
- Return type:
(
bool, instance:GstVulkan.VulkanInstance)
Attempt to retrieve a
GstVulkan.VulkanInstanceusingGst.QueryType.CONTEXTfrom the surrounding elements of element.New in version 1.18.
- check_api_version(major, minor, patch)¶
- Parameters:
- Returns:
whether the
GstVulkan.VulkanInstancesupports the version specified by major, minor and patch.- Return type:
New in version 1.26.
- check_version(major, minor, patch)¶
- Parameters:
- Returns:
whether self is at least the requested version.
- Return type:
Check if the configured vulkan instance supports the specified version. Will not work prior to opening the instance with
GstVulkan.VulkanInstance.open(). If a specific version is requested, the patch level is ignored.New in version 1.18.
- create_device()¶
- Raises:
- Returns:
a new
GstVulkan.VulkanDevice- Return type:
New in version 1.18.
- create_device_with_index(device_index)¶
- Parameters:
device_index (
int) – the device index to create the newGstVulkan.VulkanDevicefrom- Raises:
- Returns:
a new
GstVulkan.VulkanDevice- Return type:
New in version 1.26.
- disable_extension(name)¶
- Parameters:
name (
str) – extension name to enable- Returns:
whether the Vulkan extension could be disabled.
- Return type:
Disable an Vulkan extension by name. Disabling an extension will only have an effect before the call to
GstVulkan.VulkanInstance.open().New in version 1.18.
- enable_extension(name)¶
- Parameters:
name (
str) – extension name to enable- Returns:
whether the Vulkan extension could be enabled.
- Return type:
Enable an Vulkan extension by name. Extensions cannot be enabled until
GstVulkan.VulkanInstance.fill_info() has been called. Enabling an extension will only have an effect before the call toGstVulkan.VulkanInstance.open().New in version 1.18.
- enable_layer(name)¶
- Parameters:
name (
str) – layer name to enable- Returns:
whether the Vulkan layer could be enabled.
- Return type:
Enable an Vulkan layer by name. Layer cannot be enabled until
GstVulkan.VulkanInstance.fill_info() has been called. Enabling a layer will only have an effect before the call toGstVulkan.VulkanInstance.open().New in version 1.18.
- fill_info()¶
- Raises:
- Returns:
whether the instance information could be retrieved
- Return type:
Retrieve as much information about the available Vulkan instance without actually creating an Vulkan instance. Will not do anything while self is open.
New in version 1.18.
- get_api_version()¶
- Returns:
- major:
major version
- minor:
minor version
- patch:
patch version
- Return type:
Returns the vulkan API version configured when constructing the
GstVulkan.VulkanInstance. This value can be any valid Vulkan API version and may not matchGstVulkan.VulkanInstance.get_version() in any way. This version is the maximum allowed vulkan API to be used in any capacity.This will not return valid values until
GstVulkan.VulkanInstance.open() has been called.New in version 1.26.
- get_extension_info(name)¶
- Parameters:
name (
str) – the layer name to look for- Returns:
whether extension name is available
- spec_version:
return value for the layer specification version
- Return type:
Retrieves information about an extension.
Will not find any extensions before
GstVulkan.VulkanInstance.fill_info() has been called.New in version 1.18.
- get_layer_info(name)¶
- Parameters:
name (
str) – the layer name to look for- Returns:
whether layer name is available
- description:
return value for the layer description or
None- spec_version:
return value for the layer specification version
- implementation_version:
return value for the layer implementation version
- Return type:
(
bool, description:strorNone, spec_version:int, implementation_version:int)
Retrieves information about a layer.
Will not find any layers before
GstVulkan.VulkanInstance.fill_info() has been called.New in version 1.18.
- get_proc_address(name)¶
- Parameters:
name (
str) – name of the function to retrieve- Returns:
the function pointer for name or
None- Return type:
Performs
vkGetInstanceProcAddr()with self and nameNew in version 1.18.
- get_version()¶
- Returns:
- major:
major version
- minor:
minor version
- patch:
patch version
- Return type:
Retrieve the vulkan instance supported version. Only returns the supported API version by the instance without taking into account the requested API version. This means
GstVulkan.VulkanInstance.check_version() will return different values if a specific version has been requested (which is the default) than a version check that is performed manually by retrieving the version with this function.New in version 1.18.
- is_extension_enabled(name)¶
- Parameters:
name (
str) – extension name- Returns:
whether extension name is enabled
- Return type:
New in version 1.18.
- is_layer_enabled(name)¶
-
New in version 1.18.
- open()¶
- Raises:
- Returns:
whether the instance could be created
- Return type:
New in version 1.18.
Signal Details¶
- GstVulkan.VulkanInstance.signals.create_device(vulkan_instance, device_index)¶
- Signal Name:
create-device- Flags:
- Parameters:
vulkan_instance (
GstVulkan.VulkanInstance) – The object which received the signaldevice_index (
int) – the index of the device
- Returns:
the newly created
GstVulkan.VulkanDevice.- Return type:
Overrides the
GstVulkan.VulkanDevicecreation mechanism. It can be called from any thread.New in version 1.26.
Property Details¶
- GstVulkan.VulkanInstance.props.requested_api_major¶
-
Major version of the requested Vulkan API (0 = maximum supported)
New in version 1.18.