Skip to content
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

Feature request: Support Writer for T that is not Seek #17

Open
OxleyS opened this issue Jun 12, 2024 · 1 comment
Open

Feature request: Support Writer for T that is not Seek #17

OxleyS opened this issue Jun 12, 2024 · 1 comment

Comments

@OxleyS
Copy link
Contributor

OxleyS commented Jun 12, 2024

In my particular use case of this library, we don't need the seeking headers or durations that are normally written on finalization, so we should be able to use a writer that doesn't support seeking.

This will require some changes on the -sys side to support passing nullptr for get_position/set_position seek-related functions, as well as an alternative constructor for Writer. If an API break is okay, then it may be best to remove Writer::new(), and have Writer::from_seekable() and Writer::from_non_seekable() instead. If we want to avoid an API break, I think it'd be acceptable to consider the seekable one "blessed" with Writer::new() and just add a Writer::from_non_seekable().

I don't mind contributing these changes myself (once I'm ready to do so on my end), but I wanted to know what you guys thought about the API break. If we do plan to do it, we could probably lump it in the same major version bump as the change proposed in #14.

@kornelski
Copy link
Collaborator

Good idea. You can remove bounds from the struct Writer (they don't need to be on the struct), and add fn new_non_seek().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants