Expand description
The unsafe boundary between the native binding and FFmpeg.
It holds what rsmpeg’s safe surface lacks (frame and packet copies, codec and side-data helpers,
container I/O, hardware-frame shims) so the rest of the binding can forbid unsafe.
Structs§
- D3D12
Frame Info - D3D12 resource and decode fence retained by one hardware frame.
- Decoded
Frame - A decoded frame, and whether every byte of its buffers, row padding included, is written.
- Demux
Input - A container opened for reading with only the named demuxers, only the
fileprotocol, and an interrupt callback. - Display
Rotation - The rotation a display matrix asks for, in
FFmpeg’s convention. - Encoder
Context - An
AVCodecContextclosed under theMediaFoundationlock when it is an_mfencoder. - Frame
Plane - One plane of a decoded frame.
- LogLine
- One warning or error line
FFmpeglogged. - LogMark
- A point in the log for
log_since. - Native
GpuFailure - A platform GPU call that failed inside a native interop helper.
- Output
File - A container opened for writing whose file is closed without panicking.
- Sample
Profile - Chroma layout, component depth, and alpha of one pixel format.
- Video
Stream Description - Codec parameters for a video stream not produced by an
FFmpegencoder. - Video
Toolbox Frame Info CoreVideopixel-buffer identity retained by oneVideoToolboxframe.- Vulkan
Device Info - Raw shared-device description used to initialize
FFmpeg’s Vulkan context. - Vulkan
Encode Frame Access - One encoder-pool frame held open for a native GPU write.
- Vulkan
Frame Access - Locked
FFmpegVulkan surface state passed to the native GPU boundary. - Vulkan
Frame Access Guard - Guard for one locked
FFmpegframe and queue handoff. - Vulkan
Frame Info - Opaque Vulkan handles and synchronization state for one
FFmpeghardware frame. - Vulkan
Frame Lease - Ref-counted ownership of an opaque
FFmpegVulkan frame. - Vulkan
Queue Guard - One hold of a
VulkanQueueLock, released on drop on the thread that took it. - Vulkan
Queue Lock - Serializes one shared Vulkan queue family across
FFmpegand the renderer. - Yuv420p
Frame Buffer - A reusable
FFmpegYUV420P frame the caller writes into directly. - Yuv420p
Frame Planes - Writable plane memory for one reusable frame.
- YuvPlane
Layout - How a planar or semi-planar YCbCr pixel format stores its samples.
- YuvPlanes
- The planes of a YCbCr
AVFrame: luma first, then chroma.
Enums§
- Bridge
Error - Failure returned by an operation of this crate.
- Create
Output Error - Why
OutputFile::createcreated nothing. - GpuFault
- What a failed GPU call says about its device, read from the platform status (
VkResult,HRESULTorCVReturn) rather than from any message. - Native
GpuBackend - The graphics API a native interop helper called.
- Open
Input Error - Why
open_inputopened nothing. - Path
Error - Why a path cannot be passed to
FFmpegas a UTF-8 C string.
Constants§
- MAX_
VULKAN_ PLANES - Maximum number of Vulkan images described by an
FFmpeghardware frame. - VULKAN_
ENCODE_ INPUT_ USAGE VkImageUsageFlagsan encoder-input pool needs beyondFFmpeg’s own.
Functions§
- audio_
f32_ interleaved - Copies a packed
AV_SAMPLE_FMT_FLTframe into an owned interleaved vector. - audio_
frame - Copies planar
f32samples into an audio frame offormat(FLTP,FLTorS16). 16-bit samples are clamped to [-1, 1] and rounded. - bitstream_
filter_ list - Opens a bitstream filter chain in
ffmpeg -bsflist syntax for a stream described byparameterswith packets intime_base. - channel_
layout_ channels - The
AVChannelof each channel oflayout, in order; empty forAV_CHANNEL_ORDER_UNSPEC. - channel_
layout_ of - A channel layout of
channelsin order, native when possible, else custom. - codec_
parameters_ extradata - A copy of a stream’s codec extradata (parameter sets for H.264 and HEVC).
- configure_
colorspace - Applies explicit matrix and range coefficients to a scaling context.
- create_
vulkan_ ⚠device_ context - Initializes an
FFmpegVulkan device context over an application-owned device. - display_
rotation - Reads a stream display matrix.
- file_
url file:plus the absolute path, so a name liketake:1.movis never read as a protocol.- frame_
display_ rotation - Reads a frame’s display matrix, such as the JPEG decoder attaches for Exif
Orientation. - hardware_
device_ type_ name - Returns
FFmpeg’s stable name for a hardware device type. - install_
log_ capture - Routes
FFmpeg’s log through the capture. Idempotent;log_markcalls it. - log_
detail - Formats the last four lines as an error message tail (
"; FFmpeg said: [class] text | ..."), each cut to 200 characters with non-ASCII escaped. Empty when there are no lines. - log_
mark - The current end of the log. Installs the capture first.
- log_
since - Lines logged since
markby one ofclasses(any when empty), oldest first. Lines the ring has dropped are missing. - muxer_
accepts_ codec - Whether muxer
formatcan storecodecat normal compliance;Nonewhen it is not linked. - open_
codec_ context - Opens
contextwithoptions, returning whatFFmpegdid not consume. - open_
input - Opens
pathand reads its stream information using only the demuxers informats(comma-separatedFFmpegshort names) and only thefileprotocol. - packet_
bytes - Copies one packet’s payload out of
FFmpeg’s buffer. - packet_
from_ bytes - A packet holding a copy of
data, every other field at its default. - packet_
has_ side_ data - Whether
packetcarries side data ofkind. - pixel_
format_ name - Returns
FFmpeg’s stable name for a pixel-format value. - planar_
frame - A
widthbyheightframe offormatholding a copy ofplanes(bytes and stride each). - rgba_
frame - Copies tightly packed RGBA bytes into an owned
FFmpegframe. - runtime_
configuration - Returns the linked libavcodec configure string.
- runtime_
version - Returns the linked
FFmpegruntime version string. - sample_
profile - Describes a pixel format, or
Nonewhen the value has no descriptor. - scale_
frame_ packed - Converts
frameintooutputastarget’s planes packed without row padding (theav_image_copy_to_bufferlayout at alignment 1). - set_
output_ stream_ extradata - Replaces the extradata of
output’s streamindexbefore the header is written. - set_
packet_ side_ data - Gives
packetside data ofkindholdingdata, replacing any it had. - set_
stream_ codec_ tag - Sets a stream’s codec tag (sample entry); zero lets the muxer pick its default.
- set_
stream_ display_ matrix - Replaces a stream’s display matrix (MP4’s
tkhdmatrix) withdisplay’s rotation and flip, asdisplay_rotationreads it back. - shrink_
packet_ to - Replaces
packet’s payload withdata, no longer than it, keeping timestamps and side data. - take_
packet_ side_ data - Removes and returns
packet’s side data ofkind. - video_
codec_ parameters - Codec parameters for a video stream
descriptiondescribes. - vulkan_
frame_ info - Reads Vulkan image and synchronization metadata from an opaque hardware frame.
- vulkan_
frames_ add_ usage - Adds
usageto a Vulkan frames context before it allocates its pool. - vulkan_
frames_ usage - Usage the pool was created with, including the default
FFmpegpicks for zero. - vulkan_
get_ format_ callback - Returns the callback used by a Vulkan hardware decoder to select its opaque format.
- yuv420p_
frame - Copies owned planar 8-bit 4:2:0 samples into an
FFmpegvideo frame. - yuv_
layout - The plane layout of a YCbCr format the renderer samples directly, or
None. - yuv_
pixel_ format - The first pixel format in
FFmpeg’s table laid out aslayout(yuv420p, not the deprecatedyuvj420p). - yuv_
planes - Copies the samples of a frame whose format
yuv_layoutaccepts into packed forward rows, or returnsOk(None)for other formats. Odd dimensions round chroma up.
Type Aliases§
- Vulkan
Frame Descriptor - Vulkan image and synchronization state of one hardware frame, read under the frame lock.