org.gstreamer
Class MiniObject
java.lang.Object
org.gstreamer.lowlevel.NativeValue
org.gstreamer.lowlevel.Handle
org.gstreamer.lowlevel.NativeObject
org.gstreamer.lowlevel.RefCountedObject
org.gstreamer.MiniObject
- Direct Known Subclasses:
- Buffer, Event, Message, Query
public class MiniObject
- extends RefCountedObject
Lightweight base class for the GStreamer object hierarchy
MiniObject is a baseclass like GObject
, but has been stripped down of
features to be fast and small.
It offers sub-classing and ref-counting in the same way as GObject does.
It has no properties and no signal-support though.
Method Summary |
protected void |
disposeNativeHandle(com.sun.jna.Pointer ptr)
|
boolean |
isWritable()
Checks if a mini-object is writable. |
protected
|
makeWritable(java.lang.Class<T> subclass)
Makes a writable instance of this MiniObject. |
protected void |
ref()
|
protected void |
unref()
|
Methods inherited from class org.gstreamer.lowlevel.NativeObject |
classFor, disown, dispose, equals, finalize, getNativeAddress, handle, hashCode, initializer, initializer, instanceFor, invalidate, isDisposed, nativeValue, objectFor, objectFor, objectFor, objectFor, toString |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
MiniObject
public MiniObject(NativeObject.Initializer init)
- Creates a new instance of MiniObject
isWritable
public boolean isWritable()
- Checks if a mini-object is writable. A mini-object is writable
if the reference count is one and the
MiniObjectFlags.READONLY
flag is not set. Modification of a mini-object should only be
done after verifying that it is writable.
- Returns:
- true if the object is writable.
makeWritable
protected <T extends MiniObject> T makeWritable(java.lang.Class<T> subclass)
- Makes a writable instance of this MiniObject.
The result is cast to subclass.
- Parameters:
subclass
- the subclass to cast the result to.
- Returns:
- a writable version of this MiniObject.
ref
protected void ref()
- Specified by:
ref
in class RefCountedObject
unref
protected void unref()
- Specified by:
unref
in class RefCountedObject
disposeNativeHandle
protected void disposeNativeHandle(com.sun.jna.Pointer ptr)
- Specified by:
disposeNativeHandle
in class NativeObject