Key changes
- Rewritten Bus messaging.
- Lazy creation of Message / Element source wrappers only when required (see below).
- Fixed ability to add and remove a BusSyncHandler (for synchronous message handling) as required.
- Messages can now be disposed explicitly within callbacks.
- Improved PlayBin API.
- Support for
source-setup
andelement-setup
signals so that automatically added elements can be configured. - Added wrapper enum and methods for controlling the PlayBin
flags
property.
- Support for
- Added
Element::seekSimple
, mappinggst_element_seek_simple
, and moved implementation of various other seek and query methods to Element rather than Pipeline as per upstream. - Added
Version::of
method (with some validation) for usage inGst::init
. - Rewritten iteration used in
Element::getPads
andBin::getElements
etc. to not require GC for cleanup (see below). - Fixed running with Windows MSVC build of GStreamer.
- Added ability to pass GStreamer path to Maven for running tests on Windows - eg.
mvn -Dgstreamer.path=<PATH_TO_GSTREAMER_BIN> verify
. NB. on macOS, passing the path viajna.library.path
should work as well.
Bus message / iteration memory handling changes.
A key part of this release has been rewriting bus messaging and pad / element iteration. This was done as part of some work for a Codelerity client's project, to ensure some key areas of the bindings now support explicit disposal as well as via the garbage collector.
In the Bus, Messages objects are now created lazily, and only when a sync callback or Bus.MESSAGE listener are connected. It's also now possible to dispose of the Message in either of those callbacks. Wrapper Elements for message sources are also created lazily only when required. Previously, the Message and the source Element wrappers were created for every message on the Bus, whether a callback required them or not. And the native references could only be cleared by garbage collection (which is still the default).
Calling getElements(), getPads(), etc. should no longer keep an extra reference on the iterator, or the called object (via the iterator) until next garbage collection.
Obviously there is some potential for issue here, particularly if a project inadvertently relies on native objects staying alive for longer. Please report any issues found if things work with 1.3.0 but not 1.4.0.