pub trait CodecResolver: Sync {
// Required method
fn resolve_tag(&self, ctx: &ProbeContext<'_>) -> Option<CodecId>;
}Expand description
Resolve a CodecTag (FourCC / WAVEFORMATEX / Matroska id / …) to a
CodecId. The oxideav-codec
registry implements this, but defining the trait here lets
containers consume tag resolution via &dyn CodecResolver without
pulling in the codec crate as a direct dependency.
Required Methods§
Sourcefn resolve_tag(&self, ctx: &ProbeContext<'_>) -> Option<CodecId>
fn resolve_tag(&self, ctx: &ProbeContext<'_>) -> Option<CodecId>
Resolve the tag in ctx.tag to a codec id. Implementations walk
every registration whose tag set contains the tag, call each
probe (treating None as “always 1.0”), and return the id with
the highest resulting confidence. Ties are broken by
registration order.
Implementors§
impl CodecResolver for CodecRegistry
Implement the shared CodecResolver interface so container
demuxers can accept &dyn CodecResolver without depending on
this crate directly — the trait lives in oxideav-core.