Commit graph

209 commits

Author SHA1 Message Date
Wim Taymans acb3ee9b2c memory: use allocators to allocate memory
Rename the GstMemoryImpl to GstMemoryAllocator because that's really what it is.
Add an alloc vmethod to the allocator members.
Improve registration of allocators.
Add methods to get and set the default allocator
Always use an allocator to allocate memory, use the default allocator when NULL
is passed.
Add user_data to the allocator Info so that we can pass extra info to the
allocator new method.
2011-06-07 16:19:33 +02:00
Wim Taymans 539cceab88 buffer: pass the right alignment 2011-06-02 18:28:54 +02:00
Wim Taymans b5456cc6f4 caps: remove caps from buffers and pads
Remove the GstCaps from buffers and pads. We now use CAPS events to negotiate
formats between element.
2011-05-09 16:21:28 +02:00
Edward Hervey b84afab3fa gstbuffer: Fix unitialized variables 2011-05-09 13:45:49 +02:00
Wim Taymans d43cdfbf37 buffer: avoid using buffer caps 2011-05-08 12:37:44 +02:00
Wim Taymans c4751ec8c1 Revert "context: use context on buffers instead of caps"
This reverts commit 9ef1346b1f.

Way to much for one commit and I'm not sure we want to get rid of the pad caps
just like that. It's nice to have the buffer and its type in onw nice bundle
without having to drag the complete context with it.
2011-05-05 13:17:08 +02:00
Wim Taymans 9ef1346b1f context: use context on buffers instead of caps
Put the srcpad context on buffers instead of caps. This allows us to associate
all the relevant info contained in events with a buffer.
2011-05-04 18:59:47 +02:00
Wim Taymans b8c1e81328 buffer: add method to compare buffer data
Add method to compare the data in a buffer.
2011-04-19 18:57:43 +02:00
Wim Taymans df85690cfd buffer: add FIXME 2011-04-11 10:20:10 +02:00
Wim Taymans a5e1ec0edc memory: add NO_SHARE flag to memory
Add a NO_SHARE flag to memory to indicate that it should not be shared
between buffers.
2011-04-07 16:02:43 +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 7cae289036 docs: update docs 2011-03-30 19:01:13 +02:00
Wim Taymans ebb14d95b2 buffer: more API tweaks
_trim -> _resize
_create_sub -> copy_region
2011-03-30 16:47:55 +02:00
Wim Taymans db230b6121 design: update docs 2011-03-30 13:04:34 +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 edbfc492bb buffer: implement COPY_MERGE 2011-03-29 17:17:46 +02:00
Wim Taymans 4e32ac8463 buffer: clean up _span and add more g_return_if.. 2011-03-29 16:52:21 +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 121b82ce27 buffer: fix subbuffers 2011-03-28 20:08:47 +02:00
Wim Taymans 9ff103b3a5 buffer: implemet trim and set_size 2011-03-28 20:08:47 +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 f35847a094 buffer: fix unit test 2011-03-28 20:08:46 +02:00
Wim Taymans 6f2af5aa87 memory: more fixes
Automatically make the memory of a buffer writable when the buffer is writable
and the memory is asked to mapped WRITE.
Add docs
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 fa0d993372 meta: implement transform function
Replace subbuffer and copy vmethods by a more generic transform function that
can then be parametrised by transform specific data. This should allow us to
implement make-writable and more future transform functions.
2011-03-08 17:11:23 +00:00
Wim Taymans b11ede5984 bufferpool: add more debug info 2011-03-04 12:06:11 +01:00
Wim Taymans 673d90fb99 buffer: release buffer to pool in dispose
Use the dispose method to release the buffer to the pool when it is configured.
2011-03-02 11:57:06 +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 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
Philippe Normand 376089db14 buffer: fix memory corruption 2011-02-25 10:34:52 +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 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 6c18c9508d miniobject: more boxed type fixing
More miniobject fixing, leaks horribly somewhere..
2011-02-23 10:35:09 +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
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 52978bd4e6 buffer: clarify docs 2011-01-24 16:35:25 +01:00
Tim-Philipp Müller 8a7fc1d8c9 Revert "micro-optim: if (x) is cheaper than if (x > 0) for unsigned integers"
This reverts commit 6aa8ca37ee.

See http://article.gmane.org/gmane.comp.video.gstreamer.devel/32282
2010-12-26 21:21:43 +00:00