KallDrexx / rust-media-libs

Rust based libraries for misc media functionality
Apache License 2.0
229 stars 58 forks source link

send_metadata shouldn't take an Rc #19

Closed jamesbirtles closed 3 years ago

jamesbirtles commented 3 years ago

Currently the send_metadata fn on a ServerSession takes the stream metadata as an Rc which seems like an odd design choice when it could easily take &StreamMetadata. This is causing me to need to create an Rc whenever I call this as I don't already have the metadata in an Rc and prevents me from using something like an Arc

https://github.com/KallDrexx/rust-media-libs/blob/682fffea0b2f17e3dc2d1906cee93f741ac154f3/rtmp/src/sessions/server/mod.rs#L219

Happy to submit a PR changing this if there are no objections

KallDrexx commented 3 years ago

I have no idea why I made this a Rc<T> anymore, but agree it's not needed. I'd approve a PR to change this.

KallDrexx commented 3 years ago

Uploaded crate 0.4.0 to crates.io with the change! Thanks again.