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.Element
query (
Gst.Query
) – aGst.Query
of typeGst.QueryType.CONTEXT
instance (
GstVulkan.VulkanInstance
orNone
) – theGstVulkan.VulkanInstance
- Returns:
whether query was responded to with instance
- Return type:
If a
GstVulkan.VulkanInstance
is requested in query, sets instance as the reply.Intended for use with element query handlers to respond to
Gst.QueryType.CONTEXT
for 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.Element
instance (
GstVulkan.VulkanInstance
) – aGstVulkan.VulkanInstance
- Returns:
whether instance contains a valid
GstVulkan.VulkanInstance
- instance:
- Return type:
(
bool
, instance:GstVulkan.VulkanInstance
)
Attempt to retrieve a
GstVulkan.VulkanInstance
usingGst.QueryType.CONTEXT
from the surrounding elements of element.New in version 1.18.
- 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.
- 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_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:str
orNone
, 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 configured 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)¶
- Signal Name:
create-device
- Flags:
- Parameters:
vulkan_instance (
GstVulkan.VulkanInstance
) – The object which received the signal- Returns:
the newly created
GstVulkan.VulkanDevice
.- Return type:
Overrides the
GstVulkan.VulkanDevice
creation mechanism. It can be called from any thread.New in version 1.18.
Property Details¶
- GstVulkan.VulkanInstance.props.requested_api_major¶
-
Major version of the requested Vulkan API (0 = maximum supported)
New in version 1.18.