-
Notifications
You must be signed in to change notification settings - Fork 269
a stream is now seekable if bytes_len is known #744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Unfortunatly this reviels a bug(?) in symphonia regarding format recognition. M4a is no longer openable with symphonia. To resolve that we can set `seekable` to true without having `bytes_len` even though that is breaking an invarint. (seekable can not be true if bytes_len is unknown).
Can this be automatically tested? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I commented over at pdeljanov/Symphonia#340 (comment), there are legitimate reasons why a source could have a known byte_len
yet not be random-access seekable.
Therefore I would like to re-instate the builder option, and determine let can_seek = mss.is_seekable() && mss.byte_len().is_some()
.
Then in try_seek
we can still support seek, but only forward. When a users tries to seek backward, we could catch this error and propagate it with a help text "set byte_len to enable random access seeking".
from that comment, copied here for context:
Writing this PR I assumed such forward-seekable only applications are too niche to be worth supporting in rodio. As I understood it then it was either support them and make the general seek case less usable.
I was unaware this is an option. That seems like a good solution. @roderickvd would you mind taking this out of my hands? My symphonia knowledge is minimal, I do not have the time to dive into it and as we have seen this issue is resisting my quick attempts at quickly throwing something together. |
Sure, I'll try and make some time for it this week. With this and #731 we can hopefully put a release out. |
- Automatically enable is_seekable when byte_len is set - Add specific error for random access seeking without byte_len - Clarify documentation for builder methods with default states - Test forward-only vs random access seeking scenarios Fixes RustAudio#740 Supersedes RustAudio#744
Alternative proposed in #745 |
- Automatically enable is_seekable when byte_len is set - Add specific error for random access seeking without byte_len - Clarify documentation for builder methods with default states - Test forward-only vs random access seeking scenarios Fixes RustAudio#740 Supersedes RustAudio#744
* Improve seeking behavior and error handling - Automatically enable is_seekable when byte_len is set - Add specific error for random access seeking without byte_len - Clarify documentation for builder methods with default states - Test forward-only vs random access seeking scenarios Fixes #740 Supersedes #744 * Add missing required features for examples
Superseded by #745 |
Unfortunatly this reveals a bug(?) in symphonia regarding format recognition. M4a is no longer openable with symphonia. To resolve that we can set
seekable
to true without havingbytes_len
even though that is breaking an invarint. (seekable can not be true if bytes_len is unknown).