gst.mini_object
Module for [MiniObject] class
Types 1
#GstMiniObject is a simple structure that can be used to implement refcounted types.
Subclasses will include #GstMiniObject as the first member in their structure and then call gst.mini_object.MiniObject.init_ to initialize the #GstMiniObject fields.
gst.mini_object.MiniObject.ref_ and gst.mini_object.MiniObject.unref increment and decrement the refcount respectively. When the refcount of a mini-object reaches 0, the dispose function is called first and when this returns true, the free function of the miniobject is called.
A copy can be made with gst.mini_object.MiniObject.copy.
gst.mini_object.MiniObject.isWritable will return true when the refcount of the object is exactly 1 and there is no parent or a single parent exists and is writable itself, meaning the current caller has the only reference to the object. gst.mini_object.MiniObject.makeWritable will return a writable version of the object, which might be a new copy when the refcount was not 1.
Opaque data can be associated with a #GstMiniObject with gst.mini_object.MiniObject.setQdata and gst.mini_object.MiniObject.getQdata. The data is meant to be specific to the particular object and is not automatically copied with gst.mini_object.MiniObject.copy or similar methods.
A weak reference can be added and remove with gst.mini_object.MiniObject.weakRef and gst.mini_object.MiniObject.weakUnref respectively.
void type(gobject.types.GType propval) @property nothrowSet `type` field. Params: propval = the GType of the objectvoid lockstate(int propval) @property nothrowSet `lockstate` field. Params: propval = atomic state of the locksvoid copy(GstMiniObjectCopyFunction propval) @property nothrowSet `copy` field. Params: propval = a copy functionGstMiniObjectDisposeFunction dispose() @property nothrowGet `dispose` field. Returns: a dispose functionvoid dispose(GstMiniObjectDisposeFunction propval) @property nothrowSet `dispose` field. Params: propval = a dispose functionvoid free(GstMiniObjectFreeFunction propval) @property nothrowSet `free` field. Params: propval = the free functionvoid addParent(gst.mini_object.MiniObject parent) nothrowThis adds parent as a parent for object. Having one ore more parents affects the writability of object: if a parent is not writable, object is also not writable, regardless of its refcount. object ...void * getQdata(glib.types.Quark quark) nothrowThis function gets back user data pointers stored via [gst.mini_object.MiniObject.setQdata].bool isWritable() nothrowIf mini_object has the LOCKABLE flag set, check if the current EXCLUSIVE lock on object is the only one, this means that changes to the object will not be visible to any other object.bool lock(gst.types.LockFlags flags) nothrowLock the mini-object with the specified access mode in flags.void removeParent(gst.mini_object.MiniObject parent) nothrowThis removes parent as a parent for object. See [gst.mini_object.MiniObject.addParent].void setQdata(glib.types.Quark quark, void * data, glib.types.DestroyNotify destroy) nothrowThis sets an opaque, named pointer on a miniobject. The name is specified through a #GQuark (retrieved e.g. via [glib.global.quarkFromStaticString]), and the pointer can be gotten back from the obj...void * stealQdata(glib.types.Quark quark) nothrowThis function gets back user data pointers stored via [gst.mini_object.MiniObject.setQdata] and removes the data from object without invoking its `destroy()` function (if any was set).void unlock(gst.types.LockFlags flags) nothrowUnlock the mini-object with the specified access mode in flags.bool replace(gst.mini_object.MiniObject olddata = null, gst.mini_object.MiniObject newdata = null) static nothrowAtomically modifies a pointer to point to a new mini-object. The reference count of olddata is decreased and the reference count of newdata is increased.bool take(gst.mini_object.MiniObject olddata, gst.mini_object.MiniObject newdata) static nothrowModifies a pointer to point to a new mini-object. The modification is done atomically. This version is similar to [gst.mini_object.MiniObject.replace] except that it does not increase the refcount ...this(gobject.types.GType type = gobject.types.GType.init, int refcount = int.init, int lockstate = int.init, uint flags = uint.init, GstMiniObjectCopyFunction copy = GstMiniObjectCopyFunction.init, GstMiniObjectDisposeFunction dispose = GstMiniObjectDisposeFunction.init, GstMiniObjectFreeFunction free = GstMiniObjectFreeFunction.init)Create a `mini_object.MiniObject` boxed type. Params: type = the GType of the object refcount = atomic refcount lockstate = atomic state of the locks flags = extra flags. copy = a copy function dis...