Commit graph

36 commits

Author SHA1 Message Date
Wim Taymans 5125437606 bufferpool: cleanup metadata in reset_buffer
Use the reset_buffer vmethod to remove the unpooled metadata from the buffer.
2011-12-23 15:37:45 +01:00
Wim Taymans d1a8695470 fix docs 2011-11-14 10:27:01 +01:00
Wim Taymans 4a7c3b929a .h: fix header files
Ensure correct indentation and :retab.
Make sure all structures have padding
Fix up some old ABI additions.
2011-11-11 17:30:03 +01:00
Wim Taymans 8a1f401dfd docs: fix docs 2011-09-26 20:47:35 +02:00
Wim Taymans 7c9be852bc bufferpool: add gst_buffer_pool_is_active() 2011-08-04 10:54:29 +02:00
Wim Taymans 60cb9cddd4 bufferpool: add method to check for an option
Add a method to check if an option is supported on the bufferpool.
2011-07-30 14:04:43 +02:00
Wim Taymans 733e94ada8 bufferpool: add options API to bufferpool
Make it possible to query the supported options of a bufferpool and enable
options. This is a bit more generic than the API to enable metadata. The purpose
is to make it possible to add new custom config options to the configuration of
the bufferpool when supported.
2011-07-29 17:10:09 +02:00
Wim Taymans dd045fd0ed bufferpool: add reset_buffer vmethod
Add a vmethod to reset a buffer to its original state. Add a default
implementation that resets the flags, timestamps and offsets.
Add some more docs.
2011-07-21 18:50:25 +02:00
Wim Taymans 2f429009a3 bufferpool: add macro to check for flushing 2011-07-15 11:52:22 +02:00
Wim Taymans a22274d7a1 bufferpool: add function to set metadata api
Add a function to retrieve an array of supported metadata apis from the the
bufferpool.
Add functions to configure and query the configured metadata apis in a
bufferpool configuration.
2011-06-20 13:26:06 +02:00
Wim Taymans 9b9b758688 bufferpool: small indentation fix 2011-06-13 11:51:08 +02:00
Wim Taymans 6ca5d44704 bufferpool: remove postfix parameter
Remove the postfix parameter, it's not used and can be done differently.
2011-06-11 18:52:42 +02:00
Tim-Philipp Müller 4b920eb5d2 docs: update for API changes
Also remove GST_PAD_CHECKGETRANGEFUNC macro
2011-06-05 18:57:56 +01:00
Wim Taymans 89121c18e5 bufferpool: make the default behaviour to wait
The most common case is to not specify any flags when doing the allocation. Make
the allocation from a pool with a maximum amount of buffers block by default for
this reason.
2011-06-03 12:40:56 +02:00
Wim Taymans 695facd923 bufferpool: add caps to the config
Add the caps to the configuration parameters of the pool.
Initialize the private data
2011-03-04 10:16:35 +01: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 e566910a18 bufferpool: Rework buffer management a little
Add start/stop methods to allow for bulk allocation of buffers.
Free buffers only when all outstanding buffers returned.
Make things more threadsafe wrt flushing and starting/stopping by
keeping track of start and stop method calls.
2011-03-02 11:23:21 +01:00
Wim Taymans 419a01af0f bufferpool: memory management cleanups
Use a lock to protect concurrect execution of set_config and set_active.
Start freeing the buffers when flushing and all buffers are returned to the
pool.
Make a copy of the config to avoid crashing with concurrent access.
2011-03-02 11:23:21 +01:00
Wim Taymans 9b1cadc329 bufferpool: more updates
Keep track if the buffer is configured and block activation when not configured
yet.
Keep track of outstanding buffers and disallow configuration when not all
buffers are returned to the pool. We need to do this or else we might end up
with wrong buffers in the pool.
Add return value to set_active.
Small cleanups. Fix finalize.
2011-03-02 11:23:21 +01:00
Wim Taymans dd16af7a6c bufferpool: rename 'flushing' to 'active'
Rename the flushing variable and methods to active to better match
the other gstreamer name conventions
2011-03-02 11:23:21 +01:00
Wim Taymans 0caa41e173 bufferpool: use GstStructure to configure the pool
Use a GstStructure to provide the pool with the right configuration. Also
provide some helper methods to configure such a structure.
don't pass the config in alloc_buffer, pool implementation will already have
parsed it during set_config.
Update defs
2011-03-02 11:23:21 +01:00
Wim Taymans 8c9e3e6af3 bufferpool: add simple bufferpool helper object 2011-03-02 11:22:44 +01:00
Wim Taymans fcb10a6c85 - Removed bufferpool code and move that to gstbuffer.c
Original commit message from CVS:
- Removed bufferpool code and move that to gstbuffer.c
- implemented refcounting on GstData
- implemented new buffer code based on Company's work in the EVENTS2 branch
- added boxed types for GstData/GstEvent/GstBuffer/GstBufferPool
- added refcounting to bufferpools and events
- use lockfree allocation for buffers
- simplified the clock, use lockfree allocation
- use GQueue in GstQueue for faster access to the tail element
- update core plugins to the new event API
2002-07-08 19:22:02 +00:00
Wim Taymans cccc097ca5 API docs. revived _buffer_ref_by_count fast types for scheduler and bin.
Original commit message from CVS:
API docs.
revived _buffer_ref_by_count
fast types for scheduler and bin.
error checking on plugin features;
removed some prototypes that were not implemented (gst_pipeline_iterate
comes to mind)
remove gst_pad_event until we know what it's supposed to do.
remove sinesrc, it wasn't compiles anymore, so...
updates to various elements that used the old event API.
2001-10-21 18:00:31 +00:00
Andy Wingo 104844cb86 The bufferpool api has changed. Check gstbufferpool.h to see the updated interface.
Original commit message from CVS:
The bufferpool api has changed. Check gstbufferpool.h to see the updated
interface.

Also, the default bufferpool implementation has been finished somewhat. Take a
look at speed.c to see an example of its use, when I get the plugins committed.
2001-08-27 06:24:49 +00:00
Andy Wingo b6a69722aa hopefully the last commit on libgst wrt bufferpools
Original commit message from CVS:
hopefully the last commit on libgst wrt bufferpools
2001-08-27 06:01:11 +00:00
Andy Wingo 82a13836c2 more changes...
Original commit message from CVS:
more changes...
2001-08-27 05:08:28 +00:00
Andy Wingo 5a22a8c8e6 bufferpool changes (next commit will update plugins)
Original commit message from CVS:
bufferpool changes (next commit will update plugins)
2001-08-27 04:19:58 +00:00
Wim Taymans 6650712126 Added a missing UNLOCK macro.
Original commit message from CVS:
Added a missing UNLOCK macro.
2001-08-06 19:52:27 +00:00
Steve Baker 2745b823ab added ref counting to the buffer pool. also _destroy will clean up the buffer pool mem_chunk if it is the default imp...
Original commit message from CVS:
added ref counting to the buffer pool. also _destroy will clean up the buffer pool mem_chunk if it is the default implementation
2001-06-21 11:19:08 +00:00
Steve Baker 5023598cb3 added _gst_buffer_pool_initialize
Original commit message from CVS:
added _gst_buffer_pool_initialize
2001-06-17 14:35:09 +00:00
Steve Baker 921392eee7 added a default bufferpool factory function. it reuses existing instances of bufferpool if requests are made for exis...
Original commit message from CVS:
added a default bufferpool factory function. it reuses existing instances of bufferpool if requests are made for existing buffer sizes
2001-06-17 13:55:55 +00:00
Erik Walthinsen ca1c48e95c Updated copyright in all the libgst files.
Original commit message from CVS:
Updated copyright in all the libgst files.
Created gst_private.h, set up all files to use it.
2000-12-28 22:12:02 +00:00
Wim Taymans a63780a377 Header cleanup: try to include as little as possible; this will probably speed up compilation a bit.
Original commit message from CVS:
Header cleanup: try to include as little as possible; this will probably
speed up compilation a bit.
changed the .c files to use #include "..."
Fix for the 'plugins are loaded twice' bug.
Fix 22186: GstObject flags are now used everywhere. Added *_FLAG_LAST so
elements do not use the same flags. Added some padding in the flag enum
for future expansion.
2000-12-15 01:57:34 +00:00
Wim Taymans c125059f97 Added the excellent mpeg2dec decoder. Not 100% optimized but allready very fast.
Original commit message from CVS:
Added the excellent mpeg2dec decoder. Not 100% optimized but allready
very fast.
More cleanup.
2000-11-04 18:54:07 +00:00
Wim Taymans d9701bf8a7 Added the bufferpool handler.
Original commit message from CVS:
Added the bufferpool handler.
This object is able to generate buffers and is passed between elements to
exchange buffers. Elements can also use this pool to efficiently generate
output buffers.
2000-08-14 10:57:30 +00:00