Commit graph

112 commits

Author SHA1 Message Date
Philip Withnall 9edef56efc miniobject: Add missing (nullable) annotations
gst_mini_object_replace() can take NULL mini-objects.

https://bugzilla.gnome.org/show_bug.cgi?id=730873
2014-06-26 19:16:07 +02:00
Evan Nemerson 2759882379 introspection: add missing (nullable) annotations to return values
Support for (nullable) was added to G-I at the same time as nullable
return values.  Previous versions of G-I will not mark return values as
nullable, even when an (allow-none) annotation is present, so it is
not necessary to add (allow-none) annotations for compatibility with
older versions of G-I.

https://bugzilla.gnome.org/show_bug.cgi?id=730957
2014-06-26 18:56:38 +02:00
Sebastian Dröge 066fdcd432 Revert "miniobject: Add missing (nullable) annotations"
This reverts commit 96361e9b5c.

This was not supposed to be pushed yet!
2014-05-30 09:13:16 +02:00
Philip Withnall 96361e9b5c miniobject: Add missing (nullable) annotations
gst_mini_object_replace() can take NULL mini-objects.

https://bugzilla.gnome.org/show_bug.cgi?id=730873
2014-05-30 09:12:49 +02:00
Evan Nemerson e10266e3f3 docs: convert NULL, TRUE, and FALSE to %NULL, %TRUE, and %FALSE
This should help improve documentation generated for
languages other than C.

https://bugzilla.gnome.org/show_bug.cgi?id=730961
2014-05-30 00:20:27 +01:00
Tim-Philipp Müller 6eb6d9ec38 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 21:21:51 +01:00
Sebastian Rasmussen 53ae1b2c9c docs: Fix typos in function/object descriptions
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720029
2013-12-07 17:11:12 +00:00
Nicolas Dufresne 4656d18fd5 Add few missing allow-none annotation 2013-07-03 14:25:07 -04:00
Tim-Philipp Müller 666c8c11c6 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 20:44:48 +00:00
Olivier Crête fd846a7c64 miniobject: Always reject WRITE locks on READONLY miniobjects
Verify that mapping a read-only memory as read doesnt make it writable
2012-09-28 17:12:14 -04:00
Tim-Philipp Müller dddcc31c42 docs: fix up docs a bit 2012-08-11 23:41:33 +01:00
Wim Taymans 97441c27ee miniobject: check writability
fix the writability check for miniobjects. We should check the shared counter.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=681450
2012-08-09 16:18:59 +02:00
Wim Taymans 29976a009f miniobject: fix sharedness check 2012-07-19 13:35:34 +02:00
Wim Taymans fd23640001 miniobject: refuse write when object is shared
In all cases, refuse to write an object when it is shared by more than one
object (also when the object was locked before).

See https://bugzilla.gnome.org/show_bug.cgi?id=679145
2012-07-19 13:20:27 +02:00
Edward Hervey d3ffa82639 Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00
Matej Knopp 4afdef5586 miniobject: fix exclusive lock/unlock race 2012-07-10 09:46:36 +02:00
Wim Taymans e30930af4f miniobject: fix some miniobject docs 2012-07-05 16:18:27 +02:00
Wim Taymans 3b16efa1d1 miniobject: add lock functionality to GstMiniObject
Move the locking methods from GstMemory to GstMiniObject.
Add a miniobject flag to enable LOCKABLE objects. LOCKABLE objects can
use the lock/unlock API to control the access to the object.
Add a minobject flag that allows you to lock an object in readonly mode.
Modify the _is_writable() method to check the shared counter for LOCKABLE
objects. This allows us to control writability separately from the refcount for
LOCKABLE objects.
2012-07-05 11:19:16 +02:00
Wim Taymans d3f5dd0707 miniobject: add steal_qdata
Rework the qdata code a little
2012-06-26 09:51:10 +02:00
Tim-Philipp Müller 1be934f0dd miniobjects: pass copy, dispose and free function to gst_mini_object_init()
So mini objects don't have to poke into the GstMiniObject part
of the structure. Saves lines of code, and seems slightly cleaner.
We don't have proper OO hierarchies or methods here after all.
2012-06-23 20:02:02 +01:00
Wim Taymans 2cb9eba560 miniobject: hide qdata array layout 2012-06-18 15:22:26 +02:00
Wim Taymans 2cab15c9f6 docs: improve API docs 2012-06-15 12:57:24 +02:00
Wim Taymans eea41eb3a2 miniobject: expand docs a little
Add blurb about qdata and weak refs.
2012-06-15 11:24:46 +02:00
Wim Taymans 2a4079954a miniobject: add qdata
Keep track of qdata for miniobjects. Reuse the weak ref array for this because
we can.
2012-06-15 11:01:29 +02:00
Wim Taymans e57cda1429 miniobject: fix error in the weak ref handling
When 2 weak refs are added, the array is not resized big enough.
Simplify the weak ref handling code.
Free memory when we remove all weak refs.
Allow installing the same weak ref multiple times, like in gobject.
2012-06-15 10:58:21 +02:00
Wim Taymans 12aefaa078 miniobject: remove the size field
The size field is used by subclasses to store the total allocated size of the
memory for this miniobject. Because miniobject doesn't really do anything with
this field we can move it to the subclasses.
2012-06-14 17:11:11 +02:00
Wim Taymans ce67b0e539 docs: update more documentation 2012-03-29 13:34:50 +02:00
Wim Taymans 9aa9751938 review some docs 2012-03-28 18:12:23 +02:00
Wim Taymans a46f0862cd gst: improve debugging 2012-02-06 09:46:47 +01:00
Wim Taymans 321ee10bd6 trace: rework alloc tracing
Remove trace, we use debug log for that
Make alloc trace simpler, removing some methods.
Activate alloc trace with a GST_TRACE=3 environment variable.
Dump leaked objects atexit.
Provide an offset in the object where the GType can be found so that more
verbose info can be given for objects.
Remove -T option from gst-launch because tracing is now triggered with the
environment variable.
2012-01-27 17:54:43 +01:00
Wim Taymans 166f6e1cc5 trace: make alloc trace work for miniobject again 2012-01-27 15:33:48 +01:00
Wim Taymans 8a1f401dfd docs: fix docs 2011-09-26 20:47:35 +02:00
Wim Taymans f3b0d3cdbe init: add _get_type() functions
Remove gst_mini_object_register() and add a GST_DEFINE_MINI_OBJECT macro to
define a _get_type() function for the boxed miniobject.
Remove a bunch of custom _get_type() functions and replace them with the
miniobject macro.
Rename some _init method to _priv_*_initialize() like the rest of them.

Inspired by patch from Johan Dahlin and see bug #657603
2011-08-29 15:34:30 +02:00
Wim Taymans 1e59b651ba mini-object: use ref/unref directly in boxed copy/free
GLib will not call our copy/free with a NULL object
2011-08-29 12:38:54 +02:00
Wim Taymans ee235a6b07 miniobject: avoid race in bufferpool release
Avoid playing with the refcount to decide when a buffer has been recycled by the
dispose function. The problem is that we then temporarily can have a buffer with
a refcount > 1 being acquired from the pool, which is not writable. Instead use
a simple boolean return value from the dispose function to inform the called
that the object was recycled or not.
2011-07-25 12:53:10 +02:00
Wim Taymans 1b98eb34d7 miniobject: add new methods to manage miniobject pointers
Add a new method to steal the miniobject stored at a location.
Add a new method to store a miniobject in a location and taking ownership
of the miniobject.
2011-06-09 13:35:08 +02:00
Wim Taymans 4a646e0e76 Merge branch 'master' into 0.11
Conflicts:
	gst/gstghostpad.h
2011-05-19 11:30:06 +02:00
Stefan Kost 79b22cb2ed docs: use the same name for the argument in prototype and docs 2011-05-18 15:03:46 +03:00
Tim-Philipp Müller da21881f28 miniobject: delay private data initialisation until actually needed
We only use the private instance data for weak references for now,
so can delay initialisation until actually needed (microoptimisation)
2011-05-17 11:38:30 +01:00
Sebastian Dröge b935a814d9 Merge branch 'master' into 0.11
Conflicts:
	configure.ac
	docs/gst/gstreamer-sections.txt
	gst/gstbin.c
	gst/gstelement.c
	gst/gstelement.h
	gst/gstghostpad.c
	gst/gstminiobject.c
	gst/gstminiobject.h
	libs/gst/base/gstbasesrc.c
	libs/gst/base/gstbasetransform.c
	plugins/elements/gstinputselector.c
	tests/check/gst/gstminiobject.c
2011-05-16 16:53:04 +02:00
Tim-Philipp Müller 76ccd2a1e9 docs: fix up some Since markers and update for new multiqueue args 2011-05-14 14:05:52 +01:00
Sebastian Dröge 116972d6eb miniobject: Minor cleanup of last commit 2011-05-14 11:39:35 +02:00
José Alburquerque cf671d7b0a miniobject: Add weak referencing functionality
API: gst_mini_object_weak_ref()
API: gst_mini_object_weak_unref()

Add weak referencing functionality to GstMiniObject, which
allows to get notifications when an mini object is destroyed
but doesn't increase the real refcount. This is mostly
useful for bindings.

Fixes bug #609473.
2011-05-14 11:39:35 +02:00
Thiago Santos a750aac2dd miniobject: Fix dup_mini_object function to handle NULL gvalues
g_value_dup_object handles gvalues that contain NULL pointers,
gst_value_dup_mini_object should do the same.

https://bugzilla.gnome.org/show_bug.cgi?id=649195
2011-05-03 08:15:51 -03:00
Sebastian Dröge f51a23a83c Merge branch 'master' into 0.11 2011-04-16 08:59:58 +02:00
Sebastian Dröge bf6c3ea6df gst: Add some more gobject-introspection annotations 2011-04-14 16:14:01 +02:00
Wim Taymans f332b700d5 buffer: make memory writable in _peek
Make the memory writable when we are asked to _peek with MAP_WRITE.
Improve debugging of miniobject.
2011-04-06 19:00:28 +02:00
Wim Taymans 20ba453244 miniobject: fix debug 2011-04-06 16:37:40 +02:00
Wim Taymans 38ffe30745 memory: more work on implementing buffer memory 2011-03-28 20:08:46 +02:00
Wim Taymans dea2351539 miniobject: remove FIXME
Now that we don't subclass buffers anymore, the FIXME about limited
functionality of the copy function is irrelevant.
2011-03-04 18:11:19 +01:00