Declaraciones públicas de media-daemon/ipc/probe_ipc.zig (media-daemon: IPC de qry.media.probe).
apps/docs/generated/zig/media-daemon-ipc-probe.jsonPágina generada desde
native/zig/media-daemon/ipc/probe_ipc.zig. No se edita a mano:bun run docs:genla regenera ybun run docs:checkfalla si difiere.
qry.media.probe (dec-0110 ME1; protocols/session-ipc
messages/media-engine.md): the facts of an asset by the daemon's media
engine, in process. It replaces the ffprobe that workers-svc spawned as a
process (cmd.workers.probe, retired): FFmpeg is only ever a library here
(dec-0110 §1), and the Zig engine answers first.
The request arrives verified by spire (signature, allowlist, contract).
What is left is what the schema cannot say: the path guard (the source
opens fd-relative under the media root, dec-0117 I3), the engine the
registry resolves (libav only for a file of a trusted root, dec-0117 I6), and the untrusted facts of the file: every value that
goes back is checked against the reply contract here, so a hostile file
can drop a field but never make the reply invalid (an invalid reply would
be a handler_error, i.e. no facts at all for a legitimate file).
max_streamsconst · línea 33
pub const max_streams = 64MAX_PROBE_STREAMS of the contract.
Contexttype · línea 39
pub const Context = structWhat the probe handler needs from the daemon (nothing owned).
max_probe_msconst · línea 53
pub const max_probe_ms: u64 = engine_source.max_request_msLongest a probe may run, whatever deadline the request carries (or none):
the ceiling every engine call made for a control request shares
(engine_source.max_request_ms).
probeBudgetMsfn · línea 57
pub fn probeBudgetMs(deadline_ms: ?u64, now_ms: u64) u64Milliseconds the probe may still run: up to the request's deadline,
never more than max_probe_ms; 0 if the deadline already passed.
ProbeSourcetype · línea 64
pub const ProbeSource = structThe source a probe reads: opened under root://<rootId>/<relPath> as its label, never the
bare relPath (dec-0135 D5: the label reaches the source's own log lines and, if it ever
keys a cache, the cache's).
ProbeSource.openfn · línea 71
pub fn open(gpa: std.mem.Allocator, ref: media_core.AssetRef) !ProbeSourceOpens ref fd-relative under its root (dec-0117 I7) with the root:// label; the
caller owns the result and releases it with close.
ProbeSource.closefn · línea 78
pub fn close(self: *ProbeSource) voidCloses the file and frees the label.
probefn · línea 85
pub fn probe(ctx: Context, arena: std.mem.Allocator, req: contracts.MediaProbeRequest) std.mem.Allocator.Error!Replyqry.media.probe. Strings and the stream array of the reply live in arena.