arturoc / gstreamer1.0-rs

Idiomatic bindings for Gstreamer on Rust.
MIT License
36 stars 14 forks source link

Prevent leak of watch in Bus::add_watch #28

Open barmand opened 7 years ago

barmand commented 7 years ago

The leak will be prevented only when remove_watch is called.

For a custom watch implementation: the benefit is that there is no need to use weak pointer in order to not leak resources used in the watch.

For a message parsing loop using the bus receiver (as done in the playbin example): the loop could be kept idle after eos to handle another play later and be stopped from another thread using remove_watch.