Releases · gstreamer-java/gst1-java-core
v1.4.0 Key changessource-setup
and element-setup
signals so that automatically added elements can be configured.flags
property.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.Version::of
method (with some validation) for usage in Gst::init
.Element::getPads
and Bin::getElements
etc. to not require GC for cleanup (see below).mvn -Dgstreamer.path=<PATH_TO_GSTREAMER_BIN> verify
. NB. on macOS, passing the path via jna.library.path
should work as well.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.
v1.3.0 Key changesAlso see https://github.com/gstreamer-java/gst1-java-core/milestone/6?closed=1
ThanksThanks to @aveco-devel and @lafoletc for contributions in this release.
v1.2.0 v1.1.0This release brings full access to the GStreamer Controller API and a variety of other fixes and improvements.
Key changesgst-inspect
to check as the bindings don't currently expose this information. Fixes #157Element::linkFiltered
to link an element based on provided Caps
. Fixes #150GObject::set
for eg. resetting a PlayBin
sink to default. Fixes #142Structure::getValues
for extracting lists of values inside a native GstValueList
. Fixes #161Automatic-Module-Name: org.freedesktop.gstreamer
. This is for testing purposes only - please provide feedback if using the bindings on the module path.A big thank you to LivingAsOne for funding work on the Controller API.
Thanks to @MaZderMind and @PertsevRoman for their contributions to this release.
v1.0.0This is the first full release of gst1-java-core v1. The bulk of the work leading up to this release has been finalising, stabilising and documenting the API outside of the lowlevel package, completing the work of porting the original 0.10 bindings.
Key changes Changes in beta 1Gst.init()
. The minimum GStreamer requirement remains 1.8, although this is now enforced. If you require features that require a later version of GStreamer, you must use the version of Gst.init(...)
that takes a Version or these mappings will be disabled. eg. Gst.init(new Version(1, 14))
. There is also an annotation @Gst.Since(minor = 14)
for use on classes, methods and constants that require later versions - this annotation is included in the JavaDoc.NativeEnum
and NativeFlag
interfaces (in GLib package). Methods accepting int
flags (eg. SeekFlags
) now take EnumSet
and related int constants are now enum.ClockTime
now take or return a long
. This is for efficiency and consistency - GLib does not give all type information required to be consistent here. NB. the value is an unsigned 64-bit integer value in nanoseconds. ClockTime
remains as a collection of utility methods for working with these values. It still doesn't (yet) correctly handle "negative" values.NativeObject.Handle
type wraps all native pointers, and subclasses implement all ref, unref, free, etc. Handle subclasses should be used to call different native functions in these cases. Memory handling is a cleaner-like mechanism, but using the existing weak reference cache rather than additional phantom references. In the past, only GObject
instances were cached to ensure the same NativeObject
was returned for any pointer - this now applies to all NativeObject
subclasses. All garbage collection tests pass with the new code, but there may be possibility for regressions caused by slightly different behaviour.Natives
utility class provides access to methods required for translating to and from Java objects and native representations where required, including translation into a GPointer
(see below) or raw Pointer
. Natives.objectFor()
methods replicate functionality previously in NativeObject
to get the Java representation of a native reference. These should be used in all cases in favour of NativeObject.Initializer
except where the native call is a constructor.NativeObject
subclasses (it was theoretically possible to achieve this before, but with major caveats and unsupported). See NativeObject.TypeRegistration
and Natives.registration(..)
. Instances of NativeObject.TypeProvider
should be made available by the standard Java ServiceLoader
mechanism. Internal types use the same mechanism, reducing uses of reflection in the library.GPointer
and subclasses have been added to the lowlevel
package. These are subclasses of JNA's PointerType
and will form the basis of native mapping in future. They are already required for Handle-related functionality. They may become part of the API in future. Using anything else in lowlevel will likely break from release to release. Lowlevel is no longer included in the JavaDoc.GObject
subclasses can be GC'd after explicit call to dispose()
- fixes #146NativeObject.Handle
API and added documentation. The atomic reference and boolean fields are now correctly private (mistakenly left protected in beta-1). ownsHandle()
renamed as ownsReference()
.GObject
signal and Pad
probe native management into Handle
to ensure the callbacks are removed when GC'd as before.
invalidate()
and dispose()
. In general make sure to keep references to objects with callbacks and dispose of them explicitly - relying on the GC for this is not recommended.int
mask has been removed from the API.NativeObject
now implements AutoCloseable
. Defaults to calling dispose()
.GObject
subclass from a GValue
will now return a caller-owned reference (switched to g_value_dup_object
). Iterating objects, eg. by calling getPads()
would return and cache unowned objects whose lifecycle was not correctly tracked. This might cause regressions if code relied on the old behaviour.Bus
disposal is now linked to Pipeline
lifecycle. Bus instances will be GC'd even when not explicitly closed. Test for this no longer ignored.-Dglib.detachCallbackThreads=true
Updated beta for v1.0.0 - see v1.0.0-beta-1 for major changes.
GObject
subclasses can be GC'd after explicit call to dispose()
- fixes #146NativeObject.Handle
API and added documentation. The atomic reference and boolean fields are now correctly private (mistakenly left protected in beta-1). ownsHandle()
renamed as ownsReference()
.GObject
signal and Pad
probe native management into Handle
to ensure the callbacks are removed when GC'd as before.
invalidate()
and dispose()
. In general make sure to keep references to objects with callbacks and dispose of them explicitly - relying on the GC for this is not recommended.int
mask has been removed from the API.NativeObject
now implements AutoCloseable
. Defaults to calling dispose()
.GObject
subclass from a GValue
will now return a caller-owned reference (switched to g_value_dup_object
). Iterating objects, eg. by calling getPads()
would return and cache unowned objects whose lifecycle was not correctly tracked. This might cause regressions if code relied on the old behaviour.Bus
disposal is now linked to Pipeline
lifecycle. Bus instances will be GC'd even when not explicitly closed. Test for this no longer ignored.-Dglib.detachCallbackThreads=true
This is the first beta release of gst1-java-core v1. The bulk of the work leading up to this release has been finalising, stabilising and documenting the API outside of the lowlevel package, completing the work of porting the original 0.10 bindings.
Key changesGst.init()
. The minimum GStreamer requirement remains 1.8, although this is now enforced. If you require features that require a later version of GStreamer, you must use the version of Gst.init(...)
that takes a Version or these mappings will be disabled. eg. Gst.init(new Version(1, 14))
. There is also an annotation @Gst.Since(minor = 14)
for use on classes, methods and constants that require later versions - this annotation is included in the JavaDoc.NativeEnum
and NativeFlag
interfaces (in GLib package). Methods accepting int
flags (eg. SeekFlags
) now take EnumSet
and related int constants are now enum.ClockTime
now take or return a long
. This is for efficiency and consistency - GLib does not give all type information required to be consistent here. NB. the value is an unsigned 64-bit integer value in nanoseconds. ClockTime
remains as a collection of utility methods for working with these values. It still doesn't (yet) correctly handle "negative" values.NativeObject.Handle
type wraps all native pointers, and subclasses implement all ref, unref, free, etc. Handle subclasses should be used to call different native functions in these cases. Memory handling is a cleaner-like mechanism, but using the existing weak reference cache rather than additional phantom references. In the past, only GObject
instances were cached to ensure the same NativeObject
was returned for any pointer - this now applies to all NativeObject
subclasses. All garbage collection tests pass with the new code, but there may be possibility for regressions caused by slightly different behaviour.Natives
utility class provides access to methods required for translating to and from Java objects and native representations where required, including translation into a GPointer
(see below) or raw Pointer
. Natives.objectFor()
methods replicate functionality previously in NativeObject
to get the Java representation of a native reference. These should be used in all cases in favour of NativeObject.Initializer
except where the native call is a constructor.NativeObject
subclasses (it was theoretically possible to achieve this before, but with major caveats and unsupported). See NativeObject.TypeRegistration
and Natives.registration(..)
. Instances of NativeObject.TypeProvider
should be made available by the standard Java ServiceLoader
mechanism. Internal types use the same mechanism, reducing uses of reflection in the library.GPointer
and subclasses have been added to the lowlevel
package. These are subclasses of JNA's PointerType
and will form the basis of native mapping in future. They are already required for Handle-related functionality. They may become part of the API in future. Using anything else in lowlevel will likely break from release to release. Lowlevel is no longer included in the JavaDoc.Gst.parseLaunch()
(with support for single Element) and Gst.parseBinFromDescription()
, and deprecate Bin.launch()
and Pipeline.launch()
; add error logging - (#104 #113)Thanks @i-n-g-o @matthiasblaesing @a-morales @vinicius-tona
v0.9.3Buffer
API, adding support for setting / getting timestamps, offsets, buffer flags, etc.MessageType
values from GStreamer 1.10Pad::link
to throw an exception rather than return PadLinkReturn
- this is a breaking API change and may require code updates.NativeLong
size and Native.SIZE_T_SIZE
were the same - broke bindings on Java 9+ with Windows 10 x64.Thanks for help and contributions from @mutantbob and @matthiasblaesing
v0.9.2Structure
backed by a native GValueArray
public <T> List<T> getValues(Class<T> type, String fieldName); // type needed for validation public int[] getIntegers(String fieldName); public int[] getIntegers(String fieldName, int[] array); // allow caching of array public double[] getDoubles(String fieldName); public double[] getDoubles(String fieldName, double[] array);
query()
method to Element
API to support arbitrary queries, check if the query could be performed, access underlying query Structure
. Use eg. -SeekingQuery q = new SeekingQuery(Format.TIME); if (pipe.query(q)) { System.out.println(q.getStart() + " | " + q.getEnd()); //System.out.println(q.getStructure()); } else { System.out.println("Couldn't perform seeking query"); }
Gst.init()
now correctly extend NativeObject
(blocker for above features). Some potential for regression if anything relies on class initialization order of the removed non-NativeObject classes - other mechanism might be required, but all tests OK.You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4