Skip to main content

Crate alpha2_native

Crate alpha2_native 

Source
Expand description

Native FFmpeg 8 media adapter.

rsmpeg and FFmpeg types stay private; callers see only alpha2-media contracts. Timeline audio mixing needs the timeline feature, the only part that links the engine.

Structs§

AudioStreamConfig
The audio stream an export encodes beside its video.
AvEncodeConfig
Configuration for transactional audio/video export.
CodecThreadAllocation
One export-wide software-codec allocation: decoder_threads per software decoder, hardware_decoder_threads per hardware one, encoder_threads for the software encoder.
CodecThreadRequest
What one export needs from the shared software-codec worker budget.
ConcealedAudioGap
An interval decoded as silence at the decoder’s output rate, where damaged input was dropped or timestamps jump.
CorruptPacket
One observed corruption. Timestamps use the selected stream’s time base.
DecodeDiagnosticCounts
Counts of what decoders reported: damage Tolerant decoding skipped and silence it inserted. Samples are at the reporting decoder’s output rate.
DecodeDiagnostics
Cumulative diagnostics. Records are bounded; overflow fails decoding.
DecodeProgressWatch
Ends a watch_decode_progress watch, restoring the one before it.
DecodeStageTimings
Where one video decode session’s wall time went, split so hardware decode is told apart from mere submission.
DecodedAudioSources
Decoded, project-rate planar audio held per source audio stream for offline mixing; one whole-stream block each, indexed by absolute source position.
DroppedAudioOverlap
Samples dropped because their timestamps overlapped samples already decoded, at the decoder’s output rate.
DroppedLayer
Something a decoder leaves out of its stream (the frames still decode), for reports.
EncodeCallWatch
Ends a watch_encode_calls watch, restoring the one before it.
EncodeStageTimings
Where one encode sink’s wall time went, split into codec, packet drain and mux write so a change in one is visible.
EncoderInventory
The encoders of one codec this machine runs, and the ones its open probe refused.
EncoderPoolStats
Surface-pool counters for one session.
EncoderRefusal
One encoder that did not open, and why.
EncoderSurface
One encoder-input surface on loan from its session’s pool.
EncoderSurfaceDescriptor
What one encoder-input surface is, independent of its backing.
FfmpegRuntimeIdentity
FFmpeg runtime and pinned SDK identity used by native diagnostics.
FrameScore
How a frame would do as a thumbnail.
HardwareEncodeCapability
What one hardware encoder accepts on this device, read from the device.
HardwareEncodeDevice
The renderer’s device, as a hardware encoder can use it.
HardwareEncodeInput
The coordinator’s half of a hardware session.
HardwareEncodeRequest
One export’s encoder settings and output.
HardwareEncodeSession
The encode worker’s half of a hardware session.
HardwareOpenError
A hardware decode session that could not be opened, with its typed reason.
HostAudioConfig
Platform-neutral device range used by negotiation tests and cpal mapping.
InputFrame
A begun frame whose planes belong to the renderer until HardwareEncodeInput::submit.
NativeAudioDecoder
Streaming FFmpeg audio decoder normalized to project-rate planar f32.
NativeAudioEncoderCapability
One linked audio encoder available to the native sinks.
NativeAvEncodeSink
Audio/video sink that encodes and interleaves through the linked FFmpeg libraries.
NativeCodecCapabilities
Runtime codec inventory for the native sinks.
NativeDecoder
Software video decoder with exact timestamp conversion and drain semantics.
NativeEncoderHardwareConfig
One hardware configuration a video encoder declares.
NativeEncoderLibrary
A run-time loaded encoder library (crate::OPENH264_ENCODER_NAME).
NativeExportDecoder
Export decoder producing NativeVideoFrames from one FFmpeg session.
NativeHardwareDecodeCapabilities
Hardware decode registration reported by the linked FFmpeg build.
NativeHardwareDecodeCapability
One codec’s hardware decode registration for this platform’s backend.
NativeRateControlProbe
Whether one encoder opened with one rate-control mechanism.
NativeVideoEncodeSink
Transactional FFmpeg video encoder and muxer.
NativeVideoEncoderCapability
One linked video encoder available to the native sinks.
NativeVideoEncoderFallback
One candidate encoder an export tried and moved past.
NativeVideoEncoderProbe
What one registered video encoder declares, and what happened when alpha2 opened it.
NativeVideoEncoderSelection
The encoder an export actually opened, and the candidates it passed over.
NativeVideoFrameMetadata
Platform-neutral metadata carried identically by CPU and hardware frames.
NativeWavEncodeSink
Transactional IEEE-f32 WAV encoder used by native offline audio export.
OpenH264Library
An OpenH264 library that loaded and passed its checks.
OutputTarget
Where an output goes and what it does with a file already there.
PacketCopy
One or more copy runs written back to back into one output.
PacketCopyAudio
What a copied audio stream must match.
PacketCopyPlan
A copy that can be made, and what it copies.
PacketCopyPlanner
Plans the runs of one export, reading each source once and stopping on cancel.
PacketCopyReport
What a copy wrote.
PacketCopyRequest
The stream an export copies from and what it must match.
ProbeResult
Container-level probe and deterministic stream selection.
ProjectAudioRequest
One offline project-audio render request.
PublishReport
How a finished output was published.
VideoDisplay
How encoded pictures are shown, as recorded by the container rather than the bitstream.
VideoEncodeConfig
Configuration for deterministic native video encoding.
VideoRecoveryGap
Healthy video boundaries surrounding dropped data. Unknown endpoints remain absent.
VulkanDecodeProbe
Result of a bounded Vulkan hardware decode and surface probe.
VulkanEncodeProbe
What one Vulkan encode session turned out to require and produce.
Yuv420pFrameBuffer
A reusable FFmpeg YUV420P frame the caller writes into directly.

Enums§

AppliedRateControl
Which form of a resolved rate control an encoder actually ran.
CopyAudio
The audio a packet copy writes beside its video.
DecodeDiagnostic
A recovery observation emitted synchronously before decoding continues.
DecodePolicy
Damaged input handling. Initialization and resource errors are always fatal.
EncoderInputHandoff
How a packed frame reaches the encoder’s surface.
EncoderInputLayout
How the pixels of an encoder-input surface are laid out.
ExistingOutput
What an output does with a file already at its path.
HardwareDecodeFallback
Why a video source is decoded in software instead of on the GPU, recorded per source.
HardwareEncodeBackend
The native API a hardware encode session drives.
HardwareEncodeOpenError
Why a hardware session did not open.
HostSampleFormat
Host sample representation considered during deterministic negotiation.
NativeAudioCodec
Audio codecs implemented by the native encode sinks.
NativeEncoderClass
How a concrete encoder executes, as the linked runtime declares it.
NativeEncoderRejection
Why one candidate encoder was not the one an export opened.
NativePlaneLayout
Plane organization of a native export frame.
NativeVideoCodec
Video codecs implemented by the native encode sinks.
NativeVideoFrame
One decoded export frame with either owned CPU pixels or an opaque surface.
OfflineAudioError
Native offline-render failure.
OpenFailureKind
Why an encoder did not open, as far as its own status and log say.
OpenH264Provider
Who provided the library that loaded.
OpenH264Status
Whether OpenH264 can encode in this process, and if not, why.
PublishMethod
How publish_no_replace or publish_replace moved a file into place.
RateControlMechanism
A way of controlling an encoder’s rate, independent of family spelling.

Constants§

DECODE_WORK_LIMIT
The longest a decoder operation (seek, next frame, open) may go without producing a frame before failing with “decode progress budget exceeded”.
HARDWARE_DECODER_THREADS
FFmpeg workers a hardware decode session opens with, whatever the budget.
OPENH264_ENCODER_NAME
The encoder name --video-encoder takes for OpenH264.
OPENH264_INSTALL_COMMAND
What a user runs to install Cisco’s binary.
OPENH264_NOTICE
The text Cisco’s licence requires wherever the user controls the codec (manifest notice).
OPENH264_VERSION
The OpenH264 release release/openh264/manifest.toml pins (version).
PARTIAL_OUTPUT_IN_USE
The prefix of an EncodeError::OutputInUse message, when a live export writes the partial.
SOURCE_SAMPLE_RATES
Accepted source sample rates (1 kHz to 768 kHz, the alpha2_audio::Resampler range).
THUMBNAIL_LUMA_RANGE
Mean luma range (fraction of full scale) outside which a frame is too black or white for a thumbnail.

Traits§

AudioBlockFeed
The export’s mixed audio, block by block, for a copy that encodes it.
HardwareFrameLease
Opaque decoder surface retained until GPU completion.

Functions§

alpha_dropped_reason
Why a software session would decode stream without its alpha, for conform reports.
audio_encoder_capabilities
The audio encoders codec_capabilities lists, without probing video encoders.
check_yuv_transcode
Whether source’s decoded pictures can become a widthxheight output’s frames with no conversion: the file side of a YUV transcode, encoded as encoding.
choose_thumbnail
The sharpest frame that is neither black nor white, or the sharpest of all when none qualifies. None for no frames.
codec_capabilities
Reports the encoders usable by the native sinks: the linked FFmpeg’s, and OpenH264 when installed.
codec_thread_allocation
Divides the export CPU budget across concurrently active codec contexts.
codec_thread_budget
Returns the worker budget for one standalone software video codec context.
codec_thread_override
The worker budget setting names: None unset, or a positive count clamped to 64.
configured_codec_thread_override
The software-codec worker budget ALPHA2_FFMPEG_THREADS sets (codec_thread_override).
copy_packets
Writes copy’s runs back to back into a new container file at output, with audio. The runs were planned for container (PacketCopyRequest::container).
decodes_vp9_alpha
Whether this runtime decodes VP9’s alpha: it has libvpx’s VP9 decoder.
downscale_frame
The frame shrunk by factor with box averaging, visible size rounded down to even for 4:2:0 encoders.
encoder_minimum_dimensions
The smallest even width and height encoder name accepts.
encodes_pixels
Whether some encoder of codec takes layout’s pictures or their P010 form.
ffmpeg_runtime_identity
Returns the loaded FFmpeg identity together with the release SDK pin.
h264_encoder_remedy
Remedies for a machine without a CPU-frame H.264 encoder: install OpenH264, use an FFmpeg with libx264, or export another codec.
hardware_decode_backend
Backend this build decodes with, independent of any device being present.
hardware_decode_capabilities
Reports which codecs the linked FFmpeg registers for this backend.
hybrid_encoders_use_hardware
Whether hybrid encoders are configured to run on the GPU.
negotiate_output_config
Selects an output that plays stereo, requiring exact project-rate f32 support.
no_video_encoder_message
Why an export of codec has no encoder, and what to do about it.
openh264_status
OpenH264 for this process, looked up once on first use.
packed_frame
A reusable encoder frame for width x height pictures of layout, its planes in the layout’s storage order.
plan_packet_copy
Decides whether request can be served by copying packets.
probe
Opens a local resource using the system FFmpeg 8 shared libraries.
probe_video_encoders
Opens every registered video encoder and reports what it actually does.
probe_vulkan_decode
Decodes Vulkan frames without mapping, downloading, or uploading their planes.
probe_vulkan_encode
Opens h264_vulkan against device and encodes one untouched pool frame.
remove_stale_partial_output
Removes a sibling partial file left by an interrupted transactional export.
render_offline
Runs the same graph used by realtime hosts and writes exact project-rate blocks.
render_project_audio
Mixes a whole project audio range and writes exact project-rate blocks.
require_pinned_ffmpeg_for_tests
Panics unless the loaded FFmpeg is the pinned SDK, for tests to call before they use it.
resize_rgba
Resizes straight-alpha RGBA pixels with a per-axis tent filter as wide as the larger of the source and output spacing, so shrinking averages and growing interpolates.
same_chroma_siting
Whether chroma sited at source matches output, reading unspecified as centred like import.
score_frame
Scores a frame on a fixed grid of luma samples, independent of frame size.
software_decode_unsupported
Why this runtime cannot decode stream without a hardware session, or None when software can (some preferred decoders are hardware-only; AV1 needs libdav1d).
video_encoder_inventory
The usable encoders for codec alone, and the ones whose probe refused.
video_encoders_without_probing
The encoders codec_capabilities would list from what is known so far, without running any probe; unprobed encoders are left out. For a startup log line.
visit_packet_times
Visits each packet time (seconds) of AVStream index stream in file order until visit returns false. Falls back to decode time; packets with neither are skipped. Nothing is decoded.
watch_decode_progress
Calls progressed on this thread each time a decoder operation produces a frame or a packet copy plan reads a source packet, until the guard drops.
watch_encode_calls
Calls beat on this thread before every encoder and muxer call a sink makes, until the guard drops.
write_png
Writes straight-alpha 8-bit RGBA rgba as a PNG at target, published whole or not at all like write_whole.
write_whole
Writes a whole file at target, published only once write has filled the claimed partial, with the same claim, sync and publish as a video output. A write failure removes the partial and leaves the target untouched. The target is checked before writing and again at the rename.