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

MediaSourceStream is not Send #24

Closed
james7132 opened this issue Apr 10, 2021 · 1 comment · Fixed by #31
Closed

MediaSourceStream is not Send #24

james7132 opened this issue Apr 10, 2021 · 1 comment · Fixed by #31

Comments

@james7132
Copy link
Contributor

Due to wrapping a Box<dyn MediaSource> instead of Box<dyn MediaSource + Send>, MediaSourceStream is not safe to send across thread boundaries. Is this intentional?

@pdeljanov
Copy link
Owner

Not really intentional.

Symphonia was initially just a project for me to learn Rust, so multi-threading was not something I was thinking about. The original design was actually pretty hostile to multi-threading, but it is better suited to it now.

I believe it would be advantageous if MediaSourceStream, FormatReaders, and Decoders can all be moved between threads, though I haven't considered all the implications.

pdeljanov pushed a commit that referenced this issue Jun 10, 2021
Make the core traits (Decoder, FormatReader, MediaSource, MetadataReader) Send
to allow them to be moved across threads.

Resolves #24.
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

Successfully merging a pull request may close this issue.

2 participants