Skip to content

v1.4.0

Latest
Compare
Choose a tag to compare
@neilcsmith-net neilcsmith-net released this 14 Jan 16:19
· 12 commits to master since this release

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 and element-setup signals so that automatically added elements can be configured.
    • Added wrapper enum and methods for controlling the PlayBin flags property.
  • Added Element::seekSimple, mapping gst_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 in Gst::init.
  • Rewritten iteration used in Element::getPads and Bin::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 via jna.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.