GstVulkan.VulkanDecoder¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
codec |
r |
the configured video codec operation |
|
dedicated_dpb |
r |
if decoder needs a dedicated DPB |
|
input_buffer |
r |
the buffer to upload the bitstream to decode |
|
layered_buffer |
r |
||
layered_dpb |
r |
if decoder’s dedicated DPB has to be a layered image |
|
parent |
r |
the parent |
|
profile |
r |
the configured |
|
queue |
r |
the |
Class Details¶
- class GstVulkan.VulkanDecoder(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
New in version 1.24.
- append_slice(pic, data, size, add_startcode)¶
- Parameters:
pic (
GstVulkan.VulkanDecoderPicture
) – aGstVulkan.VulkanDecoderPicture
data (
int
) – slice’s bitstream datasize (
int
) – the size of dataadd_startcode (
bool
) – whether add start code
- Returns:
whether the slice data were added.
- Return type:
Appends slices’s data bitstream into pic internal input buffer.
- caps()¶
- Returns:
whether the capabilities were fetched correctly.
- Return type:
(
bool
, caps:GstVulkan.VulkanVideoCapabilities
)
Gets the Vulkan decoding capabilities of the current video session.
- create_dpb_pool(caps)¶
- Parameters:
- Returns:
whether the pool was created.
- Return type:
Instantiates an internal Vulkan image pool for driver decoders whose output buffers cannot be used as DPB buffers.
- decode(pic)¶
- Parameters:
pic (
GstVulkan.VulkanDecoderPicture
) – aGstVulkan.VulkanDecoderPicture
- Raises:
- Returns:
whether pic was decoded correctly. It might fill error.
- Return type:
Decodes pic.
- flush()¶
- Raises:
- Returns:
whether flush was successful
- Return type:
Initializes the decoder at driver level and set its DPB slots to the inactive state.
- is_started()¶
- Returns:
whether
GstVulkan.VulkanDecoder.start
() was called correctly previously.- Return type:
- picture_create_view(buf, is_out)¶
- Parameters:
buf (
Gst.Buffer
) – aGst.Buffer
is_out (
bool
) – if buf is for output or for DPB
- Returns:
- Return type:
Creates a
GstVulkan.VulkanImageView
for buf for decoding, with the internal Ycbcr sampler, if available.
- picture_init(pic, out)¶
- Parameters:
pic (
GstVulkan.VulkanDecoderPicture
) – aGstVulkan.VulkanDecoderPicture
out (
Gst.Buffer
) – theGst.Buffer
to use as output
- Returns:
whether pic was initialized.
- Return type:
Initializes pic with out as output buffer.
- profile_caps()¶
- Returns:
the
Gst.Caps
of the profile defined atGstVulkan.VulkanDecoder.start
().- Return type:
- start(profile)¶
- Parameters:
profile (
GstVulkan.VulkanVideoProfile
) – aGstVulkan.VulkanVideoProfile
- Raises:
- Returns:
whether the video decoder has started correctly.
- Return type:
It creates a Vulkan video session for the given profile. If an error occurs, error is filled.
- stop()¶
- Returns:
whether the decoder stopped correctly.
- Return type:
Destroys the video session created at
GstVulkan.VulkanDecoder.start
() and clean up the internal objects.
- update_video_session_parameters(params)¶
- Parameters:
params (
GstVulkan.VulkanDecoderParameters
) – aGstVulkan.VulkanDecoderParameters
union- Raises:
- Returns:
whether the params were updated internally. It might fill error.
- Return type:
Update the internal codec parameters for the current video session.
- update_ycbcr_sampler(range, xloc, yloc)¶
- Parameters:
range (
Vulkan.SamplerYcbcrRange
) – whether color components are encoded using the full range of numerical values or whether values are reserved for headroom and foot room.xloc (
Vulkan.ChromaLocation
) – x location of downsampled chroma component samples relative to the luma samples.yloc (
Vulkan.ChromaLocation
) – y location of downsampled chroma component samples relative to the luma samples.
- Raises:
- Returns:
whether the sampler was updated.
- Return type:
Update the internal Ycbcr sampler for the output images.