Commit graph

27 commits

Author SHA1 Message Date
Seungha Yang 84a3f0448b gst: Add non-inline methods for bindings to able to use core APIs
Provide non-inline version of refcounting APIs so that it can be
consumed by bindings

Fixes: https://gitlab.freedesktop.org/gstreamer/gstreamer-sharp/-/issues/46
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/728>
2021-01-11 21:54:48 +09:00
Sebastian Dröge 942fc7f79e gst: Add poisoning to more types 2018-08-03 14:31:34 +03:00
Sebastian Dröge 99a534271a sample: Set buffer/caps/buffer-lists to NULL correctly when replacing them with NULL 2018-07-10 08:48:47 +02:00
Sebastian Dröge 6fa351407a miniobject: Add parent pointers to the miniobject to influence writability
Every container of miniobjects now needs to store itself as parent in
the child object, and remove itself again at a later time.

A miniobject is only writable if there is at most one parent, and that
parent is writable itself, and if the reference count of the miniobject
is 1.

GstBuffer (for memories), GstBufferList (for buffers) and GstSample (for
caps, buffer, bufferlist) was updated accordingly.

Without this it was possible to have e.g. a bufferlist with refcount 2
in two places, modifying the same buffer with refcount 1 at the same
time.

https://bugzilla.gnome.org/show_bug.cgi?id=796692
2018-07-09 09:45:45 +02:00
Edward Hervey 438c1c116d sample: Update documentation 2018-05-21 11:36:42 +02:00
Mathieu Duponchelle ed5d888ba5 gstsample: new API
gst_sample_set_buffer
gst_sample_set_caps
gst_sample_set_segment
gst_sample_set_info
gst_sample_is_writable
gst_sample_make_writable

This commit makes it possible to reuse a sample object and avoid
unnecessary memory allocations, for example in appsink.

In addition, writability is now required to set the buffer list.

https://bugzilla.gnome.org/show_bug.cgi?id=795144
2018-04-13 23:44:54 +02:00
Arun Raghavan b5028383ab gst: Fix up a bunch of GIR annotations
This is mostly on nullable return values, and some other minor ones that
I ran across.

https://bugzilla.gnome.org/show_bug.cgi?id=789319
2018-01-27 10:41:24 +00:00
Thibault Saunier a87b4551a6 Port gtk-doc comments to their equivalent markdown syntax
Modernizing our documentation and preparing a possible move to hotdoc.
This commits also adds missing @title metadatas to all SECTIONs
2017-01-27 16:36:38 -03:00
Hyunjun e8db96b033 sample: add gst_sample_set/get_buffer_list apis
Allowed to set/get buffer list to sample if needed

https://bugzilla.gnome.org/show_bug.cgi?id=751026
2015-06-22 13:17:01 +02:00
Evan Nemerson 2759882379 introspection: add missing (nullable) annotations to return values
Support for (nullable) was added to G-I at the same time as nullable
return values.  Previous versions of G-I will not mark return values as
nullable, even when an (allow-none) annotation is present, so it is
not necessary to add (allow-none) annotations for compatibility with
older versions of G-I.

https://bugzilla.gnome.org/show_bug.cgi?id=730957
2014-06-26 18:56:38 +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 6eb6d9ec38 docs: remove outdated and pointless 'Last reviewed' lines from docs
They are very confusing for people, and more often than not
also just not very accurate. Seeing 'last reviewed: 2005' in
your docs is not very confidence-inspiring. Let's just remove
those comments.
2014-04-26 21:21:51 +01:00
Tim-Philipp Müller aa1890a4b4 docs: flesh out gst_sample_get_buffer() a little
https://bugzilla.gnome.org/show_bug.cgi?id=706478
2013-08-21 12:21:43 +01:00
Wim Taymans 5f2fbb6370 add debug category
Adding a debug category is nicer than logging to the default category
2012-12-14 11:09:30 +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
Michael Smith 017b34079e GstSample: fix typo in G-I annotations, allows creating GstSamples from bindings. 2012-10-19 13:37:08 -07:00
Tim-Philipp Müller dad67b7af0 sample: free info structure with sample if there is one and fix copy with NULL info structure 2012-09-10 16:52:46 +01:00
Edward Hervey d3ffa82639 Remove 0.10-related documentation and "Since" markers 2012-07-10 12:03:27 +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
Tim-Philipp Müller 1be934f0dd miniobjects: pass copy, dispose and free function to gst_mini_object_init()
So mini objects don't have to poke into the GstMiniObject part
of the structure. Saves lines of code, and seems slightly cleaner.
We don't have proper OO hierarchies or methods here after all.
2012-06-23 20:02:02 +01:00
Tim-Philipp Müller 4b5c8cada2 sample: some more g-i annotations 2012-06-23 17:04:53 +01:00
Tim-Philipp Müller fcd6e1f89c sample: no need to store the size of the sample structure inside the structure 2012-06-15 10:26:56 +01:00
Wim Taymans 12aefaa078 miniobject: remove the size field
The size field is used by subclasses to store the total allocated size of the
memory for this miniobject. Because miniobject doesn't really do anything with
this field we can move it to the subclasses.
2012-06-14 17:11:11 +02:00
Wim Taymans ce67b0e539 docs: update more documentation 2012-03-29 13:34:50 +02:00
Wim Taymans 6ac2371910 docs: fix some docs 2012-01-03 15:03:38 +01:00
Wim Taymans 5477399881 sample: remove const
The writability of the structure is ensured by the refcount of the parent
miniobject and we're fine if the parent is writable.
2011-12-01 18:49:34 +01:00
Wim Taymans facf937276 sample: add new sample miniobject
Add a new simple miniobject that is a combination of a GstBuffer, GstCaps,
GstSegment and other arbitrary info organized in a GstStructure. This object can
be used to exchange samples between an element and the application or for
storing album art in tags etc.
2011-12-01 16:37:46 +01:00