oxideav-core 0.1.36

Core types and registries for oxideav — timestamps, packets, frames, codec/container/source/filter registries (pure Rust, no C deps)
Documentation
//! Core types and registries for the oxideav framework.
//!
//! This crate is the dependency-light foundation: primitive types
//! (timestamps, packets, frames, media formats) plus the registries
//! every sibling crate registers itself into. The aggregate
//! [`RuntimeContext`] bundles all four registries (codec / container /
//! source / filter) into a single value that consumers pass around.
//!
//! # Resolution order
//!
//! Every registry lookup that can have several candidates ranks them by
//! one rule, so the winner depends only on the registered claims and
//! the input — never on hash-map iteration order:
//!
//! 1. **evidence, descending** — probe score
//!    ([`ContainerRegistry::probe_input`]), probe confidence
//!    ([`CodecRegistry::resolve_tag_ref`]; unprobed claims count as
//!    `1.0`), or matched prefix length
//!    ([`CodecRegistry::resolve_payload_magic_ref`]);
//! 2. **resolution priority, ascending** — lower is preferred, default
//!    [`DEFAULT_PRIORITY`]; set with
//!    [`ContainerRegistry::register_probe_with_priority`],
//!    [`ContainerRegistry::register_extension_with_priority`] or
//!    [`CodecInfo::with_resolution_priority`];
//! 3. **registration order** — earlier wins (extension hints keep their
//!    historical most-recent-wins contract at equal priority).
//!
//! The ranked lists are observable via
//! [`ContainerRegistry::probe_candidates`],
//! [`ContainerRegistry::extension_candidates`],
//! [`CodecRegistry::resolve_tag_candidates`] and
//! [`CodecRegistry::resolve_payload_magic_candidates`].

#![warn(missing_docs)]

pub mod arena;
pub mod bits;
pub mod capabilities;
pub mod engine;
pub mod error;
pub mod execution;
pub mod filter;
pub mod format;
pub mod frame;
pub mod limits;
pub mod metadata;
pub mod options;
pub mod packet;
pub mod picture;
pub mod rational;
pub mod registry;
pub mod stream;
pub mod subtitle;
pub mod time;
pub mod vector;

pub use capabilities::{CodecCapabilities, DEFAULT_PRIORITY};
pub use engine::{EngineProbeFn, HwCodecCaps, HwDeviceInfo};
pub use error::{Error, Result};
pub use execution::ExecutionContext;
pub use filter::{FilterContext, PortParams, PortSpec, StreamFilter};
pub use format::{
    ChannelLayout, ChannelPosition, MediaType, ParseChannelLayoutError, PixelFormat, SampleFormat,
};
pub use frame::{AudioFrame, Frame, VideoFrame, VideoPlane};
pub use limits::DecoderLimits;
pub use metadata::{Attachment, Chapter};
pub use options::{
    parse_options, CodecOptions, CodecOptionsStruct, OptionField, OptionKind, OptionValue,
};
pub use packet::Packet;
pub use picture::{AttachedPicture, PictureType};
pub use rational::Rational;
pub use registry::{
    BytesSource, CodecImplementation, CodecInfo, CodecRegistry, ContainerProbeFn,
    ContainerRegistry, Decoder, DecoderFactory, Demuxer, Encoder, EncoderFactory,
    ExtensionCandidate, FilterFactory, FilterRegistry, FrameSource, MultiTitleSource, Muxer,
    OpenBytesFn, OpenDemuxerFn, OpenFramesFn, OpenMultiTitleFn, OpenMuxerFn, OpenPacketsFn,
    PacketSource, PayloadMagicCandidate, ProbeCandidate, ProbeData, ProbeScore, ReadSeek,
    RuntimeContext, SourceOutput, SourceRegistry, TagCandidate, WriteSeek, MAX_PROBE_SCORE,
    PROBE_SCORE_EXTENSION,
};
pub use stream::{
    CodecId, CodecParameters, CodecResolver, CodecTag, Confidence, NullCodecResolver, ProbeContext,
    ProbeFn, StreamInfo,
};
pub use subtitle::{CuePosition, Segment, SubtitleCue, SubtitleStyle, TextAlign};
pub use time::{rescale, rescale_checked, rescale_rnd, Rounding, TimeBase, Timestamp};
pub use vector::{
    DashPattern, FillRule, GradientStop, Group, ImageRef, LineCap, LineJoin, LinearGradient,
    MaskKind, Node, Paint, Path, PathCommand, PathNode, Point, RadialGradient, Rect, Rgba,
    SpreadMethod, Stroke, Transform2D, VectorFrame, ViewBox,
};