Compare commits

...
Author SHA1 Message Date
enricobuehler 15bec23a4e fix(encode): the PyroWave worker proxy never wrote distrust_references, so its own guard test failed
Pre-existing on main, inherited by merging it. `distrust_references` arrived with the RFI
anchor work in `93c1ed07`; `RemotePyroWave` did not gain it, and the trait-coverage test
beside the impl caught exactly that.

The answer is a no-op, for the same reason `invalidate_ref_frames` returns false and
`request_keyframe` does nothing: PyroWave is intra-only, so every AU is already a
keyframe and there is no RFI anchor trust to withdraw. The in-process encoder reaches
the same answer by inheriting the trait default, and that is fine there.

It is not fine HERE, which is the point the guard test is making. This type is a proxy:
an inherited default means the worker never hears the call, so a method that does
something is silently dead on every worker-backed session while the in-process path
keeps working. The test therefore requires the method to be WRITTEN, so that "nothing to
do" is a visible decision rather than an omission. Written, with the reason.

Verified with CI's exact command — `cargo test -p pf-encode --features
nvenc,vulkan-encode,pyrowave` — 122 passed, and clippy clean under the same features.
2026-08-16 13:38:27 +02:00
@@ -677,6 +677,18 @@ impl Encoder for RemotePyroWave {
false
}
fn distrust_references(&mut self) {
// Nothing to distrust, for the same reason `invalidate_ref_frames` has nothing to
// invalidate and `request_keyframe` has nothing to request: PyroWave is intra-only, so
// every AU is already a keyframe and no RFI anchor trust exists to withdraw. The
// in-process encoder reaches the same answer by inheriting the trait's default.
//
// Written out rather than inherited BECAUSE this is the proxy. An unforwarded default here
// would mean the worker never hears the call — which for a method that does something is a
// feature silently dead on every worker-backed session, and is exactly what the
// trait-coverage test below exists to catch. The no-op has to be a visible decision.
}
fn set_pipelined(&mut self, _on: bool) -> bool {
// No pipelined-retrieve mode; the encode is synchronous by design.
false