Implement file to file external decoder - #4531
Merged
Merged
Conversation
toots
marked this pull request as ready for review
June 22, 2025 15:53
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Aug 4, 2025
toots
enabled auto-merge
August 4, 2025 14:19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR creates a new type of external decoder that works at the file level.
Looking back, using external processes to handle live decoding inside the streaming loop was not a really smart idea. But it was also done before we had a fully fledged protocol resolution pipe line.
With this PR, we add a new type of protocol that operates at the file level. These protocols are checked when the request resolution return a local file and use file extension and mime types.
The protocol takes a local file and return a uri. This means that we can potentially kick back a
annotate:uri to inline metadata decoding, typically something of the form:annotate:meta="value",...,:/path/to/decoded/file.wavFiles are decoded as part of the request resolution pipeline and the streaming loop can operate at the file level using an internal decoder without all the potential hangup of having to read/write from an external process. Woof!
On the user-facing API, we still name file-base protocol decoders. The old decoders are fully removed and we introduce a new
decoder.add.Being non backward-compatible simplifies the code a lot. The new decoders should be pretty easy to write if you're using the old decoder API.