Commit graph

87 commits

Author SHA1 Message Date
Wim Taymans
9aa9751938 review some docs 2012-03-28 18:12:23 +02:00
Wim Taymans
08f33d8d93 bufferpool: remove const from get/set_param
Remove the const from the GstCaps in get/set_param. set_param modifies
the refcount of the caps.
Don't increment the refcount of the caps result of get_param like we
do with other objects.
Update some annotiations.
2012-03-27 12:48:59 +02:00
Wim Taymans
f09ab3b007 bufferpool: fix annotation for _release
_release takes ownership of the buffer
2012-03-27 12:48:59 +02:00
Wim Taymans
3776eb9e25 bufferpool: check min/max_buffers 2012-03-26 17:38:50 +02:00
Wim Taymans
a7e6c7d2a8 bufferpool: split bufferpool configuration
Make separate methods to control the bufferpool and the allocator used by the
bufferpool.
Make it possible to change the allocator of a pool.
2012-03-15 22:09:02 +01:00
Wim Taymans
9a1cd17136 GstBufferPoolParams -> GstBufferPoolAcquireParams
Because those flags are not from the bufferpool but for the acquire function.
2012-03-15 14:01:44 +01:00
Wim Taymans
85c9543841 memory: group allocation parameters in a struct
Group the extra allocation parameters in a GstAllocationParams structure to make
it easier to deal with them and so that we can extend them later if needed.
Make gst_buffer_new_allocate() take the GstAllocationParams for added
functionality.
Add boxed type for GstAllocationParams.
2012-03-15 13:42:17 +01:00
Wim Taymans
edd2ffe4d4 memory: Add 0 padding
Change gst_allocator_alloc() so that we can also spicify flags and padding.
Add 2 new flags to mark the memory 0 prefixed/padded. This allows us to
remove some resizes in the base classes.
When allocating memory, memset prefix and padding with 0 when the flags tell
us to.
On resize, clear the zero padding flags if we can't guarantee the memory is
still 0 filled.
Update tests.
2012-03-14 21:32:22 +01:00
Wim Taymans
3d76e6011c query: also include padding in ALLOCATION query
Negotiating padding is needed on second thought so include it in the
ALLOCATION query.
Make the bufferpool take padding into account when allocating.
Make basesrc take padding into account.
Use padding and prefix when allocating in basetransform.
2012-03-14 19:47:10 +01:00
Mark Nauwelaerts
f2d81f4c3d bufferpool: free owned discarded pool config 2012-03-14 17:20:01 +01:00
Wim Taymans
b3c8264a14 bufferpool: add more debug info 2012-03-02 17:03:49 +01:00
Wim Taymans
b95ceeb09b remove some useless includes in .h 2012-02-27 09:48:06 +01:00
Wim Taymans
10056f1833 bufferpool: make more stuff private 2012-02-27 09:11:36 +01:00
Wim Taymans
7ab1d62c24 GST_FLOW_WRONG_STATE -> GST_FLOW_FLUSHING 2012-02-08 16:18:04 +01:00
Tim-Philipp Müller
78ccf77fa3 bufferpool: use GstValueArray instead of GValueArray for storing options in the config
Since GValueArray is deprecated. It's all only internal anywhere here,
but if we use GstValueArray the option strings get serialized nicely
in the debug logs at least.
2012-01-26 10:44:11 +00:00
Tim-Philipp Müller
13d91d1f6c Use recent GLib API unconditionally now that we depend on the latest GLib 2012-01-22 01:25:22 +00:00
Wim Taymans
252327f87a Update for new gthread API 2012-01-19 09:27:04 +01:00
Tim-Philipp Müller
10d901291e gst: suppress some more deprecated thread api until we fix it up
Which should be soon, since we already depend on an unstable glib for -base.
2012-01-18 01:31:56 +00:00
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
8b202df55d bufferpool: handle metadata in the pool
Mark all metadata on the allocated buffers with a POOLED flag. When a buffer
returns to the pool, remove all metadata that did not have the POOLED flag. This
makes sure that we never leave unknown metadata to the buffers in the pool.
2011-12-22 16:02:05 +01:00
Edward Hervey
7a285354d2 gst: More introspection annotations 2011-11-10 13:54:03 +01:00
Wim Taymans
e4725d9df2 structure: cleanup API
gst_structure_empty_new() -> gst_structure_new_empty()
  gst_structure_id_empty_new() -> gst_structure_new_id_empty()
  gst_structure_id_new() -> gst_structure_new_id()
2011-11-02 08:59:44 +01:00
Wim Taymans
80fc568747 buffer: add pts/dts to buffers 2011-10-28 12:15:44 +02:00
Johan Dahlin
df7d090ecc introspection: Add missing annotations
https://bugzilla.gnome.org/show_bug.cgi?id=657640
2011-10-19 10:23:53 +02:00
Wim Taymans
ea012d3dd7 pad: GST_FLOW_UNEXPECTED -> GST_FLOW_EOS 2011-10-10 11:33:51 +02:00
Edward Hervey
045fcd8b0a gstbufferpool: Use glib compat macros for atomic pointers 2011-10-05 11:20:37 +02:00
Wim Taymans
aa97daaf0e fix default alignment
A 0 alignment is the default.
2011-08-04 11:00:57 +02:00
Wim Taymans
7c9be852bc bufferpool: add gst_buffer_pool_is_active() 2011-08-04 10:54:29 +02:00
Wim Taymans
9324824853 bufferpool: don't add the same option twice
Make sure that we only add an option to the array once.
2011-08-01 18:12:12 +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
43f61f5c40 bufferpool: start with raised control socket
In the inactive state, the control socket should be in the raised state, we will
release it when we start.
2011-07-25 12:16:13 +01: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
1dddb1f704 bufferpool: call release_buffer after alloc
After we allocated a new buffer, call the release_buffer vmethod to put the new
buffer in the pool instead of assuming that the pool uses the default
release_method implementation.
2011-07-15 13:27:13 +02:00
Wim Taymans
2f429009a3 bufferpool: add macro to check for flushing 2011-07-15 11:52:22 +02:00
Wim Taymans
3884badea6 memory: rename GstMemoryAllocator -> GstAllocator
simplify the name of the allocator object.
2011-06-22 11:42:46 +02:00
Wim Taymans
36c111a844 bufferpool: return empty metadata array
Return a string array with NULL instead of NULL from the default get_metas
function.
2011-06-21 12:32:46 +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
54fd50bfe1 buffer: add index to _take_memory()
Add an index to gst_buffer_take_memory() so that we can also insert memory at a
certain offset. This is mostly interesting to prepend a header memory block to
the buffer.
2011-06-13 16:31:53 +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
Wim Taymans
2b071ea395 bufferpool: use same alignment values as GstMemory
Use the same alignment values for the bufferpool as we use for the GstMemory
API.
2011-06-10 17:50:27 +02:00
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
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
d2d23074af pool: debug the config 2011-06-02 18:13:10 +02:00
Edward Hervey
ceb86a586e gst: Remove obvious dead assignments 2011-05-31 18:30:30 +02:00
Wim Taymans
442193f3f3 bufferpool: fix some docs 2011-04-27 17:56:12 +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
b11ede5984 bufferpool: add more debug info 2011-03-04 12:06:11 +01:00
Wim Taymans
52a3fa9346 bufferpool: add debug 2011-03-04 10:17:06 +01:00
Wim Taymans
dbcb6eee72 bufferpool: add some more debug info 2011-03-04 10:16:54 +01:00