Commit graph

22 commits

Author SHA1 Message Date
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