Commit graph

143 commits

Author SHA1 Message Date
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 0a8dd0a4e7 caps: rename variable for consistency
Rename the variable for GST_CAPS_NONE to _gst_caps_none for consistency and to
hie the fact that NONE caps are also accidentally empty caps.
2011-12-21 11:10:04 +01:00
Wim Taymans 8ff059ba59 caps: add ANY and EMPTY singletons
Add a singleton for ANY and EMPTY caps and make the GST_CAPS_ANY and
GST_CAPS_NONE point to them. This makes the API more consistent now
that the macro does not magically create a ref. It also solves some leaks in
places where the macro was used to register a padtemplate.
2011-12-20 13:24:06 +01:00
Wim Taymans be0e58a637 make some more macros as inline functions
Make some macros as inline functions for added type checking.
USe new gst_caps_take() in typefind
2011-12-05 10:24:34 +01:00
Wim Taymans 5a4957eef6 caps: _CAPS_FLAGS_ -> CAPS_FLAG_ 2011-11-28 14:24:16 +01:00
Matej Knopp 62dce62e00 caps: fix compilation warning
GST_STATIC_CAPS is missing initializer for GstMiniObject's n_weak_refs and
weak_refs resulting in compilation warning (llvm-gcc  -Wall)

https://bugzilla.gnome.org/show_bug.cgi?id=664927
2011-11-27 22:34:54 +00: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
Wim Taymans b7fac4d093 Merge branch 'master' into 0.11
Conflicts:
	libs/gst/base/gstbasetransform.c
2011-11-07 10:01:27 +01:00
Sjoerd Simons 57074fc025 caps: Add gst_caps_is_strictly_equal 2011-11-04 17:49:55 +00:00
Wim Taymans d9c8ab67a0 caps: add empty_simple variants 2011-10-27 17:09:04 +02:00
Johan Boulé 3406549cf6 caps: use G_GNUC_NULL_TERMINATED for gst_caps_new_simple() and gst_caps_new_full()
If you get warnings, use gst_caps_new_empty().

https://bugzilla.gnome.org/show_bug.cgi?id=343346
2011-10-27 14:56:24 +01:00
Wim Taymans 8a1f401dfd docs: fix docs 2011-09-26 20:47:35 +02:00
Wim Taymans f3b0d3cdbe init: add _get_type() functions
Remove gst_mini_object_register() and add a GST_DEFINE_MINI_OBJECT macro to
define a _get_type() function for the boxed miniobject.
Remove a bunch of custom _get_type() functions and replace them with the
miniobject macro.
Rename some _init method to _priv_*_initialize() like the rest of them.

Inspired by patch from Johan Dahlin and see bug #657603
2011-08-29 15:34:30 +02:00
Josep Torra d99d270a69 caps: define GST_CAPS_FLAGS_NONE for consistency with other enumerations
Use them to fix warnings when building with ICC.

API: GST_CAPS_FLAGS_NONE

https://bugzilla.gnome.org/show_bug.cgi?id=656265
2011-08-15 21:13:29 +01:00
Wim Taymans 49fc4249e5 caps: add fixate function
Add a fixate function and use it in gstpad.c
2011-08-15 14:40:38 +02:00
Wim Taymans 314a2b961a caps: Hide implementation details
Make the Array of structures private. This should allow us to implement
the array more efficiently or with some preallocated structures when
we want to later.
Add a new method to clean up a static structure so that we can remove some code
that pokes into the private bits of the caps.
2011-06-22 12:28:14 +02:00
Wim Taymans 9553ea1c07 caps: remove some custom refcounting methods
Remove some custom made refcounting methods and use the miniobject ones instead.
2011-06-02 13:18:39 +02:00
Sebastian Dröge 30a7fd7b4d Merge branch 'master' into 0.11 2011-05-27 13:58:26 +02:00
Sebastian Dröge 57df188757 caps: Add gst_caps_is_subset_structure()
API: gst_caps_is_subset_structure()

This allows to check if a structure is a subset of given
caps without allocating a new caps instance for it.
2011-05-27 13:55:31 +02:00
Wim Taymans 8f13bb9e27 caps: fix the macros a little 2011-05-10 12:29:06 +02:00
Sebastian Dröge 65eafd9340 Merge branch 'master' into 0.11
Conflicts:
	docs/gst/gstreamer-sections.txt
	gst/gstelementfactory.c
	gst/gstminiobject.c
2011-05-05 12:27:51 +02:00
Stefan Kost 319eef8aa9 docs: improve the syntax for the capsintersectmode docs 2011-05-03 13:03:20 +03:00
Wim Taymans a12ede3fb1 Merge branch 'master' into 0.11-fdo
Conflicts:
	gst/gst.c
	libs/gst/base/gstcollectpads.c
2011-03-28 20:11:20 +02:00
Edward Hervey 09d83e589a gstcaps: new API : gst_caps_intersect_full
Just like gst_caps_intersect, but adds a new parameter 'mode'
that allows selecting the intersection algorithm to use.

Currently we have GST_CAPS_INTERSECT_MODE_ZIG_ZAG (default) and
GST_CAPS_INTERSECT_MODE_FIRST.

API: gst_caps_intersect_full
API: GstCapsIntersectMode
API: GST_CAPS_INTERSECT_MODE_ZIG_ZAG
API: GST_CAPS_INTERSECT_MODE_FIRST

https://bugzilla.gnome.org/show_bug.cgi?id=617045
2011-03-24 11:14:18 -03:00
Wim Taymans 97be4713ea caps: warn when make_writable result is ignored 2011-02-23 12:44:54 +01:00
Wim Taymans 70be8d8d95 improve type registration 2011-02-23 10:35:36 +01:00
Wim Taymans b82a0f5050 fix macros 2011-02-23 10:35:36 +01:00
Wim Taymans 317af67bc4 miniobject: make queries a boxed type
More minionject stuff.
2011-02-23 10:34:45 +01:00
Wim Taymans 56a3364183 messages: make message a simple boxed type 2011-02-23 10:34:27 +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 993eda5004 remove deprecated symbols and methods 2010-12-06 19:18:31 +01:00
Sebastian Dröge 5f4a965f67 gstxml: Deprecate GstXml and related functions
Pipeline serialisation to and from XML is horribly broken for all
but the most simple use cases, and will likely never be fixed.
Make sure everyone playing around with these tools is aware of
this, to avoid frustration. See countless bug reports in bugzilla.

Fixes bug #622685.
2010-06-25 18:25:40 +02:00
Edward Hervey 32adac81ee gstcaps: New gst_caps_steal_structure() method
This allows removing structures from caps without them being freed. Helpful when
plugins need to move around structures without having to do an expensive structure
copy.

API:gst_caps_steal_structure

https://bugzilla.gnome.org/show_bug.cgi?id=621527
2010-06-14 13:16:18 +02:00
Benjamin Otte 31832d3c21 caps: Use G_GNUC_WARN_UNUSED_RESULT for make_writable()
People often call
  gst_caps_make_writable (caps);
instead of
  caps = gst_caps_make_writable (caps);
and cause a bug. Warning about an unused return value helps here.

See https://bugzilla.gnome.org/show_bug.cgi?id=616541#c2 for an example.
2010-04-29 22:41:36 +02:00
Benjamin Otte 0ff4086507 Improve caps setters API
This patch adds gst_caps_set_value() and allows gst_caps_set_simple() to
work on non-simple caps. See the API documentation for the functions
about what they do.

The intention of these changes is to ease working with caps in caps
transform functions. An example for this would be ffmpegcolorspace,
where the caps transform function could be changed to look roughly like
this (pseudocode ahead):
  result = gst_caps_copy (template_caps);
  value = gst_structure_get_value (gst_caps_get_structure (caps, 0),
    "widh");
  gst_caps_set_value (result, value);
  /* same for height, framerate and par */
  return caps;
which is much cleaner and easier to understand than the current code.

https://bugzilla.gnome.org/show_bug.cgi?id=597690
2009-10-15 19:10:50 +02:00
Stefan Kost 568202cb47 caps: add gst_caps_can_intersect()
Often we don't need the result of the intersection. Add a variant that only
tries to intersect. It can break out earlier and does less GValue copying.
API: gst_caps_can_intersect()
2009-08-06 15:30:33 +03:00
José Alburquerque 126b82fc47 gst/gstcaps.*: Constify the field gchar * params in set_simple and friends.
Original commit message from CVS:
Patch by:  José Alburquerque <jaalburqu at svn dot gnome dot org>
* gst/gstcaps.c: (gst_caps_set_simple),
(gst_caps_set_simple_valist), (gst_caps_intersect):
* gst/gstcaps.h:
Constify the field gchar * params in set_simple and friends.
Fixes #522326.
2008-03-24 10:33:41 +00:00
Jan Schmidt 60fa209cbd gst/gstcaps.h: Add extra initialisers for Caps things, to fix some plugin warnings when using -Wextra
Original commit message from CVS:
* gst/gstcaps.h:
Add extra initialisers for Caps things, to fix some plugin warnings
when using -Wextra
2006-09-20 16:17:26 +00:00
Wim Taymans a0dbcd9ee4 gst/gstcaps.*: Fix docs and indentation again.
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_merge_structure):
* gst/gstcaps.h:
Fix docs and indentation again.
* tests/check/gst/gstquery.c: (GST_START_TEST):
Fix leak in tests and add some more tests.
2006-08-28 16:39:20 +00:00
Stefan Kost fc8d184bba implement caps merging (fixes #352580)
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstcaps.c: (gst_caps_structure_is_subset_field),
(gst_caps_structure_is_subset), (gst_caps_merge),
(gst_caps_merge_structure):
* gst/gstcaps.h:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_transform_caps):
* tests/check/gst/gstcaps.c: (GST_START_TEST), (gst_caps_suite):
implement caps merging (fixes #352580)
2006-08-24 10:40:31 +00:00
Stefan Kost 38d2d33f22 API: Add gst_caps_merge() and use it in basetransform, fixes #345444 in a better way
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstcaps.c: (gst_structure_is_equal_foreach),
(gst_caps_merge):
* gst/gstcaps.h:
* libs/gst/base/gstbasetransform.c:
(gst_base_transform_transform_caps):
API: Add gst_caps_merge() and use it in basetransform, fixes #345444
in a better way
2006-08-21 14:54:31 +00:00
Wim Taymans f0eeee3342 docs/gst/gstreamer-sections.txt: Add GstClockClass vmethod docs.
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
Add GstClockClass vmethod docs.
* gst/gstcaps.h:
Mark #endif with comment for associated #if
* gst/gstclock.c: (gst_clock_id_wait):
* gst/gstclock.h:
Add vmethod wait_jitter to avoid an unneeded _get_time() for
most clock implementations.
Document vmethods.
Flesh out docs about resolution methods.
API: GstClockClass::wait_jitter
* gst/gstsystemclock.c: (gst_system_clock_class_init),
(gst_system_clock_async_thread),
(gst_system_clock_id_wait_jitter_unlocked),
(gst_system_clock_id_wait_jitter):
Use base class wait_jitter variant for improved performance
due to less clock polling.
2006-08-11 15:24:03 +00:00
Edward Hervey bd97cc0541 gst/gstcaps.*: Added gpointer GType for GstStaticCaps so we can wrap them in bindings.
Original commit message from CVS:
* gst/gstcaps.c: (gst_static_caps_get_type):
* gst/gstcaps.h:
Added gpointer GType for GstStaticCaps so we can wrap them in bindings.
* gst/gstpadtemplate.c: (gst_static_pad_template_get_type):
* gst/gstpadtemplate.h:
Added gpointer GType for GstStaticPadTemplate so we can wrap them in
bindings.
2005-12-20 11:12:53 +00:00
Andy Wingo f641e8a9fe gst/: Add glib-compat.h.
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* gst/gsttaglist.h:
* gst/gstcaps.h:
* gst/gststructure.h: Add glib-compat.h.
2005-11-21 19:58:23 +00:00
Andy Wingo fd6ca0191b gst/: Sprinkle NULL_TERMINATED to taste.
Original commit message from CVS:
2005-11-21  Andy Wingo  <wingo@pobox.com>

* gst/gsttagsetter.h:
* gst/gsttaglist.h:
* gst/gststructure.h:
* gst/gstcaps.h:
* gst/gstutils.h: Sprinkle NULL_TERMINATED to taste.
2005-11-21 18:41:39 +00:00
Wim Taymans deacfd8e89 Make a proper enum of the flag.
Original commit message from CVS:
* docs/design/part-TODO.txt:
* gst/gstcaps.h:
Make a proper enum of the flag.
2005-11-20 13:28:11 +00:00
Wim Taymans 692ec0dd30 docs/design/part-TODO.txt: Some more items for the TODO
Original commit message from CVS:
* docs/design/part-TODO.txt:
Some more items for the TODO

* gst/gstcaps.c:
* gst/gstcaps.h:
Document GstCaps.
2005-11-09 12:01:46 +00:00
Stefan Kost fd15eb56af more docs added
Original commit message from CVS:
* docs/gst/gstreamer-sections.txt:
* gst/gstcaps.h:
* gst/gstinfo.c:
* gst/gstminiobject.h:
* gst/gstobject.h:
* gst/gstutils.h:
more docs added
2005-11-04 20:12:01 +00:00