2003-11-11 19:14:14 +00:00
|
|
|
/* GStreamer
|
2004-03-12 18:25:07 +00:00
|
|
|
* Copyright (C) 2003 David A. Schleef <ds@schleef.org>
|
2003-11-11 19:14:14 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
2003-12-22 01:39:35 +00:00
|
|
|
#ifndef __GST_CAPS_H__
|
|
|
|
#define __GST_CAPS_H__
|
2003-11-11 19:14:14 +00:00
|
|
|
|
|
|
|
#include <gst/gstconfig.h>
|
|
|
|
#include <gst/gststructure.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
2004-03-15 14:43:35 +00:00
|
|
|
|
gst/gstcaps.c: Patch from Tim-Philipp Müller to fix GST_CAPS() and GST_IS_CAPS(). (bug #141304)
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_copy), (gst_caps_free),
(gst_caps_append), (gst_caps_append_structure),
(gst_caps_get_size), (gst_caps_get_structure), (gst_caps_copy_1),
(gst_caps_set_simple), (gst_caps_set_simple_valist),
(gst_caps_is_any), (gst_caps_is_empty), (gst_caps_is_chained),
(gst_caps_is_fixed), (gst_caps_is_always_compatible),
(gst_caps_intersect), (gst_caps_normalize),
(gst_caps_transform_to_string): Patch from Tim-Philipp Müller
to fix GST_CAPS() and GST_IS_CAPS(). (bug #141304)
* gst/gstcaps.h: use GST_IS_CAPS().
2004-04-28 20:19:46 +00:00
|
|
|
#define GST_TYPE_CAPS (gst_caps_get_type())
|
2004-09-26 17:35:08 +00:00
|
|
|
#define GST_CAPS(object) ((GstCaps*)object)
|
gst/gstcaps.c: Patch from Tim-Philipp Müller to fix GST_CAPS() and GST_IS_CAPS(). (bug #141304)
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_copy), (gst_caps_free),
(gst_caps_append), (gst_caps_append_structure),
(gst_caps_get_size), (gst_caps_get_structure), (gst_caps_copy_1),
(gst_caps_set_simple), (gst_caps_set_simple_valist),
(gst_caps_is_any), (gst_caps_is_empty), (gst_caps_is_chained),
(gst_caps_is_fixed), (gst_caps_is_always_compatible),
(gst_caps_intersect), (gst_caps_normalize),
(gst_caps_transform_to_string): Patch from Tim-Philipp Müller
to fix GST_CAPS() and GST_IS_CAPS(). (bug #141304)
* gst/gstcaps.h: use GST_IS_CAPS().
2004-04-28 20:19:46 +00:00
|
|
|
#define GST_IS_CAPS(object) ((object) && (GST_CAPS(object)->type == GST_TYPE_CAPS))
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2004-03-12 19:32:26 +00:00
|
|
|
#define GST_CAPS_FLAGS_ANY (1 << 0)
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2004-03-12 18:25:07 +00:00
|
|
|
#define GST_CAPS_ANY gst_caps_new_any()
|
|
|
|
#define GST_CAPS_NONE gst_caps_new_empty()
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2004-03-12 18:25:07 +00:00
|
|
|
#define GST_STATIC_CAPS_ANY GST_STATIC_CAPS("ANY")
|
|
|
|
#define GST_STATIC_CAPS_NONE GST_STATIC_CAPS("NONE")
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2004-03-12 18:25:07 +00:00
|
|
|
#define GST_CAPS_IS_SIMPLE(caps) (gst_caps_get_size(caps) == 1)
|
2004-03-13 00:14:46 +00:00
|
|
|
#define gst_caps_is_simple(caps) GST_CAPS_IS_SIMPLE(caps)
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2004-03-12 18:25:07 +00:00
|
|
|
#define GST_DEBUG_CAPS(string, caps) \
|
|
|
|
GST_DEBUG ( string "%s: " GST_PTR_FORMAT, caps)
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2004-03-12 18:25:07 +00:00
|
|
|
#define GST_STATIC_CAPS(string) \
|
|
|
|
{ \
|
|
|
|
/* caps */ { 0 }, \
|
|
|
|
/* string */ string, \
|
|
|
|
}
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2003-12-22 01:39:35 +00:00
|
|
|
typedef struct _GstCaps GstCaps;
|
|
|
|
typedef struct _GstStaticCaps GstStaticCaps;
|
2003-11-11 19:14:14 +00:00
|
|
|
|
2004-12-08 17:40:37 +00:00
|
|
|
/* refcount */
|
|
|
|
#define GST_CAPS_REFCOUNT(caps) ((GST_CAPS(caps))->refcount)
|
|
|
|
#define GST_CAPS_REFCOUNT_VALUE(caps) (gst_atomic_int_read (&(GST_CAPS(caps))->refcount))
|
|
|
|
|
2004-03-15 14:43:35 +00:00
|
|
|
struct _GstCaps {
|
2003-11-11 19:14:14 +00:00
|
|
|
GType type;
|
|
|
|
|
More MT fixes. Header cleanups, design doc update.
Original commit message from CVS:
* docs/design/part-MT-refcounting.txt:
* gst/gstbin.c: (gst_bin_set_index), (gst_bin_set_clock),
(gst_bin_add_func), (gst_bin_add), (gst_bin_remove_func),
(gst_bin_remove), (gst_bin_iterate_elements),
(bin_element_is_sink), (gst_bin_get_state), (gst_bin_change_state),
(gst_bin_get_by_name), (gst_bin_get_by_name_recurse_up),
(gst_bin_get_by_interface), (gst_bin_get_all_by_interface):
* gst/gstbin.h:
* gst/gstbuffer.h:
* gst/gstbus.h:
* gst/gstcaps.h:
* gst/gstclock.h:
* gst/gstdata.h:
* gst/gstelement.h:
* gst/gstevent.h:
* gst/gstmessage.h:
* gst/gststructure.h:
More MT fixes. Header cleanups, design doc update.
2004-12-09 23:28:31 +00:00
|
|
|
/*< public >*/ /* with COW */
|
2004-12-08 17:40:37 +00:00
|
|
|
/* refcounting */
|
|
|
|
GstAtomicInt refcount;
|
|
|
|
|
2003-11-11 19:14:14 +00:00
|
|
|
guint16 flags;
|
|
|
|
GPtrArray *structs;
|
2004-03-15 22:42:34 +00:00
|
|
|
|
More MT fixes. Header cleanups, design doc update.
Original commit message from CVS:
* docs/design/part-MT-refcounting.txt:
* gst/gstbin.c: (gst_bin_set_index), (gst_bin_set_clock),
(gst_bin_add_func), (gst_bin_add), (gst_bin_remove_func),
(gst_bin_remove), (gst_bin_iterate_elements),
(bin_element_is_sink), (gst_bin_get_state), (gst_bin_change_state),
(gst_bin_get_by_name), (gst_bin_get_by_name_recurse_up),
(gst_bin_get_by_interface), (gst_bin_get_all_by_interface):
* gst/gstbin.h:
* gst/gstbuffer.h:
* gst/gstbus.h:
* gst/gstcaps.h:
* gst/gstclock.h:
* gst/gstdata.h:
* gst/gstelement.h:
* gst/gstevent.h:
* gst/gstmessage.h:
* gst/gststructure.h:
More MT fixes. Header cleanups, design doc update.
2004-12-09 23:28:31 +00:00
|
|
|
/*< private >*/
|
2004-09-26 17:35:08 +00:00
|
|
|
gpointer _gst_reserved[GST_PADDING];
|
2003-11-11 19:14:14 +00:00
|
|
|
};
|
|
|
|
|
2004-03-15 14:43:35 +00:00
|
|
|
struct _GstStaticCaps {
|
More MT fixes. Header cleanups, design doc update.
Original commit message from CVS:
* docs/design/part-MT-refcounting.txt:
* gst/gstbin.c: (gst_bin_set_index), (gst_bin_set_clock),
(gst_bin_add_func), (gst_bin_add), (gst_bin_remove_func),
(gst_bin_remove), (gst_bin_iterate_elements),
(bin_element_is_sink), (gst_bin_get_state), (gst_bin_change_state),
(gst_bin_get_by_name), (gst_bin_get_by_name_recurse_up),
(gst_bin_get_by_interface), (gst_bin_get_all_by_interface):
* gst/gstbin.h:
* gst/gstbuffer.h:
* gst/gstbus.h:
* gst/gstcaps.h:
* gst/gstclock.h:
* gst/gstdata.h:
* gst/gstelement.h:
* gst/gstevent.h:
* gst/gstmessage.h:
* gst/gststructure.h:
More MT fixes. Header cleanups, design doc update.
2004-12-09 23:28:31 +00:00
|
|
|
/*< public >*/
|
2003-12-22 01:39:35 +00:00
|
|
|
GstCaps caps;
|
2003-11-11 19:14:14 +00:00
|
|
|
const char *string;
|
More MT fixes. Header cleanups, design doc update.
Original commit message from CVS:
* docs/design/part-MT-refcounting.txt:
* gst/gstbin.c: (gst_bin_set_index), (gst_bin_set_clock),
(gst_bin_add_func), (gst_bin_add), (gst_bin_remove_func),
(gst_bin_remove), (gst_bin_iterate_elements),
(bin_element_is_sink), (gst_bin_get_state), (gst_bin_change_state),
(gst_bin_get_by_name), (gst_bin_get_by_name_recurse_up),
(gst_bin_get_by_interface), (gst_bin_get_all_by_interface):
* gst/gstbin.h:
* gst/gstbuffer.h:
* gst/gstbus.h:
* gst/gstcaps.h:
* gst/gstclock.h:
* gst/gstdata.h:
* gst/gstelement.h:
* gst/gstevent.h:
* gst/gstmessage.h:
* gst/gststructure.h:
More MT fixes. Header cleanups, design doc update.
2004-12-09 23:28:31 +00:00
|
|
|
|
|
|
|
/*< private >*/
|
2004-09-26 17:35:08 +00:00
|
|
|
gpointer _gst_reserved[GST_PADDING];
|
2003-11-11 19:14:14 +00:00
|
|
|
};
|
|
|
|
|
2004-03-15 14:43:35 +00:00
|
|
|
GType gst_caps_get_type (void) G_GNUC_CONST;
|
|
|
|
GstCaps * gst_caps_new_empty (void);
|
|
|
|
GstCaps * gst_caps_new_any (void);
|
|
|
|
GstCaps * gst_caps_new_simple (const char *media_type,
|
|
|
|
const char *fieldname,
|
|
|
|
...);
|
|
|
|
GstCaps * gst_caps_new_full (GstStructure *struct1,
|
|
|
|
...);
|
|
|
|
GstCaps * gst_caps_new_full_valist (GstStructure *structure,
|
|
|
|
va_list var_args);
|
2004-12-08 17:40:37 +00:00
|
|
|
|
|
|
|
/* reference counting */
|
|
|
|
GstCaps * gst_caps_ref (GstCaps* caps);
|
testsuite/caps/value_serialize.c: merge from HEAD.
Original commit message from CVS:
2005-02-10 Andy Wingo <wingo@pobox.com>
* testsuite/caps/value_serialize.c: merge from HEAD.
* testsuite/caps/subtract.c:
* testsuite/caps/filtercaps.c:
* testsuite/caps/enumcaps.c:
* testsuite/caps/deserialize.c:
* testsuite/caps/caps.c:
* testsuite/caps/audioscale.c: Unref caps, not free.
* testsuite/caps/caps_strings: Merged from HEAD.
* gst/elements/gstidentity.c (gst_identity_proxy_getcaps): Getcaps
implementation for identity.
* gst/gststructure.h
* gst/gststructure.c
(gst_caps_structure_fixate_field_nearest_double):
(gst_caps_structure_fixate_field_nearest_int): Moved from
gstcaps.c because we need the private IS_MUTABLE macro.
(IS_MUTABLE): New macro, determines if a
structure is mutable or not.
(gst_structure_free): Don't allow free while holding a pointer to
a parent's refcount.
(gst_structure_set_name): Check for writability.
(gst_structure_id_set_value): Same.
(gst_structure_set_value): Same.
(gst_structure_set_valist): Same.
(gst_structure_remove_field): Same.
(gst_structure_remove_all_fields): Same.
(gst_structure_map_in_place): New routine, like _foreach but
allows the function to mutate the value (via a non-const
prototype). Check for writability.
(gst_structure_foreach): Redefine to only take non-mutating
functions.
* gst/gstcaps.c (IS_WRITABLE): New macro, returns TRUE if the caps
are writable.
(gst_caps_copy): Add some docs about mutability, etc.
(_gst_caps_free): Set the parent refcount pointer on structures to
NULL before freeing them.
(gst_caps_ref): Document.
(gst_caps_make_writable): Doc.
(gst_caps_make_writable): Changed to make_writable, get_writable
sounds too much like retrieving a property.
(gst_caps_copy_1): Removed, not very useful.
(gst_caps_ref_by_count): Removed, no need to have something GLib
doesn't.
(gst_caps_copy_conditional): Ref instead of copying.
(gst_static_caps_get): Retain a reference to the returned caps, so
that the static caps will remain immutable.
(gst_caps_remove_and_get_structure): Set the parent refcount to
NULL when removing the structure.
(gst_caps_append): Fix to work with structure parent refcounts.
Check for writability.
(gst_caps_append_structure): Check for writability, work with
parent refcounts.
(gst_caps_remove_structure): Check for writability.
(gst_caps_set_simple): Check for writability.
(gst_caps_set_simple_valist): Check for writability.
(gst_caps_is_fixed_foreach): Update for non-mutating foreach.
(gst_structure_is_equal_foreach): Same.
(gst_caps_structure_intersect_field): Same.
(gst_caps_structure_subtract_field): Same. Make static.
(gst_caps_normalize_foreach): Same.
(gst_caps_structure_figure_out_union): Same.
(gst_caps_switch_structures): New static function, switches out
structures inside a caps, taking care of parent_refcount setting.
* gst/gstpad.c (gst_pad_get_allowed_caps): Remove the restriction
on only src pads, wim von masterhack claims it was bogus.
* testsuite/caps/Makefile.am
* testsuite/caps/app_fixate.c: Removed app_fixate test, things are
done a bit differently in THREADED.
2005-02-10 19:40:23 +00:00
|
|
|
GstCaps * gst_caps_copy (const GstCaps * caps);
|
|
|
|
GstCaps * gst_caps_make_writable (GstCaps *caps);
|
2004-12-08 17:40:37 +00:00
|
|
|
void gst_caps_unref (GstCaps* caps);
|
|
|
|
|
2004-03-30 07:36:19 +00:00
|
|
|
G_CONST_RETURN GstCaps * gst_static_caps_get (GstStaticCaps *static_caps);
|
2003-11-11 19:14:14 +00:00
|
|
|
|
|
|
|
/* manipulation */
|
2004-03-15 14:43:35 +00:00
|
|
|
void gst_caps_append (GstCaps *caps1,
|
|
|
|
GstCaps *caps2);
|
2004-03-30 07:36:19 +00:00
|
|
|
void gst_caps_append_structure (GstCaps *caps,
|
2004-03-15 14:43:35 +00:00
|
|
|
GstStructure *structure);
|
|
|
|
int gst_caps_get_size (const GstCaps *caps);
|
|
|
|
GstStructure * gst_caps_get_structure (const GstCaps *caps,
|
|
|
|
int index);
|
add gst_caps_copy_nth as a more general replacement for copy_1.
Original commit message from CVS:
* docs/design/part-TODO.txt:
* gst/elements/gstfakesink.c: (gst_fakesink_event),
(gst_fakesink_chain):
* gst/elements/gstfakesink.h:
* gst/elements/gstfakesrc.c: (gst_fakesrc_loop),
(gst_fakesrc_activate):
* gst/elements/gstfilesrc.c: (gst_filesrc_getrange),
(gst_filesrc_open_file), (gst_filesrc_loop),
(gst_filesrc_activate), (gst_filesrc_change_state),
(filesrc_find_peek), (gst_filesrc_type_find):
* gst/gstcaps.c: (gst_caps_copy_nth):
* gst/gstcaps.h:
* gst/gstelement.c: (gst_element_add_pad),
(gst_element_remove_pad), (iterate_pad),
(gst_element_get_state_func), (gst_element_commit_state),
(gst_element_set_state), (gst_element_pads_activate),
(gst_element_change_state), (gst_element_dispose):
* gst/gstutils.c: (gst_element_finish_preroll):
* gst/gstutils.h:
* tools/gst-launch.c: (check_intr):
add gst_caps_copy_nth as a more general replacement for
copy_1.
Slightly change the finish_preroll helper function to
include pad flush/active.
Small cleanups in fakesrc.
Add STREAM_LOCK in filesrc.
2005-02-16 15:18:18 +00:00
|
|
|
GstCaps * gst_caps_copy_nth (const GstCaps * caps, gint nth);
|
2004-03-15 14:43:35 +00:00
|
|
|
void gst_caps_set_simple (GstCaps *caps,
|
|
|
|
char *field, ...);
|
|
|
|
void gst_caps_set_simple_valist (GstCaps *caps,
|
|
|
|
char *field,
|
|
|
|
va_list varargs);
|
2003-11-11 19:14:14 +00:00
|
|
|
|
|
|
|
/* tests */
|
2004-03-15 14:43:35 +00:00
|
|
|
gboolean gst_caps_is_any (const GstCaps *caps);
|
|
|
|
gboolean gst_caps_is_empty (const GstCaps *caps);
|
gst/gstcaps.c: check for ANY caps before appending/unioning
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_append), (gst_caps_union):
check for ANY caps before appending/unioning
* gst/gstcaps.c: (gst_caps_is_subset),
(gst_caps_is_equal), (gst_caps_structure_subtract_field),
(gst_caps_structure_subtract), (gst_caps_subtract):
* gst/gstcaps.h:
add gst_caps_is_equal, gst_caps_is_subset and gst_caps_subtract to
the API. deprecate gst_caps_is_equal_fixed
* gst/gstpad.c: (gst_pad_try_set_caps):
* gst/gstqueue.c: (gst_queue_link):
s/gst_caps_is_equal_fixed/gst_caps_is_equal/
* gst/gststructure.c: (gst_structure_get_name_id):
* gst/gststructure.h:
add function gst_structure_get_name_id
* gst/gstvalue.c: (gst_value_subtract_int_int_range),
(gst_value_create_new_range), (gst_value_subtract_int_range_int),
(gst_value_subtract_int_range_int_range),
(gst_value_subtract_double_double_range),
(gst_value_subtract_double_range_double),
(gst_value_subtract_double_range_double_range),
(gst_value_subtract_from_list), (gst_value_subtract_list),
(gst_value_can_intersect), (gst_value_subtract),
(gst_value_can_subtract), (gst_value_register_subtract_func),
(_gst_value_initialize):
* gst/gstvalue.h:
add support for subtracting values from each other. Note that
subtracting means subtracting as in set theory. Required for caps
stuff above.
* testsuite/caps/.cvsignore:
* testsuite/caps/Makefile.am:
* testsuite/caps/erathostenes.c: (erathostenes), (main):
* testsuite/caps/sets.c: (check_caps), (main):
* testsuite/caps/subtract.c: (check_caps), (main):
add tests for subtraction and equality code.
2004-04-21 03:25:13 +00:00
|
|
|
gboolean gst_caps_is_fixed (const GstCaps *caps);
|
2004-03-15 14:43:35 +00:00
|
|
|
gboolean gst_caps_is_always_compatible (const GstCaps *caps1,
|
|
|
|
const GstCaps *caps2);
|
gst/gstcaps.c: check for ANY caps before appending/unioning
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_append), (gst_caps_union):
check for ANY caps before appending/unioning
* gst/gstcaps.c: (gst_caps_is_subset),
(gst_caps_is_equal), (gst_caps_structure_subtract_field),
(gst_caps_structure_subtract), (gst_caps_subtract):
* gst/gstcaps.h:
add gst_caps_is_equal, gst_caps_is_subset and gst_caps_subtract to
the API. deprecate gst_caps_is_equal_fixed
* gst/gstpad.c: (gst_pad_try_set_caps):
* gst/gstqueue.c: (gst_queue_link):
s/gst_caps_is_equal_fixed/gst_caps_is_equal/
* gst/gststructure.c: (gst_structure_get_name_id):
* gst/gststructure.h:
add function gst_structure_get_name_id
* gst/gstvalue.c: (gst_value_subtract_int_int_range),
(gst_value_create_new_range), (gst_value_subtract_int_range_int),
(gst_value_subtract_int_range_int_range),
(gst_value_subtract_double_double_range),
(gst_value_subtract_double_range_double),
(gst_value_subtract_double_range_double_range),
(gst_value_subtract_from_list), (gst_value_subtract_list),
(gst_value_can_intersect), (gst_value_subtract),
(gst_value_can_subtract), (gst_value_register_subtract_func),
(_gst_value_initialize):
* gst/gstvalue.h:
add support for subtracting values from each other. Note that
subtracting means subtracting as in set theory. Required for caps
stuff above.
* testsuite/caps/.cvsignore:
* testsuite/caps/Makefile.am:
* testsuite/caps/erathostenes.c: (erathostenes), (main):
* testsuite/caps/sets.c: (check_caps), (main):
* testsuite/caps/subtract.c: (check_caps), (main):
add tests for subtraction and equality code.
2004-04-21 03:25:13 +00:00
|
|
|
gboolean gst_caps_is_subset (const GstCaps *subset,
|
|
|
|
const GstCaps *superset);
|
|
|
|
gboolean gst_caps_is_equal (const GstCaps *caps1,
|
|
|
|
const GstCaps *caps2);
|
2003-11-11 19:14:14 +00:00
|
|
|
|
|
|
|
/* operations */
|
2004-03-15 14:43:35 +00:00
|
|
|
GstCaps * gst_caps_intersect (const GstCaps *caps1,
|
|
|
|
const GstCaps *caps2);
|
gst/gstcaps.c: check for ANY caps before appending/unioning
Original commit message from CVS:
* gst/gstcaps.c: (gst_caps_append), (gst_caps_union):
check for ANY caps before appending/unioning
* gst/gstcaps.c: (gst_caps_is_subset),
(gst_caps_is_equal), (gst_caps_structure_subtract_field),
(gst_caps_structure_subtract), (gst_caps_subtract):
* gst/gstcaps.h:
add gst_caps_is_equal, gst_caps_is_subset and gst_caps_subtract to
the API. deprecate gst_caps_is_equal_fixed
* gst/gstpad.c: (gst_pad_try_set_caps):
* gst/gstqueue.c: (gst_queue_link):
s/gst_caps_is_equal_fixed/gst_caps_is_equal/
* gst/gststructure.c: (gst_structure_get_name_id):
* gst/gststructure.h:
add function gst_structure_get_name_id
* gst/gstvalue.c: (gst_value_subtract_int_int_range),
(gst_value_create_new_range), (gst_value_subtract_int_range_int),
(gst_value_subtract_int_range_int_range),
(gst_value_subtract_double_double_range),
(gst_value_subtract_double_range_double),
(gst_value_subtract_double_range_double_range),
(gst_value_subtract_from_list), (gst_value_subtract_list),
(gst_value_can_intersect), (gst_value_subtract),
(gst_value_can_subtract), (gst_value_register_subtract_func),
(_gst_value_initialize):
* gst/gstvalue.h:
add support for subtracting values from each other. Note that
subtracting means subtracting as in set theory. Required for caps
stuff above.
* testsuite/caps/.cvsignore:
* testsuite/caps/Makefile.am:
* testsuite/caps/erathostenes.c: (erathostenes), (main):
* testsuite/caps/sets.c: (check_caps), (main):
* testsuite/caps/subtract.c: (check_caps), (main):
add tests for subtraction and equality code.
2004-04-21 03:25:13 +00:00
|
|
|
GstCaps * gst_caps_subtract (const GstCaps *minuend,
|
|
|
|
const GstCaps *subtrahend);
|
2004-03-15 14:43:35 +00:00
|
|
|
GstCaps * gst_caps_union (const GstCaps *caps1,
|
|
|
|
const GstCaps *caps2);
|
|
|
|
GstCaps * gst_caps_normalize (const GstCaps *caps);
|
2004-04-22 23:50:46 +00:00
|
|
|
gboolean gst_caps_do_simplify (GstCaps *caps);
|
2003-11-11 19:14:14 +00:00
|
|
|
|
|
|
|
#ifndef GST_DISABLE_LOADSAVE
|
2004-03-15 14:43:35 +00:00
|
|
|
xmlNodePtr gst_caps_save_thyself (const GstCaps *caps,
|
|
|
|
xmlNodePtr parent);
|
|
|
|
GstCaps * gst_caps_load_thyself (xmlNodePtr parent);
|
2003-11-11 19:14:14 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
/* utility */
|
2004-03-15 14:43:35 +00:00
|
|
|
void gst_caps_replace (GstCaps **caps,
|
|
|
|
GstCaps *newcaps);
|
|
|
|
gchar * gst_caps_to_string (const GstCaps *caps);
|
|
|
|
GstCaps * gst_caps_from_string (const gchar *string);
|
|
|
|
|
2003-11-11 19:14:14 +00:00
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
G_END_DECLS
|
2004-03-15 14:43:35 +00:00
|
|
|
|
2003-12-22 01:39:35 +00:00
|
|
|
#endif /* __GST_CAPS_H__ */
|