oa::video
video module in the OA Vision public surface.
MdRust public API
Public Types
Public Functions
pub fn from_texture( texture: &Texture, timing: VideoFrameTiming, color: VideoColorInfo, ) -> Result<VideoFrame>pub fn from_texture_with_ready( texture: &Texture, timing: VideoFrameTiming, color: VideoColorInfo, ready: &Event, ) -> Result<VideoFrame>pub fn parse_av1_frame_header( payload: &[u8], sequence: &Av1SequenceHeader, references: &Av1ReferenceState, ) -> Result<Av1FrameHeader>pub fn parse_h264_pps( nal: &[u8], sps: &H264SequenceParameterSet, ) -> Result<H264PictureParameterSet>pub fn parse_h264_slice_header( nal: &[u8], sps: &H264SequenceParameterSet, pps: &H264PictureParameterSet, ) -> Result<H264SliceHeader>pub fn parse_h265_slice_header( nal: &[u8], sps: &H265SequenceParameterSet, pps: &H265PictureParameterSet, ) -> Result<H265SliceHeader>pub fn query_decode_capabilities( engine: &Engine, profile: VideoDecodeProfile, ) -> Result<VideoDecodeCapabilities>pub fn query_decode_formats( engine: &Engine, profile: VideoDecodeProfile, ) -> Result<VideoDecodeFormats>Function Documentation
Emit borrowed NAL payloads as canonical four-byte-start-code Annex-B. Errors Returns an error when the output size overflows or host allocation fails.
Copy the first H.264 picture parameter set payload.
Copy the first H.265 picture parameter set payload.
Copy the first H.264 sequence parameter set payload.
Copy the first H.265 sequence parameter set payload.
Copy the first H.265 video parameter set payload.
Retain a render Texture as one timestamped video frame. The returned frame shares a buffer-backed Texture’s packed RGBA8 storage, semantic identity, and exact Matrix producer readiness. It performs no pixel copy, submission, wait, or Image conversion. Render targets require from_texture_with_ready so their producer completion is not lost. Errors Returns an error for a render-target-backed Texture.
Retain a texture and its exact producer completion in one video frame. This is the render-target path: it shares the texture and event without a readback, wait, or pixel copy. The event must belong to the texture’s Engine. Errors Returns an error when ready comes from a different Engine.
Inspect one raw access unit or the first frame of an IVF byte stream. Errors Returns an error for malformed IVF framing, invalid OBU structure, count overflow, or an empty frame payload.
Convert an MP4 length-prefixed H.264/H.265 sample into Annex-B NAL units. Errors Returns an error for a length width other than 1, 2, or 4, a truncated length field, a zero-sized NAL unit, arithmetic overflow, or payload overrun.
Parse one AV1 frame or frame-header OBU payload against explicit reference state. Errors Returns an error for truncated or inconsistent syntax and for donor features that are not yet represented: frame IDs, decoder-model removal timing, short reference signaling, non-uniform tiles, global motion, and film grain.
Split one raw AV1 access-unit payload into borrowed OBUs. Errors Returns an error for forbidden/reserved header bits, truncated extensions or LEB128 sizes, payload overruns, empty input, and arithmetic overflow.
Parse one AV1 sequence-header OBU payload. Pass Av1Obu::payload from an OBU whose type is Av1ObuType::SequenceHeader. The returned representation is independent of Vulkan’s standard-video C structures and retains the stream metadata needed to create exact backend profiles and session parameters. Errors Returns an error when the payload is empty or truncated, declares a reserved profile, carries an invalid frame-ID length, or encodes a chroma layout outside the AV1 profile rules.
Parse the tile ranges carried by one frame or tile-group OBU. Returned offsets are relative to the access-unit byte slice originally passed to super::parse_av1_obus, matching Vulkan Video’s source-buffer offset convention. Errors Returns an error for an incompatible OBU type, missing payload, invalid tile count/range/size width, truncated size fields, payload overruns, or offsets that do not fit Vulkan’s 32-bit tile arrays.
Parse one raw H.264 PPS NAL unit without an Annex-B start code.
Parse one raw H.264 coded-slice NAL using its resolved SPS and PPS. The returned picture-order-count field contains the coded LSB for POC type zero. POC types one and two require prior-picture state and therefore return None; the decoder session must derive the final POC rather than inventing a stateless approximation.
Parse one raw H.264 SPS NAL unit without an Annex-B start code.
Parse one raw H.265 PPS NAL unit without an Annex-B start code.
Parse one raw H.265 coded-slice NAL using its resolved SPS and PPS. Dependent slice segments and inline inter-predicted short-term reference sets require additional retained state and fail with MissingCapability.
Parse one raw H.265 SPS NAL unit without an Annex-B start code.
Parse one raw H.265 VPS NAL unit without an Annex-B start code.
Split an Annex-B byte stream into borrowed H.264 NAL payloads. Both 00 00 01 and 00 00 00 01 start codes are recognized. Bytes before the first start code and empty units are ignored, matching the donor oa::FnVideo::parseNalAnnexB contract.
Query the selected device’s exact limits for one decoder profile. Extension advertisement alone does not prove that a particular profile, chroma layout, bit depth, or codec option is usable. This query presents the complete profile to Vulkan and returns MissingCapability when rejected. Errors Returns an error when the codec extension is unavailable, the exact profile is unsupported, or the Vulkan capability query fails.
Enumerate decoded-output and DPB image formats for one exact profile. Errors Returns an error when the profile or its codec extension is unsupported, a Vulkan enumeration fails, or the driver reports an unreasonable result size.
Query Vulkan Video queues and codec extensions on the Engine’s selected device. This query reports both physical-device advertisement and whether Engine creation enabled video queues, and whether at least one qualified codec session path exists. Errors Returns an error when Vulkan device-extension or queue-family enumeration fails.
Query exact H.264 or H.265 encoder limits without creating a session.
Enumerate encode-input and DPB formats for one exact profile.