Commit graph

244 commits

Author SHA1 Message Date
Nicolas Dufresne 210c29665a doc: Remove parenthesis around Since:
This confuse the parser, hence it does not endup in the doc and the
index properly.
2015-06-18 11:48:50 -04:00
Jan Schmidt 4d4e436376 Add GstParentBufferMeta
A core meta which helps implement the old concept
of sub-buffering in some situations, by making it
possible for a buffer to keep a ref on a different
parent buffer. The parent buffer is unreffed when
the Meta is freed.

This meta is used to ensure that a buffer whose
memory is being shared to a child buffer isn't freed
and returned to a buffer pool until the memory
is.

https://bugzilla.gnome.org/show_bug.cgi?id=750039
2015-06-19 01:15:25 +10:00
Nicolas Dufresne bd9ea8d18f doc: Fix Since: marks
There was few Since: mark missing their column. Also unify the way
we set the Since mark on enum value and structure members. These
sadly don't show up in the index.
2015-06-13 20:19:59 -04:00
Jan Schmidt ade4a83e63 Add GST_BUFFER_FLAG_SYNC_AFTER flag, and implement in filesink.
Makes it possible to get filesink to fsync() after rendering
a buffer.
2015-06-08 19:13:18 +10:00
Thiago Santos 96eaeadc0f gstbuffer: add gst_buffer_copy_deep
A variant of gst_buffer_copy that forces the underlying memory
to be copied.

This is added to avoid adding an extra reference to a GstMemory
that might belong to a bufferpool that is trying to be drained.
The use case is when the buffer copying is done to release the
old buffer and all its resources.

https://bugzilla.gnome.org/show_bug.cgi?id=745287
2015-03-13 18:37:04 +00:00
Evan Nemerson 5d80cf12ba introspection: add nullability annotations to out and inout params
https://bugzilla.gnome.org/show_bug.cgi?id=730957
2014-06-26 18:59:15 +02:00
Evan Nemerson e10266e3f3 docs: convert NULL, TRUE, and FALSE to %NULL, %TRUE, and %FALSE
This should help improve documentation generated for
languages other than C.

https://bugzilla.gnome.org/show_bug.cgi?id=730961
2014-05-30 00:20:27 +01:00
Tim-Philipp Müller 313f01ab79 buffer: invert meaning of GST_BUFFER_FLAG_TAG_MEMORY
It's nicer to only have it set when something noteworthy
happened and otherwise unset.

https://bugzilla.gnome.org/show_bug.cgi?id=725862
2014-03-07 20:43:44 +00:00
Wim Taymans 659785d896 buffer: add function to check writability of memory
Check if memory is writable in a buffer and thus is exclusively owned by
this buffer.
2014-02-27 16:39:50 +01:00
Wim Taymans 5bca002f4b buffer: add a new flag to track memory changes
Add a flag to check if the memory changed in a buffer.
2014-02-27 15:43:13 +01:00
Sebastian Rasmussen 53ae1b2c9c docs: Fix typos in function/object descriptions
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=720029
2013-12-07 17:11:12 +00:00
Sebastian Rasmussen b40fa2b8c3 docs: cosmetic changes in references/decriptions
* fix typo GstBufferFlag -> GstBufferFlags
 * fix typo GstFeatures -> GstCapsFeatures
 * fix typo GstAllocatorParams -> GstAllocationParams
 * fix typo GstContrlSources -> GstControlSource
 * do not refer to gstcheck as an object
 * make references gtk_init() and tcase_set_timeout() not be references
 * gst_element_get_pad() renamed gst_element_get_static_pad()
 * gst_clock_id_wait_async_full() renamed gst_clock_id_wait_async()
 * _drop_element() is really gst_queue_array_drop_element()
 * gst_pad_accept_caps() was removed, do not refer to it
 * separate GST_META_TAG_MEMORY_STR declaration from description
 * do not describe removed gst_collect_pads_collect()
 * correctly link to GstElementClass' virtual set_context()

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=719614
2013-12-02 21:01:08 +00:00
Wim Taymans 396b49ec4d buffer: add _gst_max_memory() function
Add the a function to query the maximum amount of memory blocks that can be
added to a buffer. Also improve the docs for _insert_memory().
2013-04-11 14:31:01 +01:00
Olivier Crête ec16d6b0a4 buffer: Add annotations and pygi friendly extraction function
API: gst_buffer_extract_dup
2013-03-27 13:07:03 -04:00
Sebastian Dröge ce1c1cf214 buffer: Gracefully handle gst_memory_copy() returning NULL without crashing
gst_buffer_copy_into() and gst_buffer_resize_range() can now fail.
2013-02-27 10:11:23 +01:00
Tim-Philipp Müller e3a9e66985 buffer: add since marker for new COPY_DEEP buffer flag 2013-02-16 14:20:54 +00:00
Wim Taymans 1fcef378bd buffer: add option to deep copy a buffer
Add a buffer copy flag to force a memory copy in all cases.
2013-02-16 14:59:02 +01:00
Tim-Philipp Müller 666c8c11c6 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-03 20:44:48 +00:00
Wim Taymans 00c6fa74f5 events: remove STREAM_CONFIG
We won't be able to implement this so it's better to move it out of the way.
2012-09-11 16:29:12 +02:00
Evan Nemerson 237f707c75 buffer: convert gst_buffer_* macros to functions
GObject Introspection does not support macros.
This is needed for bindings. We can still add back
macros or inline functions again later if we think
it's worth it.

https://bugzilla.gnome.org/show_bug.cgi?id=678301
2012-08-10 15:04:12 +01:00
Wim Taymans 8c864712e6 buffer: make _foreach_meta more powerful
Make _foreach_meta return FALSE when the foreach function returned FALSE.
2012-07-17 12:57:59 +02:00
Edward Hervey d3ffa82639 Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +02:00
Wim Taymans f362f643ac memory: Make GstAllocator a GstObject
Make GstAllocator a GstObject instead of a GstMiniObject, like bufferpool.
Make a new gstallocator.c file. Make a GstAllocator subclass for the default
allocator.
2012-07-09 16:28:22 +02:00
Wim Taymans 3b16efa1d1 miniobject: add lock functionality to GstMiniObject
Move the locking methods from GstMemory to GstMiniObject.
Add a miniobject flag to enable LOCKABLE objects. LOCKABLE objects can
use the lock/unlock API to control the access to the object.
Add a minobject flag that allows you to lock an object in readonly mode.
Modify the _is_writable() method to check the shared counter for LOCKABLE
objects. This allows us to control writability separately from the refcount for
LOCKABLE objects.
2012-07-05 11:19:16 +02:00
Wim Taymans 4c6228224f buffer: add _append_region function
Make a gst_buffer_append_region() function that allows you to append a memory
region from one buffer to another. This is a more general version of
gst_buffer_append().
2012-06-28 11:02:19 +02:00
Wim Taymans 2cab15c9f6 docs: improve API docs 2012-06-15 12:57:24 +02:00
Wim Taymans db59375785 buffer: MARKER is for the start of a talkspurt 2012-04-25 09:08:05 +02:00
Wim Taymans b15bcb66b4 buffer: improve _set_size() 2012-04-04 09:33:13 +02:00
Wim Taymans 8428d3e295 buffer: make get_sizes and _resize with ranges
Make the _get_sizes and _resize methods work on a range of memory to make them
more powerfull.
2012-04-04 09:33:13 +02:00
Wim Taymans 0e9241cfc6 buffer: make function to find memory in a buffer
Make a function to find the memory blocks for a region in a buffer.
2012-04-01 12:02:40 +02:00
Wim Taymans 113b9dc535 buffer: add peek_memory method
Add a peerk_memory method that simply fetches the memory at an offset without
refcounting or merging.
2012-03-31 17:10:35 +02:00
Wim Taymans 38b96e6c8c buffer: improve the buffer memory methods
gst_buffer_take_memory -> gst_buffer_insert_memory because insert is what the
method does.
Make all methods deal with ranges so that we can replace, merge, remove and map
a certain subset of the memory in a buffer. With the new methods we can make
some code nicer and reuse more code. Being able to deal with a subset of the
buffer memory allows us to optimize more cases later (most notably RTP headers
and payload that could be in different memory objects).
Make some more convenient macros that call the more generic range methods.
2012-03-30 18:15:24 +02:00
Wim Taymans ce67b0e539 docs: update more documentation 2012-03-29 13:34:50 +02:00
Wim Taymans bb876588ac buffer: unify buffer merge methods
Add gst_buffer_append() which appends the memory blocks from one buffer to
another. Remove the old inefficient _merge() and _join() methods which forced a
premature memcpy in most cases.
Remove the _is_span() and _span() methods they are not needed anymore now that
we can _append(). Merging and spanning will be delayed until mapping or maybe
not at all when the element can deal with the different memory blocks.
2012-03-28 12:51:58 +02:00
Wim Taymans 7bcc3baf64 buffer: improve gst_buffer_new_wrapped_full()
Make it possible to wrap all kinds of memory by exposing all properties to
gst_buffer_new_wrapped_full(). This makes it possible to also create writable
memory without a free function or memory with extra padding.
2012-03-20 10:20:29 +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 e80296cf46 meta: split registration of API and implementation
Split out the registration of the metadata API and its implementation. Make a
GType for each metadata API. This allows us to store extra information with the
API type such as the tags.
Change the buffer API so that we can get the metadata using the API GType.
Change the query API so that we use the metadata API GType in the allocation
query instead of a string.
Update netaddress and unit tests
2012-02-29 17:37:09 +01:00
Wim Taymans c6a1bed1ad memory: more work on refcount and writability
Rename _is_writable() with _is_exclusive because the writability does not depend
on the amount of references to the memory object anymore.
Add accessor macros for the memory flags.
Rename the GstBuffer _peek_memory() method to _get_memory() and return a
reference to the memory now that we can do this without affecting writability
of the memory object. Make it possible to also make this function merge the
buffer memory.
Add methods to replace memory in a buffer. Make some convience macros for the
buffer memory functions.
Fix unit tests.
2012-02-13 18:04:03 +01:00
Wim Taymans f5886a17f5 remove TRACE_NAME from headers 2012-02-02 15:52:19 +01:00
Wim Taymans c35a41bb54 buffer; remove IN_CAPS buffer flag
The IN_CAPS buffer flag is deprecated and should be replaced with the HEADER
flag.
2012-01-30 17:15:21 +01:00
Wim Taymans af2fc026fc memory: make the allocator refcounted
Add refcounting to the GstAllocator object.
Remove const from functions because the allocator is refcounted now.
Rename the vmethods for consistency
Expose the constructor for GstAllocator and add a destroy notify for the
user_data. This should make it possible to create allocators that are not
registered and shared globally along with the possibility to destroy them
properly.
Update defs with new symbols.
2012-01-30 13:20:36 +01:00
Wim Taymans a521252845 Add new GstMapInfo
Use a structure to hold info about the mapping. The application then keeps track
of this state and we can use it to unmap the memory again later.
2012-01-25 11:54:23 +01:00
Wim Taymans f9e7dad47a buffer: only reserve 6 extra flags
Only reserve 6 extra flags instead of 10 so that more media specific flags
are available.
2012-01-04 10:04:11 +01:00
Matej Knopp efdd0a2a82 win32: fix exported variables for VS 2010
https://bugzilla.gnome.org/show_bug.cgi?id=666219
2011-12-27 23:26:07 +00:00
Wim Taymans 87ada5664a buffer: add foreach function for the metadata 2011-12-22 16:02:05 +01:00
Wim Taymans dc23684b12 buffer: add copy flag for meta
Add a flag to control if the meta should be copied or not instead of always
copying.
2011-12-01 15:34:06 +01:00
Tim-Philipp Müller 2d7f9cfe92 Merge remote-tracking branch 'origin/master' into 0.11
Conflicts:
	gst/gstbuffer.h
	gst/gstbufferlist.h
	gst/gstcaps.h
	gst/gstdatetime.h
	gst/gstelementfactory.h
	gst/gstevent.h
	gst/gstghostpad.h
	gst/gstindexfactory.h
	gst/gstiterator.h
	gst/gstmessage.h
	gst/gstminiobject.h
	gst/gstpipeline.h
	gst/gstquery.h
	gst/gstsegment.h
	gst/gststructure.h
	gst/gsttaglist.h
	gst/gsturi.h
	gst/gstvalue.h
	libs/gst/base/gstbitreader.h
	libs/gst/base/gstbytereader.h
	libs/gst/base/gstbytewriter.h

Note: can't use G_GNUC_MALLOC with GstCaps return
values in 0.11 because of the EMPTY+ANY singletons.
2011-11-26 19:44:23 +00:00
Tim-Philipp Müller c8380cb0d2 gst: sprinkle some G_GNUC_MALLOC
Maybe gcc can do something clever with that, or at least
warn us if we don't save the return value somewhere.
2011-11-26 18:57:44 +00:00
Tim-Philipp Müller 33078aaeb7 buffer: add gst_buffer_{set,get}_qdata()
Allows people/us to attach arbitrary metadata to buffers.

https://bugzilla.gnome.org/show_bug.cgi?id=664720

API: gst_buffer_set_qdata()
API: get_buffer_get_qdata()
2011-11-25 17:42:07 +00:00
Wim Taymans 9c8d323d07 padd return value from _mini_object_replace() 2011-11-22 12:45:41 +01:00