+2004-01-15 David Schleef <ds@schleef.org>
+
+ * gst/gstcaps.h:
+ Added gst_caps_is_simple() macro.
+ * testsuite/caps/caps.c: (test1):
+ * testsuite/caps/intersect2.c: (main):
+ * testsuite/caps/intersection.c: (main):
+ Fixes to make 'make check' work again after removing
+ gst_caps_is_chained().
+
2004-01-15 Leif Johnson <leif@ambient.2y.net>
* docs/random/uraeus/gstreamer_and_midi.txt: Rather large edits
void gst_caps_append_structure (GstCaps *caps1, GstStructure *structure);
GstCaps *gst_caps_split_one (GstCaps *caps);
int gst_caps_get_size (const GstCaps *caps);
+#define gst_caps_is_simple(caps) (gst_caps_get_size(caps) == 1)
GstStructure *gst_caps_get_structure (const GstCaps *caps, int index);
#ifndef GST_DISABLE_DEPRECATED
GstCaps *gst_caps_copy_1 (const GstCaps *caps);
g_assert(caps != NULL);
g_assert(gst_caps_is_empty(caps)==FALSE);
g_assert(gst_caps_is_any(caps)==FALSE);
- g_assert(gst_caps_is_chained(caps)==FALSE);
+ g_assert(gst_caps_is_simple(caps)==TRUE);
g_assert(gst_caps_is_fixed(caps)==TRUE);
g_print("%s\n", gst_caps_to_string(caps));
gst_caps_free(caps);
g_assert(caps != NULL);
g_assert(gst_caps_is_empty(caps)==FALSE);
g_assert(gst_caps_is_any(caps)==FALSE);
- g_assert(gst_caps_is_chained(caps)==FALSE);
+ g_assert(gst_caps_is_simple(caps)==TRUE);
g_assert(gst_caps_is_fixed(caps)==TRUE);
g_print("%s\n", gst_caps_to_string(caps));
gst_caps_free(caps);
g_assert(caps != NULL);
g_assert(gst_caps_is_empty(caps)==FALSE);
g_assert(gst_caps_is_any(caps)==FALSE);
- g_assert(gst_caps_is_chained(caps)==FALSE);
+ g_assert(gst_caps_is_simple(caps)==TRUE);
g_assert(gst_caps_is_fixed(caps)==TRUE);
g_print("%s\n", gst_caps_to_string(caps));
gst_caps_free(caps);
g_assert(caps != NULL);
g_assert(gst_caps_is_empty(caps)==FALSE);
g_assert(gst_caps_is_any(caps)==FALSE);
- g_assert(gst_caps_is_chained(caps)==FALSE);
+ g_assert(gst_caps_is_simple(caps)==TRUE);
g_assert(gst_caps_is_fixed(caps)==TRUE);
g_print("%s\n", gst_caps_to_string(caps));
gst_caps_free(caps);
g_assert(caps != NULL);
g_assert(gst_caps_is_empty(caps)==FALSE);
g_assert(gst_caps_is_any(caps)==FALSE);
- g_assert(gst_caps_is_chained(caps)==TRUE);
+ g_assert(gst_caps_is_simple(caps)==FALSE);
g_assert(gst_caps_is_fixed(caps)==FALSE);
g_print("%s\n", gst_caps_to_string(caps));
gst_caps_free(caps);
g_assert(caps2 != NULL);
g_assert(gst_caps_is_empty(caps2)==FALSE);
g_assert(gst_caps_is_any(caps2)==FALSE);
- g_assert(gst_caps_is_chained(caps2)==FALSE);
+ g_assert(gst_caps_is_simple(caps2)==TRUE);
g_assert(gst_caps_is_fixed(caps2)==TRUE);
g_print("%s\n", gst_caps_to_string(caps));
g_print("%s\n", gst_caps_to_string(caps2));
g_assert(caps != NULL);
g_assert(gst_caps_is_empty(caps)==FALSE);
g_assert(gst_caps_is_any(caps)==FALSE);
- g_assert(gst_caps_is_chained(caps)==TRUE);
+ g_assert(gst_caps_is_simple(caps)==FALSE);
g_assert(gst_caps_is_fixed(caps)==FALSE);
g_print("%s\n", gst_caps_to_string(caps));
gst_caps_free(caps);
gst_structure_new("audio/raw", "_int", G_TYPE_INT, 200, NULL));
g_assert(gst_caps_is_empty(caps)==FALSE);
g_assert(gst_caps_is_any(caps)==FALSE);
- g_assert(gst_caps_is_chained(caps)==TRUE);
+ g_assert(gst_caps_is_simple(caps)==FALSE);
g_assert(gst_caps_is_fixed(caps)==FALSE);
g_print("%s\n", gst_caps_to_string(caps));
gst_caps_free(caps);
gst_init (&argc, &argv);
caps1 = gst_caps_copy( gst_static_caps_get (&rawcaps1));
- caps2 = gst_caps_copy_1 (gst_static_caps_get (&rawcaps1));
+ caps2 = gst_caps_new_full (gst_structure_copy ( gst_caps_get_structure (
+ gst_static_caps_get (&rawcaps1), 0)), NULL);
#if 0
gst_caps_set(caps1, "height", GST_PROPS_INT(640));
gst_caps_save_thyself (caps, parent);
caps = gst_caps_intersect (gst_static_caps_get (&rawcaps6),
- gst_caps_copy_1(gst_static_caps_get (&rawcaps6)));
+ gst_caps_new_full (gst_structure_copy (
+ gst_caps_get_structure (gst_static_caps_get (&rawcaps6), 0)), NULL));
parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities5", NULL);
gst_caps_save_thyself (caps, parent);
g_assert(caps != NULL);
g_assert(gst_caps_is_empty(caps)==FALSE);
g_assert(gst_caps_is_any(caps)==FALSE);
- g_assert(gst_caps_is_chained(caps)==FALSE);
+ g_assert(gst_caps_is_simple(caps)==TRUE);
g_assert(gst_caps_is_fixed(caps)==TRUE);
g_print("%s\n", gst_caps_to_string(caps));
gst_caps_free(caps);
g_assert(caps != NULL);
g_assert(gst_caps_is_empty(caps)==FALSE);
g_assert(gst_caps_is_any(caps)==FALSE);
- g_assert(gst_caps_is_chained(caps)==FALSE);
+ g_assert(gst_caps_is_simple(caps)==TRUE);
g_assert(gst_caps_is_fixed(caps)==TRUE);
g_print("%s\n", gst_caps_to_string(caps));
gst_caps_free(caps);
g_assert(caps != NULL);
g_assert(gst_caps_is_empty(caps)==FALSE);
g_assert(gst_caps_is_any(caps)==FALSE);
- g_assert(gst_caps_is_chained(caps)==FALSE);
+ g_assert(gst_caps_is_simple(caps)==TRUE);
g_assert(gst_caps_is_fixed(caps)==TRUE);
g_print("%s\n", gst_caps_to_string(caps));
gst_caps_free(caps);
g_assert(caps != NULL);
g_assert(gst_caps_is_empty(caps)==FALSE);
g_assert(gst_caps_is_any(caps)==FALSE);
- g_assert(gst_caps_is_chained(caps)==FALSE);
+ g_assert(gst_caps_is_simple(caps)==TRUE);
g_assert(gst_caps_is_fixed(caps)==TRUE);
g_print("%s\n", gst_caps_to_string(caps));
gst_caps_free(caps);
g_assert(caps != NULL);
g_assert(gst_caps_is_empty(caps)==FALSE);
g_assert(gst_caps_is_any(caps)==FALSE);
- g_assert(gst_caps_is_chained(caps)==TRUE);
+ g_assert(gst_caps_is_simple(caps)==FALSE);
g_assert(gst_caps_is_fixed(caps)==FALSE);
g_print("%s\n", gst_caps_to_string(caps));
gst_caps_free(caps);
g_assert(caps2 != NULL);
g_assert(gst_caps_is_empty(caps2)==FALSE);
g_assert(gst_caps_is_any(caps2)==FALSE);
- g_assert(gst_caps_is_chained(caps2)==FALSE);
+ g_assert(gst_caps_is_simple(caps2)==TRUE);
g_assert(gst_caps_is_fixed(caps2)==TRUE);
g_print("%s\n", gst_caps_to_string(caps));
g_print("%s\n", gst_caps_to_string(caps2));
g_assert(caps != NULL);
g_assert(gst_caps_is_empty(caps)==FALSE);
g_assert(gst_caps_is_any(caps)==FALSE);
- g_assert(gst_caps_is_chained(caps)==TRUE);
+ g_assert(gst_caps_is_simple(caps)==FALSE);
g_assert(gst_caps_is_fixed(caps)==FALSE);
g_print("%s\n", gst_caps_to_string(caps));
gst_caps_free(caps);
gst_structure_new("audio/raw", "_int", G_TYPE_INT, 200, NULL));
g_assert(gst_caps_is_empty(caps)==FALSE);
g_assert(gst_caps_is_any(caps)==FALSE);
- g_assert(gst_caps_is_chained(caps)==TRUE);
+ g_assert(gst_caps_is_simple(caps)==FALSE);
g_assert(gst_caps_is_fixed(caps)==FALSE);
g_print("%s\n", gst_caps_to_string(caps));
gst_caps_free(caps);
gst_init (&argc, &argv);
caps1 = gst_caps_copy( gst_static_caps_get (&rawcaps1));
- caps2 = gst_caps_copy_1 (gst_static_caps_get (&rawcaps1));
+ caps2 = gst_caps_new_full (gst_structure_copy ( gst_caps_get_structure (
+ gst_static_caps_get (&rawcaps1), 0)), NULL);
#if 0
gst_caps_set(caps1, "height", GST_PROPS_INT(640));
gst_caps_save_thyself (caps, parent);
caps = gst_caps_intersect (gst_static_caps_get (&rawcaps6),
- gst_caps_copy_1(gst_static_caps_get (&rawcaps6)));
+ gst_caps_new_full (gst_structure_copy (
+ gst_caps_get_structure (gst_static_caps_get (&rawcaps6), 0)), NULL));
parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities5", NULL);
gst_caps_save_thyself (caps, parent);