gstreamer-java / gst1-java-core

Java bindings for GStreamer 1.x
GNU Lesser General Public License v3.0
188 stars 72 forks source link

Stop GstIterator keeping references alive until GC. #234

Closed neilcsmith-net closed 3 years ago

neilcsmith-net commented 3 years ago

Change GstIterator support to stop keeping references alive until garbage collection runs. This includes keeping a reference to the parent object (eg. Element / Bin) that has the iterated elements or pads.

Migrate lowlevel GstIterator API to typed pointer. Move GstIterator from NativeObject subclass to utility method holder. Directly fill list and free gstiterator eagerly. Update Element (pads) and Bin (elements) methods.

The returned lists are no longer wrapped via Collections.unmodifiableList(..) and the underlying type is changed from LinkedList to ArrayList.