gst/gstcaps.h: Added gst_caps_is_simple() macro.

Original commit message from CVS:
* 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().
This commit is contained in:
David Schleef 2004-01-16 00:58:06 +00:00
parent a9514e81c4
commit a5834649c7
8 changed files with 35 additions and 20 deletions

View file

@ -1,3 +1,13 @@
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

View file

@ -84,6 +84,7 @@ void gst_caps_append (GstCaps *caps1, GstCaps *caps2);
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);

View file

@ -22,7 +22,7 @@ void test1(void)
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);
@ -32,7 +32,7 @@ void test1(void)
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);
@ -42,7 +42,7 @@ void test1(void)
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);
@ -52,7 +52,7 @@ void test1(void)
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);
@ -64,7 +64,7 @@ void test1(void)
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);
@ -75,7 +75,7 @@ void test1(void)
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));
@ -88,7 +88,7 @@ void test1(void)
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);
@ -99,7 +99,7 @@ void test1(void)
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);

View file

@ -54,7 +54,8 @@ main (int argc, char *argv[])
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));

View file

@ -112,7 +112,8 @@ main (int argc, char *argv[])
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);

View file

@ -22,7 +22,7 @@ void test1(void)
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);
@ -32,7 +32,7 @@ void test1(void)
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);
@ -42,7 +42,7 @@ void test1(void)
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);
@ -52,7 +52,7 @@ void test1(void)
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);
@ -64,7 +64,7 @@ void test1(void)
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);
@ -75,7 +75,7 @@ void test1(void)
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));
@ -88,7 +88,7 @@ void test1(void)
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);
@ -99,7 +99,7 @@ void test1(void)
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);

View file

@ -54,7 +54,8 @@ main (int argc, char *argv[])
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));

View file

@ -112,7 +112,8 @@ main (int argc, char *argv[])
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);