Commit graph

160 commits

Author SHA1 Message Date
Wim Taymans ebb14d95b2 buffer: more API tweaks
_trim -> _resize
_create_sub -> copy_region
2011-03-30 16:47:55 +02:00
Wim Taymans 030fcde837 memory: further memory tweaking
Allow for automatic merging of memory block in the _map function and automatic
freeing of the temporary memory.
Remove some unneeded functions.
Add possibility to force writable spanned memory.
2011-03-29 19:17:55 +02:00
Wim Taymans d9becdcd27 buffer: optimize memory handling 2011-03-29 13:51:25 +02:00
Wim Taymans a6d2490b10 buffer: move implementation details in private struct 2011-03-29 11:31:30 +02:00
Wim Taymans 6da19ffeb2 buffer: more buffer updates 2011-03-29 11:07:36 +02:00
Wim Taymans 826a7d83d4 buffer: more fixes 2011-03-28 20:08:47 +02:00
Wim Taymans a12373b2ee buffer: add more methods 2011-03-28 20:08:47 +02:00
Wim Taymans beac9c4a95 buffer: fix remaining unit tests 2011-03-28 20:08:46 +02:00
Wim Taymans 38ffe30745 memory: more work on implementing buffer memory 2011-03-28 20:08:46 +02:00
Wim Taymans 1af328e785 memory: more work on porting the unit tests 2011-03-28 20:08:46 +02:00
Wim Taymans d82c8bd2af memory: port code to new buffer data API 2011-03-28 20:08:45 +02:00
Wim Taymans 1eed0785af memory: more fixes
Fix span and is_span
Implement buffer memory
2011-03-28 20:08:45 +02:00
Wim Taymans 6015312cf1 WIP use memory in buffer 2011-03-28 20:08:45 +02:00
Wim Taymans a55bc30f81 buffer: add pool to buffer structure
Keep a pointer to the bufferpool. Release the buffer to the pool when
finalizing. Make sure the pool sets itself as the pool member of buffers that it
sends out.
2011-03-02 11:33:24 +01:00
Wim Taymans 58060d7528 meta: separate add and get methods
Make separate api for getting and adding metadata. This allows us to pass extra
parameters to the init functions when creating metadata, which is needed for
specific API implementations.
Add beginnings of memory metadata.
2011-02-27 19:40:45 +01:00
Wim Taymans 9a3f158c73 buffer: remove useless method
Remove the method to retrieve metadata by api. One will always use the
GstMetaInfo to get metadata.
2011-02-26 18:14:36 +01:00
Wim Taymans 23aa5508f3 buffer: remove owner_priv now that we have metadata
Now that we have metadata we can remove the owner_priv field.
2011-02-25 16:31:11 +01:00
Wim Taymans 6f4a733063 metadata: Rename to GstMeta
Rename to the shorter GstMeta
Add docs
Add api to get metadata by API
2011-02-25 13:15:25 +01:00
Wim Taymans 8468dadc77 buffermeta: add beginnings of buffer metadata
Add first implementation of arbitrary buffer metadata. We use a simple linked
linked of slice allocated metadata chunks. Future implementations could use
something more performant.
Add get, remove, iterate methods to handle the metadata.
2011-02-25 10:34:47 +01:00
Wim Taymans 39d486e526 buffer: add owner private as intermediate solution
Add an owner private field where the owner of a buffer can store some extra
information. We can use this to implement most of the subclassing that happens
now. Later this will be removed and replaced by arbitrary buffer metadata.
2011-02-24 13:55:35 +01:00
Wim Taymans fd59a2cead miniobject: fix flags 2011-02-23 10:35:36 +01:00
Wim Taymans 70be8d8d95 improve type registration 2011-02-23 10:35:36 +01:00
Wim Taymans b82a0f5050 fix macros 2011-02-23 10:35:36 +01:00
Wim Taymans 086aac764d miniobject: make miniobject a boxed type
First attempt at making miniobject a simple boxed type.
2011-02-23 10:33:44 +01:00
Wim Taymans 5dd9ab1cab cleanups
Fix padding, remove deprecated symbols.
2011-02-22 16:04:12 +01:00
Robert Swain 2edb4fef54 miniobject, buffer: steal miniobject flag for use as MEDIA4 buffer flag
This was required to add a new MEDIA4 buffer flag for indicating
progressive/mixed telecine video buffers. There is no space for
additional flags in GstBuffer, so steal one from GstMiniObject.

https://bugzilla.gnome.org/show_bug.cgi?id=642671
2011-02-21 12:37:26 +00: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
Jeffrey S. Smith 4375e998ee Fix casts in a bunch of inline functions to maintain correct const-ness
Make code including GStreamer headers compile with -Wcast-qual by
maintaining const-ness when casting. Also fix function signature of
gst_byte_writer_set_pos(): the byte writer should not be marked as
const.

https://bugzilla.gnome.org/show_bug.cgi?id=627910
2010-09-02 00:09:08 +01:00
Sebastian Dröge b3d30dd459 docs: Move field specific Since markers at the same line
Fixes gobject-introspection warnings about Since being defined multiple times.
2010-01-14 10:44:16 +01:00
Wim Taymans 67bd9529d0 buffer: remove subbuffer subclass
Move the parent buffer pointer into the GstBuffer struct so that we can
remove the subbuffer class and type. This is interesting because it allows us to
more naturally implement methods to get the real type and parent
of a subbuffer (See #545501).
It should also be slightly faster because there is no extra object hierarchy to
initialize and free.
2009-12-26 00:02:17 +01:00
Stefan Kost 23da3639f0 docs: fix xrefs in docs
Fix typos in xrefs, links to non existing functions and rework plural forms.
2009-11-25 16:59:50 +02:00
Wim Taymans 5ebd818ea3 buffer: whitespace fixes 2009-09-01 16:52:32 +02:00
Wim Taymans 5467c64379 docs: Improve some docs
Rename some function variables and add some Return: to make the docs more happy.
2009-03-12 10:48:21 +01:00
Ali Sabil 136cfb3bed Convert unref/copy functions of GstMiniObject subclasses to static inline functions
unref and copy functions are sometimes used as function
pointers for example in the case of g_hash_table_new_full
as a GDestroyNotify function.

Currently GstBuffer, GstEvent, GstMessage and GstQuery
define their respective unref and copy functions as
macros, making use of gst_mini_object_unref/copy.
This approach works very well for most cases, except
for some automatically generated bindings (currently Vala),
where the memory management semantics are defined
declaratively.

The possible solutions would be to either convert all
the macros into static inline function, or change the
signature of gst_mini_object_unref to take a void*
instead of a GstMiniObject*.

Fixes bug #572480.
2009-02-22 18:51:08 +01:00
Edward Hervey 05f3cc9391 GstBufferFlags: Add "Since: 0.10.23" for the newly added flags 2009-02-19 18:05:07 +01:00
Edward Hervey 37d95a00e4 GstBufferFlags: Add 3 new media-specific buffer flags.
Partially fixes #163577
2009-02-19 16:04:43 +01:00
Wim Taymans cc5c8784cb gst/gstbuffer.h: Document the free_func.
Original commit message from CVS:
* gst/gstbuffer.h:
Document the free_func.
2008-11-18 09:52:41 +00:00
Andy Wingo 83d3b5d88e gst/gstghostpad.c (gst_ghost_pad_construct): If we got a template via g_object_get(), be sure to unref it.
Original commit message from CVS:
2008-10-08  Andy Wingo  <wingo@pobox.com>

* gst/gstghostpad.c (gst_ghost_pad_construct): If we got a
template via g_object_get(), be sure to unref it.

* gst/gstbuffer.h (GST_BUFFER_FREE_FUNC): Fix incorrect doc.
2008-10-08 08:54:55 +00:00
Tim-Philipp Müller cabf154dc6 gst/: Add 'Since' bits to gtk-doc chunks for new API.
Original commit message from CVS:
* gst/gstbuffer.h: (GST_BUFFER_FREE_FUNC):
* gst/gstghostpad.c: (gst_ghost_pad_construct):
Add 'Since' bits to gtk-doc chunks for new API.
2008-10-07 06:56:11 +00:00
Andy Wingo 267d0ba8f3 gst/gstbuffer.h (GST_BUFFER_FREE_FUNC): New API, a free function that will be called on the malloc_data to free it. B...
Original commit message from CVS:
2008-10-06  Andy Wingo  <wingo@pobox.com>

* gst/gstbuffer.h (GST_BUFFER_FREE_FUNC): New API, a free function
that will be called on the malloc_data to free it. Basically a way
to avoid subclassing when all you need is a different free
function, i.e. free() instead of g_free().

* gst/gstbuffer.c (gst_buffer_finalize): Free malloc_data via
calling the free function.
(gst_buffer_init): Initialize the free function to g_free.
2008-10-06 18:01:42 +00:00
Tim-Philipp Müller 4e121ae147 gst/: Move declaration of private _gst_foo_initialize() functions into our private header file where they should have...
Original commit message from CVS:
* gst/gst_private.h:
* gst/gstbuffer.h:
* gst/gstevent.h:
* gst/gstformat.h:
* gst/gstmessage.h:
* gst/gstplugin.h:
* gst/gstquery.h:
* gst/gsttaglist.h:
* gst/gstvalue.h:
Move declaration of private _gst_foo_initialize() functions into
our private header file where they should have been all along.
2007-11-02 18:35:37 +00:00
Stefan Kost de997d56cc gst/gstbuffer.h: Define GST_BUFFER_FLAG_GAP more strictly to enable optimizations based on it. Fix docs for GST_BUFFE...
Original commit message from CVS:
* gst/gstbuffer.h:
Define GST_BUFFER_FLAG_GAP more strictly to enable optimizations based
on it. Fix docs for GST_BUFFER_MALLOCDATA and GstBuffer.malloc_data.
2007-10-15 07:37:37 +00:00
Wim Taymans d04a298f6f gst/gstbuffer.h: Remove comma from last element in enum to avoid compile errors when using -pendantic. Fixes #464366.
Original commit message from CVS:
Patch by: <arenevier at fdn dot fr>
* gst/gstbuffer.h:
Remove comma from last element in enum to avoid compile errors when
using -pendantic. Fixes #464366.
2007-08-07 14:04:22 +00:00
Tim-Philipp Müller 2c5a8cdb31 API: add gst_buffer_try_new_and_alloc() plus unit test (#431940).
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbuffer.c: (gst_buffer_try_new_and_alloc):
* gst/gstbuffer.h:
* tests/check/gst/gstbuffer.c: (GST_START_TEST),
(gst_buffer_suite):
API: add gst_buffer_try_new_and_alloc() plus unit test (#431940).
2007-04-26 10:00:49 +00:00
Wim Taymans db43de1985 Add metadata copy functions. Fixes #393099.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbuffer.c: (gst_buffer_copy_metadata), (_gst_buffer_copy):
* gst/gstbuffer.h:
Add metadata copy functions. Fixes #393099.
* gst/gstutils.c: (gst_buffer_stamp):
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buffer):
Use new metadata copy functions.
2007-03-09 16:30:38 +00:00
Tim-Philipp Müller 5e4699885a gst/gstbuffer.h: Add an explicit cast to GstBuffer** to keep old code that added an explicit cast to GstMiniObject** ...
Original commit message from CVS:
* gst/gstbuffer.h:
Add an explicit cast to GstBuffer** to keep old code that added an
explicit cast to GstMiniObject** for gst_mini_object_replace()
compiling without warning.
2006-10-18 10:08:45 +00:00
Tim-Philipp Müller c64c4fd000 gst/gstbuffer.h: Fix gst_buffer_replace() macro to avoid gst_mini_object_replace()-related type-punned pointer warnings.
Original commit message from CVS:
* gst/gstbuffer.h:
Fix gst_buffer_replace() macro to avoid gst_mini_object_replace()-related
type-punned pointer warnings.
2006-10-17 10:30:27 +00:00
Thomas Vander Stichele ef9253d99c word refcounting more precisely for gst_value_*_buffer
Original commit message from CVS:
word refcounting more precisely for gst_value_*_buffer
2006-08-23 09:47:32 +00:00
Wim Taymans bc1bdfabab gst/gstbuffer.h: Avoid unneeded type checking.
Original commit message from CVS:
* gst/gstbuffer.h:
Avoid unneeded type checking.
API: GST_BUFFER_IS_DISCONT
* gst/gstminiobject.h:
Avoid type check in flag accessor.
* gst/gstelementfactory.h:
* gst/gstplugin.h:
* gst/gstpluginfeature.h:
Add _CAST macros.
API: GST_ELEMENT_FACTORY_CAST
API: GST_PLUGIN_CAST
API: GST_PLUGIN_FEATURE_CAST
2006-06-12 09:11:44 +00:00
Thomas Vander Stichele c7a428219b width respectationizing
Original commit message from CVS:
width respectationizing
2006-06-06 14:16:33 +00:00