Declaraciones públicas de transmux/registry.zig (transmux).
apps/docs/generated/zig/transmux.jsonPágina generada desde
native/zig/transmux/transmux.zig. No se edita a mano:bun run docs:genla regenera ybun run docs:checkfalla si difiere.
Engine selection (dec-0110 §3): which MediaEngine packages a session.
default = zig | libav | auto, fallback =
off | libav (only with auto).auto = zig when zig declares the capability for (container, codecs,
fMP4-CMAF), else libav when built in and capable.fallback = libav) is never silent:
counted by reason and reported in the session's result.registry.Choicetype · línea 21
pub const Choice = enumSin ///.
registry.Choice.parsefn · línea 26
pub fn parse(s: []const u8) ?ChoiceSin ///.
registry.Fallbacktype · línea 31
pub const Fallback = enumSin ///.
registry.Fallback.parsefn · línea 35
pub fn parse(s: []const u8) ?FallbackSin ///.
registry.Configtype · línea 40
pub const Config = structSin ///.
registry.Errorconst · línea 45
pub const Error = EngineError || error{ /// The requested engine is not built into this daemon (`-Dlibav=false`). EngineUnavailable, /// libav was asked for a file it may not parse in this process /// …Sin ///.
registry.LibavAdmissiontype · línea 56
pub const LibavAdmission = enumMay libav parse this source inside the daemon's process (dec-0117 I6)?
Only files of a root the operator marked trusted; the rest get the zig
engine or nothing until the sandboxed worker exists (SEC-Z11).
registry.FallbackReasontype · línea 59
pub const FallbackReason = enumWhy the zig engine was replaced by libav on the way.
registry.Openedtype · línea 80
pub const Opened = structSin ///.
registry.Probedtype · línea 86
pub const Probed = structSin ///.
registry.Registrytype · línea 93
pub const Registry = structSin ///.
registry.Registry.initfn · línea 100
pub fn init(zig: contract.MediaEngine, libav: ?contract.MediaEngine, config: Config) Error!RegistryRejects a configuration that names an engine that is not built in.
registry.Registry.fallbackCountfn · línea 105
pub fn fallbackCount(self: *const Registry, reason: FallbackReason) u64Sin ///.
registry.Registry.enginefn · línea 112
pub fn engine(self: *const Registry, kind: contract.EngineKind, libav: LibavAdmission) Error!contract.MediaEngineThe engine kind, if built in and admitted for the bytes at hand
(dec-0117 I6): libav for a file it may not parse in this process is
EngineNotAllowed, never a silent replacement.
registry.Registry.supportsfn · línea 121
pub fn supports(e: contract.MediaEngine, info: *const facts.ContainerInfo, opts: packager.Options) boolThe engine declares what the file needs: its container and the codec of every stream the session would package.
registry.Registry.probefn · línea 145
pub fn probe(self: *const Registry, gpa: std.mem.Allocator, src: contract.ByteSource, cancel: *const contract.CancelToken, requested: ?Choice, libav: LibavAdmission) Error!ProbedFacts of src by the engine requested names (or the configured
default), under the same rules as open: libav is the admission
for src (dec-0117 I6: .refused for a file of an untrusted root,
and then libav never sees a byte: by name it is EngineNotAllowed,
under auto the zig error stands). Under auto, a container zig
does not read (UnknownFormat, Unsupported) goes to libav when
built in; a container zig reads but fails on is a hot fallback, only
with fallback = libav, and reported in Probed.fallback. The
caller owns info.
registry.Registry.openfn · línea 173
pub fn open(self: *Registry, gpa: std.mem.Allocator, src: contract.ByteSource, cancel: *contract.CancelToken, requested: ?Choice, opts: packager.Options, libav: LibavAdmission) Error!OpenedResolves requested (or the configured default) for src and opens a
packaging session with it. cancel must outlive the session.