Commit graph

51 commits

Author SHA1 Message Date
Wim Taymans
fe17539f66 bufferlist: pass index as gint to _insert
Make the idx argument of _insert() a gint because we allow -1 as a value.
Improve annotation.
2012-07-23 16:27:34 +02:00
Wim Taymans
d7950e4466 bufferlist: improve foreach function
Make the foreach function return FALSE when one of the function calls returned
FALSE.
2012-07-17 12:53:15 +02:00
Edward Hervey
d3ffa82639 Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03: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
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
2cab15c9f6 docs: improve API docs 2012-06-15 12:57:24 +02:00
Tim-Philipp Müller
b4a9a2f79e bufferlist: no need to store the size of the structure inside the structure 2012-06-15 10:26:56 +01: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
974c708041 bufferlist: small doc fix 2011-12-22 16:02:05 +01:00
Wim Taymans
03cdd32b33 bufferlist: avoid reading past the array
When the foreach function told us to remove the buffer from the list, decrease
the length of the array or else we might read past the last item in the array.
2011-11-23 18:05:00 +01:00
Wim Taymans
88e12228cf bufferlist: clean up API
gst_buffer_list_len() -> gst_buffer_list_length()
gst_buffer_list_sized_new() -> gst_buffer_list_new_sized()
2011-11-02 08:59:43 +01:00
Wim Taymans
8a1f401dfd docs: fix docs 2011-09-26 20:47:35 +02:00
Wim Taymans
a952de69dd miniobject: change to GST_DEFINE_MINI_OBJECT_TYPE
Append _TYPE to the macro for consistency with other similar macros.
2011-08-29 17:06:18 +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
4145598972 gst: add some _priv prefixes to private methods 2011-08-29 13:27:26 +02:00
Sebastian Dröge
65eafd9340 Merge branch 'master' into 0.11
Conflicts:
	docs/gst/gstreamer-sections.txt
	gst/gstelementfactory.c
	gst/gstminiobject.c
2011-05-05 12:27:51 +02:00
Stefan Kost
81c32bc56e docs: we don't need to document private members in opaque structs 2011-05-03 13:03:20 +03:00
Sebastian Dröge
4db7fc58d2 bufferlist: Implement gst_buffer_list_foreach() 2011-04-19 20:52:05 +02:00
Sebastian Dröge
f51a23a83c Merge branch 'master' into 0.11 2011-04-16 08:59:58 +02:00
Sebastian Dröge
379d5dfb07 bufferlist: Add boxed type for GstBufferListIterator for gobject-introspection 2011-04-14 16:14:02 +02:00
Sebastian Dröge
bf6c3ea6df gst: Add some more gobject-introspection annotations 2011-04-14 16:14:01 +02:00
Wim Taymans
468ec5bc40 bufferlist: simplify bufferlists
We now have multiple memory blocks as part of the buffers and we can therefore
reduce the bufferlist to a simple array of buffers.
2011-03-31 17:51:02 +02:00
Wim Taymans
beac9c4a95 buffer: fix remaining unit tests 2011-03-28 20:08:46 +02:00
Wim Taymans
1eed0785af memory: more fixes
Fix span and is_span
Implement buffer memory
2011-03-28 20:08:45 +02:00
Sebastian Dröge
4e16347bfa Merge branch 'master' into 0.11
Conflicts:
	gst/gstbufferlist.c
2011-03-17 10:50:43 +01:00
Jonas Holmberg
c4c06a2b88 bufferlist: Use a GQueue instead of a GList
Adding a buffer to the end of a GstBufferList is supposed to be a fast
operation, but it was not since the iterator does not advance its
nextpointer when adding buffers and GList does not have a tail pointer.
Using a GQueue to store the buffers makes it easier to add buffers to
the end of the list and this operation will now be much more efficient.

Adding an entire GList of buffers using
gst_buffer_list_iterator_add_list() will however have to iterate over
the list being added to be able to update the tail pointer in the
GQueue.
2011-03-11 14:31:14 +01:00
Wim Taymans
b108e3b999 miniobject: cleanups
Use the stored size in the miniobject to free the miniobject.
Refactor some init methods.
2011-02-23 16:48:00 +01:00
Wim Taymans
70be8d8d95 improve type registration 2011-02-23 10:35:36 +01:00
Wim Taymans
cdde34f0ee fix compilation 2011-02-23 10:35:36 +01:00
Wim Taymans
fda9686b35 miniobject: work on making caps a boxed type
More work on making miniobject a simple allocated struct.
2011-02-23 10:34:08 +01:00
Edward Hervey
3efb73c121 gst: documentation fixups and annotation
Reported by enabling the --warn-all option of g-ir-scanner
2010-12-17 19:14:41 +01:00
Tim-Philipp Müller
3256c708be docs: gst: more gobject introspection annotations
Many of these are superfluous, added for clarity.
2010-12-07 18:37:04 +00:00
Wim Taymans
0447e72c97 bufferlist: add function to add a list of buffers
Add a function to add a list of buffers to the bufferlist.
2010-09-17 17:35:45 +02:00
Sebastian Dröge
699385f715 bufferlist: Initialize the GType cache for the bufferlist again
This was accidentially removed with last commit.
2010-08-08 17:57:52 +02:00
Sebastian Dröge
d5c0b3311b bufferlist: Don't chain up finalize to the parent class
GstMiniObject::finalize does nothing and this prevents a
runtime-type-check cast and function call per buffer list.
2010-08-06 19:38:22 +02:00
Shixin Zeng
d41997040b gst: make _get_type() in gst/* thread safe
This is not really necessary here because everything is
initialized from gst_init() already but using G_DEFINE_TYPE()
removes some copy&paste boilerplate code.
2010-08-06 19:35:59 +02:00
Stefan Kost
46899ff8ba docs: use informalfigure tag to not syntax highlight the content 2010-04-08 10:47:03 +03:00
Benjamin Otte
a9d1a493a7 Fixes for -Wwrite-strings
This changes some APIs in compatible ways:
- Some functions now take "const char *" arguments, not "char *"
- Some structs now have "conts char *" members, not "char *"
The changes may cause warnings when compiling with the right warning
flags. You've been warned.

Also adds -Wwrite-strings as a warning flag in configure.ac.

https://bugzilla.gnome.org/show_bug.cgi?id=611692
2010-03-10 20:50:10 +01:00
Tim-Philipp Müller
05e9dd968c Revert "docs: fix ASCII art so that iterators are aligned property to the diagram"
This reverts commit ae60d06e9e (fixes: #609166)
2010-02-07 10:04:09 +01:00
Tim-Philipp Müller
ae60d06e9e docs: fix ASCII art so that iterators are aligned property to the diagram 2010-02-01 23:47:18 +00:00
Tim-Philipp Müller
4878e95ff4 docs: add some more Since: markers to buffer list docs 2010-01-31 17:30:54 +00:00
Jonas Holmberg
824a0b5f5f bufferlist: update doc string 2009-08-11 15:21:33 +02:00
Tim-Philipp Müller
4d76b175ef docs: fix gtk-doc /*< private >*/ marker 2009-07-02 01:18:57 +01:00
Wim Taymans
939f6045b1 bufferlist: fix example
The _do function now takes user_data in all cases.
2009-06-29 11:55:14 +02:00
Jonas Holmberg
0e66315f2d docs: fix some typos 2009-06-29 11:07:40 +02:00
Wim Taymans
6438f6f9b9 bufferlist: Various cleanups
Add new method to iterate a bufferlist without having to allocate an iterator.
Add convenience method for getting an item from the list based on the group and
index.
Remove redundant _do_data callback and method.
Update unit-tests and add some more for the new methods.
2009-06-19 15:31:53 +02:00
Wim Taymans
2dcbe1a4d3 bufferlist: make objects opaque 2009-05-12 16:18:48 +02:00
Wim Taymans
19dc33935e bufferlist: fix a comment 2009-05-12 15:33:25 +02:00