Repository navigation
fix(io): let custom readers skip disc probing - #301
superuser404notfound merged 2 commits into
Conversation
|
Thanks for this, and for the thorough write-up. I reviewed and verified it locally:
The reasoning holds for custom readers in particular: unlike a URL source there is no path extension to gate on (custom sources share a placeholder URL internally), so an explicit source fact from the caller is the only reliable signal. One optional nit while it is still in draft: the README SMB snippet now shows Nothing blocking from my side. Let me know when you want it out of draft and I will merge it. |
|
Thanks for the review and for verifying the witness. I applied the README suggestion in ab84715: the canonical SMB example now keeps the safe default, and the ordinary-media opt-out is documented separately with an explicit note to retain the default for raw ISO/UDF images. The follow-up is docs-only and git diff --check passes. I have marked the PR ready for review. |
|
Merged as One thing I resolved by hand on the way in, so it does not surprise you: your CHANGELOG entry sat under The next release carries it, and both consumer apps get it in the same pass. There are three follow-ups I noted while reviewing, all engine-side and none of them yours to carry:
Your opt-out is the right mechanism regardless of those: a custom source has no path extension to gate on, unlike a URL, so an explicit fact from the caller is the only reliable signal. |
Summary
IOReader.discImageProbeEnabled, defaulting totrueDiscReader.wrapwhen a custom reader declares that it represents ordinary mediaSMBIOReaderand preserve it across independent-reader clonesWhy
Every custom
IOReadercurrently enters disc recognition before its supplied container hint is applied. For an ordinary remote media file, that performs sparse reads at the ISO9660 and UDF signature offsets even though the caller already knows the source is not a disc image. Those reads are network round trips, and the cost can recur when playback creates independent readers for subtitles or frame extraction.URL sources already gate remote disc recognition by file extension. Custom readers have no equivalent way to communicate that source fact.
Compatibility
The new property defaults to
true, so existing readers and raw ISO/UDF sources keep automatic DVD/Blu-ray recognition. The publicMediaSource.customcase remains unchanged, avoiding a source break for callers that pattern-match its associated values.Validation
swift test0x8001and256 * 2048