BusStream: Missing details about internal sync handler usage in docs
https://docs.rs/gstreamer/latest/gstreamer/bus/struct.BusStream.html looks to be rather empty in terms of documentation and I used it based on example code.
Turns out that:
- It uses
gst::Bus::set_sync_handler
internally, so it can't be combined in user code together with one when wanting to process some bus message types synchronously, as gstreamer supports only one being installed, so whichever is made first (user codeset_sync_handler
call vs BusStream creation via.stream()
) doesn't function. - It is async, while making use of the GstBus sync handler. While on hindsight it being async obvious, it might be worth a note.
- As a non-doc note, I wonder if it actually could be implemented through gstreamer message bus async handler methods - if it's async anyways due to async/await usage, maybe it should not tie up the sync handler slot and thus actually allow using together with some messages getting handled via applications own sync handler callback, which then gets to decide if the "async" handler (BusStream) gets to see this via appropriate
GstBusSyncReply
return from it.
So it'd be nice to have some documentation for BusStream, and some of these aspects in particular.
cc @slomo as he asked me to file this to look at it :)