Commit graph

139 commits

Author SHA1 Message Date
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
Sebastian Dröge e8d3870214 buffer: Use an inline function instead of a macro for gst_buffer_replace()
This gives us type checks by the compiler and more useful compiler errors.
2011-10-13 10:19:34 +02:00
Josep Torra c56881a026 buffer: explicitly cast to the enum type
Fixes warning #188: enumerated type mixed with another type reported by ICC.

https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:15:22 +01:00
Robert Swain 2edb4fef54 miniobject, buffer: steal miniobject flag for use as MEDIA4 buffer flag
This was required to add a new MEDIA4 buffer flag for indicating
progressive/mixed telecine video buffers. There is no space for
additional flags in GstBuffer, so steal one from GstMiniObject.

https://bugzilla.gnome.org/show_bug.cgi?id=642671
2011-02-21 12:37:26 +00:00
Tim-Philipp Müller 3256c708be docs: gst: more gobject introspection annotations
Many of these are superfluous, added for clarity.
2010-12-07 18:37:04 +00:00
Jeffrey S. Smith 4375e998ee Fix casts in a bunch of inline functions to maintain correct const-ness
Make code including GStreamer headers compile with -Wcast-qual by
maintaining const-ness when casting. Also fix function signature of
gst_byte_writer_set_pos(): the byte writer should not be marked as
const.

https://bugzilla.gnome.org/show_bug.cgi?id=627910
2010-09-02 00:09:08 +01:00
Sebastian Dröge b3d30dd459 docs: Move field specific Since markers at the same line
Fixes gobject-introspection warnings about Since being defined multiple times.
2010-01-14 10:44:16 +01:00
Wim Taymans 67bd9529d0 buffer: remove subbuffer subclass
Move the parent buffer pointer into the GstBuffer struct so that we can
remove the subbuffer class and type. This is interesting because it allows us to
more naturally implement methods to get the real type and parent
of a subbuffer (See #545501).
It should also be slightly faster because there is no extra object hierarchy to
initialize and free.
2009-12-26 00:02:17 +01:00
Stefan Kost 23da3639f0 docs: fix xrefs in docs
Fix typos in xrefs, links to non existing functions and rework plural forms.
2009-11-25 16:59:50 +02:00
Wim Taymans 5ebd818ea3 buffer: whitespace fixes 2009-09-01 16:52:32 +02:00
Wim Taymans 5467c64379 docs: Improve some docs
Rename some function variables and add some Return: to make the docs more happy.
2009-03-12 10:48:21 +01:00
Ali Sabil 136cfb3bed Convert unref/copy functions of GstMiniObject subclasses to static inline functions
unref and copy functions are sometimes used as function
pointers for example in the case of g_hash_table_new_full
as a GDestroyNotify function.

Currently GstBuffer, GstEvent, GstMessage and GstQuery
define their respective unref and copy functions as
macros, making use of gst_mini_object_unref/copy.
This approach works very well for most cases, except
for some automatically generated bindings (currently Vala),
where the memory management semantics are defined
declaratively.

The possible solutions would be to either convert all
the macros into static inline function, or change the
signature of gst_mini_object_unref to take a void*
instead of a GstMiniObject*.

Fixes bug #572480.
2009-02-22 18:51:08 +01:00
Edward Hervey 05f3cc9391 GstBufferFlags: Add "Since: 0.10.23" for the newly added flags 2009-02-19 18:05:07 +01:00
Edward Hervey 37d95a00e4 GstBufferFlags: Add 3 new media-specific buffer flags.
Partially fixes #163577
2009-02-19 16:04:43 +01:00
Wim Taymans cc5c8784cb gst/gstbuffer.h: Document the free_func.
Original commit message from CVS:
* gst/gstbuffer.h:
Document the free_func.
2008-11-18 09:52:41 +00:00
Andy Wingo 83d3b5d88e gst/gstghostpad.c (gst_ghost_pad_construct): If we got a template via g_object_get(), be sure to unref it.
Original commit message from CVS:
2008-10-08  Andy Wingo  <wingo@pobox.com>

* gst/gstghostpad.c (gst_ghost_pad_construct): If we got a
template via g_object_get(), be sure to unref it.

* gst/gstbuffer.h (GST_BUFFER_FREE_FUNC): Fix incorrect doc.
2008-10-08 08:54:55 +00:00
Tim-Philipp Müller cabf154dc6 gst/: Add 'Since' bits to gtk-doc chunks for new API.
Original commit message from CVS:
* gst/gstbuffer.h: (GST_BUFFER_FREE_FUNC):
* gst/gstghostpad.c: (gst_ghost_pad_construct):
Add 'Since' bits to gtk-doc chunks for new API.
2008-10-07 06:56:11 +00:00
Andy Wingo 267d0ba8f3 gst/gstbuffer.h (GST_BUFFER_FREE_FUNC): New API, a free function that will be called on the malloc_data to free it. B...
Original commit message from CVS:
2008-10-06  Andy Wingo  <wingo@pobox.com>

* gst/gstbuffer.h (GST_BUFFER_FREE_FUNC): New API, a free function
that will be called on the malloc_data to free it. Basically a way
to avoid subclassing when all you need is a different free
function, i.e. free() instead of g_free().

* gst/gstbuffer.c (gst_buffer_finalize): Free malloc_data via
calling the free function.
(gst_buffer_init): Initialize the free function to g_free.
2008-10-06 18:01:42 +00:00
Tim-Philipp Müller 4e121ae147 gst/: Move declaration of private _gst_foo_initialize() functions into our private header file where they should have...
Original commit message from CVS:
* gst/gst_private.h:
* gst/gstbuffer.h:
* gst/gstevent.h:
* gst/gstformat.h:
* gst/gstmessage.h:
* gst/gstplugin.h:
* gst/gstquery.h:
* gst/gsttaglist.h:
* gst/gstvalue.h:
Move declaration of private _gst_foo_initialize() functions into
our private header file where they should have been all along.
2007-11-02 18:35:37 +00:00
Stefan Kost de997d56cc gst/gstbuffer.h: Define GST_BUFFER_FLAG_GAP more strictly to enable optimizations based on it. Fix docs for GST_BUFFE...
Original commit message from CVS:
* gst/gstbuffer.h:
Define GST_BUFFER_FLAG_GAP more strictly to enable optimizations based
on it. Fix docs for GST_BUFFER_MALLOCDATA and GstBuffer.malloc_data.
2007-10-15 07:37:37 +00:00
Wim Taymans d04a298f6f gst/gstbuffer.h: Remove comma from last element in enum to avoid compile errors when using -pendantic. Fixes #464366.
Original commit message from CVS:
Patch by: <arenevier at fdn dot fr>
* gst/gstbuffer.h:
Remove comma from last element in enum to avoid compile errors when
using -pendantic. Fixes #464366.
2007-08-07 14:04:22 +00:00
Tim-Philipp Müller 2c5a8cdb31 API: add gst_buffer_try_new_and_alloc() plus unit test (#431940).
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbuffer.c: (gst_buffer_try_new_and_alloc):
* gst/gstbuffer.h:
* tests/check/gst/gstbuffer.c: (GST_START_TEST),
(gst_buffer_suite):
API: add gst_buffer_try_new_and_alloc() plus unit test (#431940).
2007-04-26 10:00:49 +00:00
Wim Taymans db43de1985 Add metadata copy functions. Fixes #393099.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbuffer.c: (gst_buffer_copy_metadata), (_gst_buffer_copy):
* gst/gstbuffer.h:
Add metadata copy functions. Fixes #393099.
* gst/gstutils.c: (gst_buffer_stamp):
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buffer):
Use new metadata copy functions.
2007-03-09 16:30:38 +00:00
Tim-Philipp Müller 5e4699885a gst/gstbuffer.h: Add an explicit cast to GstBuffer** to keep old code that added an explicit cast to GstMiniObject** ...
Original commit message from CVS:
* gst/gstbuffer.h:
Add an explicit cast to GstBuffer** to keep old code that added an
explicit cast to GstMiniObject** for gst_mini_object_replace()
compiling without warning.
2006-10-18 10:08:45 +00:00
Tim-Philipp Müller c64c4fd000 gst/gstbuffer.h: Fix gst_buffer_replace() macro to avoid gst_mini_object_replace()-related type-punned pointer warnings.
Original commit message from CVS:
* gst/gstbuffer.h:
Fix gst_buffer_replace() macro to avoid gst_mini_object_replace()-related
type-punned pointer warnings.
2006-10-17 10:30:27 +00:00
Thomas Vander Stichele ef9253d99c word refcounting more precisely for gst_value_*_buffer
Original commit message from CVS:
word refcounting more precisely for gst_value_*_buffer
2006-08-23 09:47:32 +00:00
Wim Taymans bc1bdfabab gst/gstbuffer.h: Avoid unneeded type checking.
Original commit message from CVS:
* gst/gstbuffer.h:
Avoid unneeded type checking.
API: GST_BUFFER_IS_DISCONT
* gst/gstminiobject.h:
Avoid type check in flag accessor.
* gst/gstelementfactory.h:
* gst/gstplugin.h:
* gst/gstpluginfeature.h:
Add _CAST macros.
API: GST_ELEMENT_FACTORY_CAST
API: GST_PLUGIN_CAST
API: GST_PLUGIN_FEATURE_CAST
2006-06-12 09:11:44 +00:00
Thomas Vander Stichele c7a428219b width respectationizing
Original commit message from CVS:
width respectationizing
2006-06-06 14:16:33 +00:00
Tim-Philipp Müller f2cee82949 gst/: Make gtk-doc generate docs for our inlined gst_buffer_ref(), gst_event_ref() and gst_message_ref() functions ag...
Original commit message from CVS:
* gst/gstbuffer.h:
* gst/gstevent.h:
* gst/gstmessage.h:
Make gtk-doc generate docs for our inlined gst_buffer_ref(),
gst_event_ref() and gst_message_ref() functions again
(ugly hack, please do fix if there's a better way besides
overrides.txt, which doesn't seem to work).
2006-05-10 16:44:15 +00:00
Wim Taymans e37e5f4215 gst/: Add note about refcounting and miniobject/buffer writeability to docs. Fixes #340604
Original commit message from CVS:
* gst/gstbuffer.h:
* gst/gstminiobject.c:
Add note about refcounting and miniobject/buffer writeability
to docs. Fixes #340604
* gst/gstelementfactory.h:
Added some explanation about @klass.
2006-05-05 14:27:31 +00:00
Edward Hervey 067db77499 gst/: gst_[buffer|event|message]_ref() macros are replaced by a static inline functions because gcc-4.1 will about if...
Original commit message from CVS:
* gst/gstbuffer.h:
* gst/gstevent.h:
* gst/gstmessage.h:
gst_[buffer|event|message]_ref() macros are replaced by a static
inline functions because gcc-4.1 will about if the return value
isn't used.
* tests/check/gst/gstevent.c: (event_probe):
gst_event_ref now has to be given a GstEvent* , fix check accordingly.
2006-03-21 13:50:52 +00:00
Jan Schmidt 30643217ba gst/gstbuffer.h: Documentation fix.
Original commit message from CVS:
* gst/gstbuffer.h:
Documentation fix.

* gst/gstpad.c: (gst_pad_init), (gst_pad_acceptcaps_default),
(gst_pad_accept_caps), (gst_pad_configure_sink),
(gst_pad_configure_src), (gst_pad_chain), (gst_pad_push):
Make the default acceptcaps behaviour be to check the requested
caps against the gst_pad_get_caps output.

Ensure that gst_pad_accept_caps is used to check caps when a pad
doesn't have a setcaps function, so that pads automatically refuse
caps that they don't allow in their pad template. (Fixes #332986)

When a buffer with attached caps is pushed, ensure that the source
pad receives those caps even if the element didn't call
gst_pad_set_caps first.
2006-03-15 16:29:02 +00:00
Wim Taymans 37d77aaeee Small documentation fixes.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbuffer.h:
* gst/gstvalue.c:
* libs/gst/base/gstbasetransform.h:
Small documentation fixes.
2006-03-07 15:08:57 +00:00
Jan Schmidt 0c0d5462a2 Replace gst_buffer_(make|is)_metadata_writable patch now that the release is out.
Original commit message from CVS:
* gst/gstbuffer.c: (gst_buffer_is_metadata_writable),
(gst_buffer_make_metadata_writable):
* gst/gstbuffer.h:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_prepare_buf):
* tests/check/gst/gstbuffer.c: (GST_START_TEST), (gst_test_suite):
Replace gst_buffer_(make|is)_metadata_writable patch now
that the release is out.
2006-01-17 12:14:20 +00:00
Jan Schmidt 6876d64a29 Back out patch until after the release.
Original commit message from CVS:
* gst/gstbuffer.c:
* gst/gstbuffer.h:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_prepare_buf):
* tests/check/gst/gstbuffer.c: (gst_test_suite):
Back out patch until after the release.
2006-01-16 15:42:08 +00:00
Jan Schmidt c7506c8b0a gst/gstbuffer.*: Add gst_buffer_(is|make)_metadata_writable as analogues of gst_buffer_(is|make)_writable.
Original commit message from CVS:
Reviewed By: Andy Wingo

* gst/gstbuffer.c: (gst_buffer_is_metadata_writable),
(gst_buffer_make_metadata_writable):
* gst/gstbuffer.h:
Add gst_buffer_(is|make)_metadata_writable as analogues of
gst_buffer_(is|make)_writable.

* libs/gst/base/gstbasetransform.c:
(gst_base_transform_prepare_output_buf):
* plugins/elements/gstcapsfilter.c: (gst_capsfilter_prepare_buf):
Use name gst_buffer_(is|make)_metadata_writable functions.

* tests/check/gst/gstbuffer.c: (GST_START_TEST), (gst_test_suite):
Test gst_buffer_(is|make)_metadata_writable

(Closes: #324162)
2006-01-16 14:32:33 +00:00
Wim Taymans 10a32af38d Doc fixes.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstbuffer.h:
* gst/gstelement.c:
* gst/gstformat.c:
* gst/gstformat.h:
* gst/gstindex.h:
* gst/gstquery.c:
* gst/gstquery.h:
* gst/gstvalue.c:
Doc fixes.
2005-11-20 14:50:43 +00:00
Andy Wingo 9192ae50e0 gst/gstbuffer.h (GST_BUFFER_FLAG_ORIGINAL): Removed. Fixes #320097.
Original commit message from CVS:
2005-11-19  Andy Wingo  <wingo@pobox.com>

* gst/gstbuffer.h (GST_BUFFER_FLAG_ORIGINAL): Removed. Fixes
#320097.
2005-11-19 18:32:01 +00:00
Wim Taymans 8bf3884cbb check/gst/gstghostpad.c: Added check for bug #317341
Original commit message from CVS:
* check/gst/gstghostpad.c: (GST_START_TEST), (gst_ghost_pad_suite):
Added check for bug #317341

* gst/gstbuffer.c:
* gst/gstbuffer.h:
Some more spiffifying.

* gst/gstghostpad.c: (gst_ghost_pad_do_link):
Call peer linkfunction if we are a source pad. Totally fixes
#317341

* gst/gstpad.c:
Update docs, source pads should call the peer linkfunction
so they can atomically perform the pad link.
2005-11-10 09:19:12 +00:00
Wim Taymans 7f6d267bdc gst/gstbuffer.*: Uber-spiffy-spiffify some more.
Original commit message from CVS:
* gst/gstbuffer.c:
* gst/gstbuffer.h:
Uber-spiffy-spiffify some more.
2005-11-09 18:10:53 +00:00
Wim Taymans 45a69909bc gst/gstbuffer.h: Small doc fix.
Original commit message from CVS:
* gst/gstbuffer.h:
Small doc fix.
2005-10-31 11:44:32 +00:00
Michael Smith 55c8e8b41e Work around gtkdoc deficiencies, document a macro differently.
Original commit message from CVS:
Work around gtkdoc deficiencies, document a macro differently.
2005-10-28 17:20:45 +00:00
Michael Smith f6021bd73c Improve GstBuffer documentation. It's now 100% Spiffier.
Original commit message from CVS:
Improve GstBuffer documentation. It's now 100% Spiffier.
2005-10-28 17:01:14 +00:00
Wim Taymans df2df58966 gst/: Another 1% more coverage.
Original commit message from CVS:
* gst/gstbuffer.h:
* gst/gstpad.c:
* gst/gstparse.c:
Another 1% more coverage.
2005-10-20 20:46:17 +00:00
Stefan Kost a98aef82db renamed GST_FLAGS macros to GST_OBJECT_FLAGS moved bitshift from macro to enum definition
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* docs/gst/gstreamer-sections.txt:
* gst/base/gstbasesink.c: (gst_base_sink_init):
* gst/base/gstbasesrc.c: (gst_base_src_init),
(gst_base_src_get_range), (gst_base_src_check_get_range),
(gst_base_src_start), (gst_base_src_stop):
* gst/base/gstbasesrc.h:
* gst/elements/gstfakesrc.c: (gst_fake_src_set_property):
* gst/gstbin.c: (gst_bin_add_func), (gst_bin_remove_func),
(bin_element_is_sink), (reset_degree), (gst_bin_element_set_state),
(bin_bus_handler):
* gst/gstbin.h:
* gst/gstbuffer.h:
* gst/gstbus.c: (gst_bus_post), (gst_bus_set_flushing):
* gst/gstbus.h:
* gst/gstelement.c: (gst_element_is_locked_state),
(gst_element_set_locked_state), (gst_element_commit_state),
(gst_element_set_state):
* gst/gstelement.h:
* gst/gstindex.c: (gst_index_init):
* gst/gstindex.h:
* gst/gstminiobject.h:
* gst/gstobject.c: (gst_object_init), (gst_object_sink),
(gst_object_set_parent):
* gst/gstobject.h:
* gst/gstpad.c: (gst_pad_set_blocked_async), (gst_pad_is_blocked),
(gst_pad_get_caps_unlocked), (gst_pad_set_caps):
* gst/gstpad.h:
* gst/gstpadtemplate.h:
* gst/gstpipeline.c: (gst_pipeline_provide_clock_func),
(gst_pipeline_use_clock), (gst_pipeline_auto_clock):
* gst/gstpipeline.h:
* gst/indexers/gstfileindex.c: (gst_file_index_load),
(gst_file_index_commit):
* testsuite/bytestream/filepadsink.c: (gst_fp_sink_init):
* testsuite/pad/link.c: (gst_test_src_init),
(gst_test_filter_init), (gst_test_sink_init):
* testsuite/states/locked.c: (main):
renamed GST_FLAGS macros to GST_OBJECT_FLAGS
moved bitshift from macro to enum definition
2005-10-12 14:28:39 +00:00
Thomas Vander Stichele 9b3e3a2613 various doc fixes
Original commit message from CVS:
various doc fixes
2005-09-11 12:57:36 +00:00
Thomas Vander Stichele 8b739d91e7 whitespace, doc and debug fixing/additions
Original commit message from CVS:
whitespace, doc and debug fixing/additions
2005-08-26 11:19:22 +00:00
Thomas Vander Stichele 7b4161583c fix docs by fixing enum typedef
Original commit message from CVS:
fix docs by fixing enum typedef
2005-08-25 10:35:46 +00:00
Stefan Kost 3e1c4a2c42 inlined more doc comments, added missing comments and fixed comments fixed typos
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* docs/gst/tmpl/.cvsignore:
* docs/gst/tmpl/gstbin.sgml:
* docs/gst/tmpl/gstbuffer.sgml:
* gst/base/gstbasesrc.c:
* gst/gstbin.c: (gst_bin_get_type), (gst_bin_class_init):
* gst/gstbuffer.c:
* gst/gstbuffer.h:
* tools/gst-launch.1.in:
inlined more doc comments, added missing comments and fixed comments
fixed typos
2005-08-23 11:53:58 +00:00