v1.0.0-beta-1
Pre-release
Pre-release
·
101 commits
to master
since this release
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 changes
- All classes have been audited, non-functional legacy methods removed or replaced, documentation updated and links added to upstream GStreamer documentation where appropriate. Any methods exposing lowlevel classes have been removed or rewritten.
- Minimum requirements have been updated to Java 8 and JNA 5.2.
- Version support has been added to
Gst.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 ofGst.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. - Non-functional legacy classes have been removed, including all of the controller package and various interface classes.
- GObject, GError and various GIO related classes have been moved into the GLib package. This is an initial step towards separating out GStreamer and GLib bindings into separate libraries in future.
- NativeObject and various other lowlevel classes have been moved out of lowlevel and into the GLib package as official API.
- Event, Message and Query, as well as related classes have been moved into their respective packages, partly to improve encapsulation.
- WebRTC classes have been moved into their own package.
- Enums have been rewritten around
NativeEnumandNativeFlaginterfaces (in GLib package). Methods acceptingintflags (eg.SeekFlags) now takeEnumSetand related int constants are now enum. - Methods accepting or returning
ClockTimenow take or return along. 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.ClockTimeremains as a collection of utility methods for working with these values. It still doesn't (yet) correctly handle "negative" values. - New memory handling and removal of finalization. A new
NativeObject.Handletype 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, onlyGObjectinstances were cached to ensure the sameNativeObjectwas returned for any pointer - this now applies to allNativeObjectsubclasses. All garbage collection tests pass with the new code, but there may be possibility for regressions caused by slightly different behaviour. - A new
Nativesutility class provides access to methods required for translating to and from Java objects and native representations where required, including translation into aGPointer(see below) or rawPointer.Natives.objectFor()methods replicate functionality previously inNativeObjectto get the Java representation of a native reference. These should be used in all cases in favour ofNativeObject.Initializerexcept where the native call is a constructor. - New extension mechanism to register additional
NativeObjectsubclasses (it was theoretically possible to achieve this before, but with major caveats and unsupported). SeeNativeObject.TypeRegistrationandNatives.registration(..). Instances ofNativeObject.TypeProvidershould be made available by the standard JavaServiceLoadermechanism. Internal types use the same mechanism, reducing uses of reflection in the library. GPointerand subclasses have been added to thelowlevelpackage. These are subclasses of JNA'sPointerTypeand 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.- Travis CI configuration added. All future PR's must pass before integration, and should include tests where appropriate. The current CI only covers GStreamer 1.8 (baseline), but will be extended to include testing on later GStreamer as well. Tests may need to be version aware if they target features higher than 1.8.