Skip to main content

Crate alpha2_native_gpu

Crate alpha2_native_gpu 

Source
Expand description

Platform GPU interop for native decoded video surfaces.

FFmpeg ownership stays in alpha2-ffmpeg-bridge; this crate owns raw GPU handles, barriers, synchronization, and bounded surface accounting.

Structs§

ExternalSyncPoint
Timeline synchronization point required before sampling an image.
ImportTicketStats
Allocation counters of a context’s import tickets.
ImportedPlaneDescriptor
One opaque native plane before it is wrapped by the active GPU backend.
ImportedVulkanFrame
An imported bi-planar 4:2:0 image and its two wgpu plane views.
NativeGpuIdentity
Stable identity of a native GPU device for cache and import validation.
NativeImageState
Native image state observed while the decoder surface is locked.
SharedVulkanChoice
The shared device the adapter choice made, its report, and why there is none if so.
SharedVulkanContext
One Vulkan logical device adopted by both the renderer and FFmpeg.
SharedVulkanError
Failure while creating a logical Vulkan device shared by wgpu and FFmpeg.
SurfaceBudget
Bounded decoder-surface allocator shared by decode sessions.
SurfaceBudgetError
A reservation exceeded either the count or byte limit.
SurfaceIdentity
Identity used to prevent imported texture reuse across decoder generations.
SurfaceReservation
A reservation released exactly once when its final owner is dropped.
SurfaceUsage
Current native surface allocation.
VideoEncodeExtent
Coded extents and coding limits one video-encode profile has on a device.
VulkanCandidate
One Vulkan adapter as the shared device’s choice sees it, read without opening a device.
VulkanEncodeCopier
Reusable NV12 handoff from the renderer’s plane textures to encoder frames, one per export.
VulkanImportLease
Owns the imported texture, FFmpeg frame, and native transition commands.
VulkanLayerVersion
A Vulkan layer’s specification version.

Enums§

NativePlaneLayout
Supported decoded plane organizations.

Traits§

NativeSurfaceLease
Native backing retained until every sampling submission has completed.

Functions§

adapter_memory_budget
The device memory budget of adapter in bytes, or None where the API reports none.
adapter_pinned
Whether ALPHA2_GPU_ADAPTER pins one adapter, which probes opening their own devices then keep to.
choose_shared_vulkan
Makes the shared Vulkan device on the adapter policy takes, ranked as every host ranks adapters (alpha2_gpu::rank_adapters): under auto, the adapter encoding the most codecs on the GPU, then one that decodes when decode_allowed, then high-performance order. Without wanted nothing is made and the report says where the product device renders.
probe_vulkan_submission
Checks that a decoded frame can be imported: moves its planes to SHADER_READ_ONLY and back in one submission on its queue, through import-like views, and waits.
set_gpu_wait_timeout
Sets how long the platform interop helpers wait on GPU work before failing with a timeout.
shared_device_index
The loader physical-device index of the adapter the host’s choice makes the shared device on: the device index FFmpeg’s av_hwdevice_ctx_create takes. Probes that open their own device pass it, so they use the device an export runs on.
vulkan_candidates
Every Vulkan adapter, in enumeration order, with what it offers the shared device.