GstVulkan.VulkanDevice

g GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned GstVulkan.VulkanDevice GstVulkan.VulkanDevice Gst.Object->GstVulkan.VulkanDevice

Subclasses:

None

Methods

Inherited:

Gst.Object (27), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

handle_context_query (element, query, device)

class

new (physical_device)

class

new_with_index (instance, device_index)

class

run_context_query (element, device)

create_fence ()

disable_extension (name)

enable_extension (name)

enable_layer (name)

foreach_queue (func, *user_data)

get_instance ()

get_proc_address (name)

get_queue (queue_family, queue_i)

is_extension_enabled (name)

is_layer_enabled (name)

open ()

queue_family_indices ()

select_queue (expected_flags)

Virtual Methods

Inherited:

Gst.Object (1), GObject.Object (7)

Properties

Inherited:

Gst.Object (2)

Name

Type

Flags

Short Description

instance

GstVulkan.VulkanInstance

r

Associated Vulkan Instance

physical-device

GstVulkan.VulkanPhysicalDevice

r/w/co

Associated Vulkan Physical Device

Signals

Inherited:

Gst.Object (1), GObject.Object (1)

Fields

Inherited:

Gst.Object (1), GObject.Object (1)

Name

Type

Access

Description

device

Vulkan.Device

r

the vulkan device handle

instance

GstVulkan.VulkanInstance

r

the GstVulkan.VulkanInstance this device was allocated with

parent

Gst.Object

r

the parent Gst.Object

physical_device

GstVulkan.VulkanPhysicalDevice

r

the GstVulkan.VulkanPhysicalDevice this device was allocated with

Class Details

class GstVulkan.VulkanDevice(**kwargs)
Bases:

Gst.Object

Abstract:

No

Structure:

GstVulkan.VulkanDeviceClass

New in version 1.18.

classmethod handle_context_query(element, query, device)
Parameters:
Returns:

whether query was responded to with device

Return type:

bool

If a GstVulkan.VulkanDevice is requested in query, sets device as the reply.

Intended for use with element query handlers to respond to Gst.QueryType.CONTEXT for a GstVulkan.VulkanDevice.

New in version 1.18.

classmethod new(physical_device)
Parameters:

physical_device (GstVulkan.VulkanPhysicalDevice) – the associated GstVulkan.VulkanPhysicalDevice

Returns:

a new GstVulkan.VulkanDevice

Return type:

GstVulkan.VulkanDevice

New in version 1.18.

classmethod new_with_index(instance, device_index)
Parameters:
Returns:

a new GstVulkan.VulkanDevice

Return type:

GstVulkan.VulkanDevice

New in version 1.18.

classmethod run_context_query(element, device)
Parameters:
Returns:

whether device contains a valid GstVulkan.VulkanDevice

device:

a GstVulkan.VulkanDevice

Return type:

(bool, device: GstVulkan.VulkanDevice)

Attempt to retrieve a GstVulkan.VulkanDevice using Gst.QueryType.CONTEXT from the surrounding elements of element.

New in version 1.18.

create_fence()
Raises:

GLib.Error

Returns:

a new GstVulkan.VulkanFence or None

Return type:

GstVulkan.VulkanFence or None

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:

bool

Disable an Vulkan extension by name. Disabling an extension will only have an effect before the call to GstVulkan.VulkanDevice.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:

bool

Enable an Vulkan extension by name. Enabling an extension will only have an effect before the call to GstVulkan.VulkanDevice.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:

bool

Enable an Vulkan layer by name. Enabling a layer will only have an effect before the call to GstVulkan.VulkanDevice.open().

New in version 1.18.

foreach_queue(func, *user_data)
Parameters:

Iterate over each queue family available on GstVulkan.VulkanDevice

New in version 1.18.

get_instance()
Returns:

the GstVulkan.VulkanInstance used to create this self

Return type:

GstVulkan.VulkanInstance or None

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:

object or None

Performs vkGetDeviceProcAddr() with self and name

New in version 1.18.

get_queue(queue_family, queue_i)
Parameters:
  • queue_family (int) – a queue family to retrieve

  • queue_i (int) – index of the family to retrieve

Returns:

a new GstVulkan.VulkanQueue

Return type:

GstVulkan.VulkanQueue

New in version 1.18.

is_extension_enabled(name)
Parameters:

name (str) – extension name

Returns:

whether extension name is enabled

Return type:

bool

New in version 1.18.

is_layer_enabled(name)
Parameters:

name (str) – layer name

Returns:

whether layer name is enabled

Return type:

bool

New in version 1.18.

open()
Raises:

GLib.Error

Returns:

whether a vulkan device could be created

Return type:

bool

Attempts to create the internal VkDevice object.

New in version 1.18.

queue_family_indices()
Returns:

An array with the family indexes of the created queues in self

Return type:

[int]

New in version 1.24.

select_queue(expected_flags)
Parameters:

expected_flags (Vulkan.QueueFlagBits) – a Vulkan.QueueFlagBits

Returns:

a GstVulkan.VulkanQueue for queue matching the expected_flags

Return type:

GstVulkan.VulkanQueue

Select a compatible queue from the self supporting the expected_flags.

New in version 1.24.

Property Details

GstVulkan.VulkanDevice.props.instance
Name:

instance

Type:

GstVulkan.VulkanInstance

Default Value:

None

Flags:

READABLE

Associated Vulkan Instance

GstVulkan.VulkanDevice.props.physical_device
Name:

physical-device

Type:

GstVulkan.VulkanPhysicalDevice

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Associated Vulkan Physical Device