diff options
author | David Schleef <ds@schleef.org> | 2003-12-21 22:33:42 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2003-12-21 22:33:42 +0000 |
commit | 63ee736634654a4e40334d91bff146944d350100 (patch) | |
tree | f436eef505ffa63d2119d612dae87db8ad9f50d1 /tests | |
parent | e1eb5e2d92cbe2d072c95837c031762af1cc8239 (diff) | |
download | gstreamer-CAPS.tar.gz |
Global change from "caps2" to "caps". Script is: #!/bin/sh find . -name '*.[chy]' -exec perl -i -p \CAPS-ENDCAPS
Original commit message from CVS:
Global change from "caps2" to "caps". Script is:
#!/bin/sh
find . -name '*.[chy]' -exec perl -i -p \
-e 's/gst_static_caps2_/gst_static_caps_/g;\
s/GST_CAPS2_/GST_CAPS_/g;\
s/gst_caps2_/gst_caps_/g;\
s/GstCaps2/GstCaps/g;\
s/GstStaticCaps2/GstStaticCaps/g;\
s/GST_STATIC_CAPS2_/GST_STATIC_CAPS_/g;\
s/GST_TYPE_CAPS2/GST_TYPE_CAPS/g;\
s/gst_caps_get_nth_cap/gst_caps_get_structure/g;\
s/gst_caps_get_n_structures/gst_caps_get_size/g;\
s/gst_caps_append_cap/gst_caps_append_structure/g;\
s/GST_CAPS2_/GST_CAPS_/g;' \
{} \;
Diffstat (limited to 'tests')
-rw-r--r-- | tests/old/examples/mixer/mixer.c | 8 | ||||
-rw-r--r-- | tests/old/examples/typefind/typefind.c | 4 | ||||
-rw-r--r-- | tests/old/testsuite/bytestream/gstbstest.c | 2 | ||||
-rw-r--r-- | tests/old/testsuite/caps/compatibility.c | 58 | ||||
-rw-r--r-- | tests/old/testsuite/caps/fixed.c | 2 | ||||
-rw-r--r-- | tests/old/testsuite/caps/intersect2.c | 102 | ||||
-rw-r--r-- | tests/old/testsuite/caps/intersection.c | 52 | ||||
-rw-r--r-- | tests/old/testsuite/caps/normalisation.c | 32 | ||||
-rw-r--r-- | tests/old/testsuite/caps/string-conversions.c | 56 | ||||
-rw-r--r-- | tests/old/testsuite/caps/union.c | 12 | ||||
-rw-r--r-- | tests/old/testsuite/caps2/caps.c | 172 | ||||
-rw-r--r-- | tests/old/testsuite/elements/tee.c | 12 |
12 files changed, 256 insertions, 256 deletions
diff --git a/tests/old/examples/mixer/mixer.c b/tests/old/examples/mixer/mixer.c index 4fad3174eb..6b27f5b944 100644 --- a/tests/old/examples/mixer/mixer.c +++ b/tests/old/examples/mixer/mixer.c @@ -40,12 +40,12 @@ void eos(GstElement *element) /* playing = FALSE; */ } -G_GNUC_UNUSED static GstCaps2* +G_GNUC_UNUSED static GstCaps* gst_play_type_find (GstBin *bin, GstElement *element) { GstElement *typefind; GstElement *pipeline; - GstCaps2 *caps = NULL; + GstCaps *caps = NULL; GST_DEBUG ("GstPipeline: typefind for element \"%s\"", GST_ELEMENT_NAME(element)); @@ -238,7 +238,7 @@ create_input_channel (int id, char* location) char buffer[20]; /* hold the names */ /* GstAutoplug *autoplug; - GstCaps2 *srccaps; */ + GstCaps *srccaps; */ GstElement *new_element; GstElement *decoder; @@ -330,7 +330,7 @@ create_input_channel (int id, char* location) #endif new_element = gst_autoplug_to_caps (autoplug, srccaps, - gst_caps2_new ("audio/raw", NULL), NULL); + gst_caps_new ("audio/raw", NULL), NULL); if (!new_element) { g_print ("could not autoplug, no suitable codecs found...\n"); diff --git a/tests/old/examples/typefind/typefind.c b/tests/old/examples/typefind/typefind.c index 11600dc8a8..a562306d30 100644 --- a/tests/old/examples/typefind/typefind.c +++ b/tests/old/examples/typefind/typefind.c @@ -1,7 +1,7 @@ #include <gst/gst.h> void -type_found (GstElement *typefind, const GstCaps2 * caps) +type_found (GstElement *typefind, const GstCaps * caps) { xmlDocPtr doc; xmlNodePtr parent; @@ -11,7 +11,7 @@ type_found (GstElement *typefind, const GstCaps2 * caps) parent = xmlNewChild (doc->xmlRootNode, NULL, "Caps1", NULL); /* FIXME */ - //gst_caps2_save_thyself (caps, parent); + //gst_caps_save_thyself (caps, parent); xmlDocDump (stdout, doc); } diff --git a/tests/old/testsuite/bytestream/gstbstest.c b/tests/old/testsuite/bytestream/gstbstest.c index b3264f5631..eb5a6c413c 100644 --- a/tests/old/testsuite/bytestream/gstbstest.c +++ b/tests/old/testsuite/bytestream/gstbstest.c @@ -171,7 +171,7 @@ gst_bstest_class_init (GstBsTestClass * klass) } -static GstCaps2 * +static GstCaps * gst_bstest_getcaps (GstPad *pad) { GstBsTest *bstest = GST_BSTEST (gst_pad_get_parent (pad)); diff --git a/tests/old/testsuite/caps/compatibility.c b/tests/old/testsuite/caps/compatibility.c index 500267dbce..036813a810 100644 --- a/tests/old/testsuite/caps/compatibility.c +++ b/tests/old/testsuite/caps/compatibility.c @@ -1,30 +1,30 @@ #include <gst/gst.h> /* these caps all have a non empty intersection */ -GstStaticCaps2 sinkcaps = GST_STATIC_CAPS( +GstStaticCaps sinkcaps = GST_STATIC_CAPS( "video/mpeg, " "mpegtype=(int)[1,2]" ); -GstStaticCaps2 mp1parsecaps = GST_STATIC_CAPS( +GstStaticCaps mp1parsecaps = GST_STATIC_CAPS( "video/mpeg, " "mpegtype=(int)1" ); -GstStaticCaps2 rawcaps = GST_STATIC_CAPS( +GstStaticCaps rawcaps = GST_STATIC_CAPS( "video/raw, " "fourcc=(fourcc){YV12,YUY2}, " "width=(int)[16,4096], " "height=(int)[16,4096]" ); -GstStaticCaps2 rawcaps2 = GST_STATIC_CAPS( +GstStaticCaps rawcaps2 = GST_STATIC_CAPS( "video/raw, " "fourcc=(fourcc)YUY2, " "height=(int)[16,256]" ); -GstStaticCaps2 rawcaps3 = GST_STATIC_CAPS( +GstStaticCaps rawcaps3 = GST_STATIC_CAPS( "video/raw, " "fourcc=(fourcc){YV12,YUY2}, " "height=(int)[16,4096]" @@ -32,27 +32,27 @@ GstStaticCaps2 rawcaps3 = GST_STATIC_CAPS( #if 0 /* these caps aren't used yet */ -GstStaticCaps2 rawcaps4 = GST_STATIC_CAPS( +GstStaticCaps rawcaps4 = GST_STATIC_CAPS( "video/raw, " "fourcc=(fourcc){\"YV12\", \"YUYV\"}, " "height=(int)[16,4096]" ); -GstStaticCaps2 rawcaps4 = GST_STATIC_CAPS( +GstStaticCaps rawcaps4 = GST_STATIC_CAPS( "video/raw, " "fourcc=(fourcc){\"YUYV\", \"YUY2\"}, " "height=(int)[16,4096]" ); #endif -GstStaticCaps2 rawcaps6 = GST_STATIC_CAPS( +GstStaticCaps rawcaps6 = GST_STATIC_CAPS( "video/raw, " "format=(fourcc)\"I420\"; " "video/raw, " "format=(fourcc)\"YUYV\"" ); -GstStaticCaps2 rawcaps7 = GST_STATIC_CAPS( +GstStaticCaps rawcaps7 = GST_STATIC_CAPS( "video/raw, " "format=(fourcc)\"I420\"; " "video/raw, " @@ -68,53 +68,53 @@ main (int argc, char *argv[]) gst_init (&argc, &argv); - testret = gst_caps2_is_always_compatible (gst_static_caps2_get (&mp1parsecaps), - gst_static_caps2_get (&rawcaps)); + testret = gst_caps_is_always_compatible (gst_static_caps_get (&mp1parsecaps), + gst_static_caps_get (&rawcaps)); g_print ("4 <-> 2 == %d (invalid, wrong major type)\n", testret); ret = ret + (testret == FALSE) ? 0 : 1; - testret = gst_caps2_is_always_compatible (gst_static_caps2_get (&mp1parsecaps), - gst_static_caps2_get (&sinkcaps)); + testret = gst_caps_is_always_compatible (gst_static_caps_get (&mp1parsecaps), + gst_static_caps_get (&sinkcaps)); g_print ("4 <-> 1 == %d (valid, subset)\n", testret); ret = ret + (testret == TRUE) ? 0 : 1; - testret = gst_caps2_is_always_compatible (gst_static_caps2_get (&sinkcaps), - gst_static_caps2_get (&mp1parsecaps)); + testret = gst_caps_is_always_compatible (gst_static_caps_get (&sinkcaps), + gst_static_caps_get (&mp1parsecaps)); g_print ("1 <-> 4 == %d (invalid, superset)\n", testret); ret = ret + (testret == FALSE) ? 0 : 1; - testret = gst_caps2_is_always_compatible (gst_static_caps2_get (&rawcaps), - gst_static_caps2_get (&rawcaps2)); + testret = gst_caps_is_always_compatible (gst_static_caps_get (&rawcaps), + gst_static_caps_get (&rawcaps2)); g_print ("2 <-> 3 == %d (invalid, ranges)\n", testret); ret = ret + (testret == FALSE) ? 0 : 1; - testret = gst_caps2_is_always_compatible (gst_static_caps2_get (&rawcaps), - gst_static_caps2_get (&rawcaps3)); + testret = gst_caps_is_always_compatible (gst_static_caps_get (&rawcaps), + gst_static_caps_get (&rawcaps3)); g_print ("2 <-> 5 == %d (valid)\n", testret); ret = ret + (testret == TRUE) ? 0 : 1; - testret = gst_caps2_is_always_compatible (gst_static_caps2_get (&rawcaps3), - gst_static_caps2_get (&rawcaps)); + testret = gst_caps_is_always_compatible (gst_static_caps_get (&rawcaps3), + gst_static_caps_get (&rawcaps)); g_print ("5 <-> 2 == %d (invalid)\n", testret); ret = ret + (testret == FALSE) ? 0 : 1; - testret = gst_caps2_is_always_compatible (gst_static_caps2_get (&rawcaps2), - gst_static_caps2_get (&rawcaps3)); + testret = gst_caps_is_always_compatible (gst_static_caps_get (&rawcaps2), + gst_static_caps_get (&rawcaps3)); g_print ("3 <-> 5 == %d (valid)\n", testret); ret = ret + (testret == TRUE) ? 0 : 1; - testret = gst_caps2_is_always_compatible (gst_static_caps2_get (&rawcaps2), - gst_static_caps2_get (&rawcaps)); + testret = gst_caps_is_always_compatible (gst_static_caps_get (&rawcaps2), + gst_static_caps_get (&rawcaps)); g_print ("3 <-> 2 == %d (invalid, property missing in source)\n", testret); ret = ret + (testret == FALSE) ? 0 : 1; - testret = gst_caps2_is_always_compatible (gst_static_caps2_get (&rawcaps), - gst_static_caps2_get (&rawcaps)); + testret = gst_caps_is_always_compatible (gst_static_caps_get (&rawcaps), + gst_static_caps_get (&rawcaps)); g_print ("2 <-> 2 == %d (valid, same caps)\n", testret); ret = ret + (testret == TRUE) ? 0 : 1; - testret = gst_caps2_is_always_compatible (gst_static_caps2_get (&rawcaps6), - gst_static_caps2_get (&rawcaps7)); + testret = gst_caps_is_always_compatible (gst_static_caps_get (&rawcaps6), + gst_static_caps_get (&rawcaps7)); g_print ("6 <-> 7 == %d (invalid, second caps doesn't fit)\n", testret); ret = ret + (testret == FALSE) ? 0 : 1; diff --git a/tests/old/testsuite/caps/fixed.c b/tests/old/testsuite/caps/fixed.c index d0c14ed966..7c1f3e4c82 100644 --- a/tests/old/testsuite/caps/fixed.c +++ b/tests/old/testsuite/caps/fixed.c @@ -23,7 +23,7 @@ gint main (gint argc, gchar *argv[]) { #if 0 - GstCaps2 *caps; + GstCaps *caps; gst_init (&argc, &argv); diff --git a/tests/old/testsuite/caps/intersect2.c b/tests/old/testsuite/caps/intersect2.c index 3f7f10630e..bde4e06c33 100644 --- a/tests/old/testsuite/caps/intersect2.c +++ b/tests/old/testsuite/caps/intersect2.c @@ -1,6 +1,6 @@ #include <gst/gst.h> -GstStaticCaps2 rawcaps1 = GST_STATIC_CAPS( +GstStaticCaps rawcaps1 = GST_STATIC_CAPS( "video/x-raw-yuv, " "fourcc:fourcc=\"YUYV\", " "height:int=640, " @@ -13,31 +13,31 @@ GstStaticCaps2 rawcaps1 = GST_STATIC_CAPS( "framerate:float=30.0" ); -GstStaticCaps2 rawcaps2 = GST_STATIC_CAPS( +GstStaticCaps rawcaps2 = GST_STATIC_CAPS( "video/x-raw-yuv" ); -GstStaticCaps2 rawcaps3 = GST_STATIC_CAPS( +GstStaticCaps rawcaps3 = GST_STATIC_CAPS( "video/x-raw-yuv, height=(int) [ 0, MAX ]" ); -GstStaticCaps2 rawcaps4 = GST_STATIC_CAPS( +GstStaticCaps rawcaps4 = GST_STATIC_CAPS( "video/x-raw-yuv, format=(fourcc)YUY2; video/x-raw-yuv, format=(fourcc)UYVY" ); -GstStaticCaps2 rawcaps5 = GST_STATIC_CAPS( +GstStaticCaps rawcaps5 = GST_STATIC_CAPS( "video/x-raw-yuv, format=(fourcc)YUY2, framerate=(double)[0,1.79769e+308], width=(int)[0,2147483647], height=(int)[0,2147483647]; video/x-raw-yuv, format=(fourcc)UYVY, framerate=(double)[0,1.79769e+308], width=(int)[0,2147483647], height=(int)[0,2147483647]" ); -GstStaticCaps2 rawcaps6 = GST_STATIC_CAPS( +GstStaticCaps rawcaps6 = GST_STATIC_CAPS( "video/x-raw-yuv, format=(fourcc)YUY2, width=(int)320, height=(int)240" ); -GstStaticCaps2 rawcaps7 = GST_STATIC_CAPS( +GstStaticCaps rawcaps7 = GST_STATIC_CAPS( "video/x-raw-yuv, format=(fourcc)YUY2, width=(int)[0,2147483647], height=(int)[0,2147483647], framerate=(double)[0,1.79769e+308]" ); -GstStaticCaps2 rawcaps8 = GST_STATIC_CAPS( +GstStaticCaps rawcaps8 = GST_STATIC_CAPS( "video/x-raw-yuv, format=(fourcc)YUY2, width=(int)320, height=(int)240" ); @@ -45,56 +45,56 @@ GstStaticCaps2 rawcaps8 = GST_STATIC_CAPS( int main (int argc, char *argv[]) { - GstCaps2 *caps1; - GstCaps2 *caps2; - GstCaps2 *caps3; - GstCaps2 *caps4; - GstCaps2 *caps; + GstCaps *caps1; + GstCaps *caps2; + GstCaps *caps3; + GstCaps *caps4; + GstCaps *caps; gst_init (&argc, &argv); - caps1 = gst_caps2_copy( gst_static_caps2_get (&rawcaps1)); - caps2 = gst_caps2_copy_1 (gst_static_caps2_get (&rawcaps1)); + caps1 = gst_caps_copy( gst_static_caps_get (&rawcaps1)); + caps2 = gst_caps_copy_1 (gst_static_caps_get (&rawcaps1)); #if 0 - gst_caps2_set(caps1, "height", GST_PROPS_INT(640)); - gst_caps2_set(caps1, "width", GST_PROPS_INT(480)); - gst_caps2_set(caps1, "framerate", GST_PROPS_FLOAT(30.0)); + gst_caps_set(caps1, "height", GST_PROPS_INT(640)); + gst_caps_set(caps1, "width", GST_PROPS_INT(480)); + gst_caps_set(caps1, "framerate", GST_PROPS_FLOAT(30.0)); #endif - caps = gst_caps2_intersect(caps1, caps2); - g_print("caps %s\n", gst_caps2_to_string(caps)); - if (gst_caps2_is_empty (caps)) return 1; - gst_caps2_free(caps1); - gst_caps2_free(caps2); - - caps1 = gst_caps2_copy( gst_static_caps2_get (&rawcaps2)); - caps2 = gst_caps2_copy( gst_static_caps2_get (&rawcaps3)); - caps = gst_caps2_intersect(caps1, caps2); - g_print("caps %s\n", gst_caps2_to_string(caps)); - if (gst_caps2_is_empty (caps)) return 1; - gst_caps2_free(caps1); - gst_caps2_free(caps2); - - caps1 = gst_caps2_copy( gst_static_caps2_get (&rawcaps4)); - caps2 = gst_caps2_copy( gst_static_caps2_get (&rawcaps5)); - caps3 = gst_caps2_copy( gst_static_caps2_get (&rawcaps6)); - caps4 = gst_caps2_intersect(caps1, caps2); - caps = gst_caps2_intersect(caps3, caps4); - g_print("caps4 %s\n", gst_caps2_to_string(caps4)); - g_print("caps %s\n", gst_caps2_to_string(caps)); - gst_caps2_free(caps1); - gst_caps2_free(caps2); - gst_caps2_free(caps3); - gst_caps2_free(caps4); - - caps1 = gst_caps2_copy( gst_static_caps2_get (&rawcaps7)); - caps2 = gst_caps2_copy( gst_static_caps2_get (&rawcaps8)); - caps = gst_caps2_intersect(caps1, caps2); - g_print("caps %s\n", gst_caps2_to_string(caps)); - if (gst_caps2_is_empty (caps)) return 1; - gst_caps2_free(caps1); - gst_caps2_free(caps2); + caps = gst_caps_intersect(caps1, caps2); + g_print("caps %s\n", gst_caps_to_string(caps)); + if (gst_caps_is_empty (caps)) return 1; + gst_caps_free(caps1); + gst_caps_free(caps2); + + caps1 = gst_caps_copy( gst_static_caps_get (&rawcaps2)); + caps2 = gst_caps_copy( gst_static_caps_get (&rawcaps3)); + caps = gst_caps_intersect(caps1, caps2); + g_print("caps %s\n", gst_caps_to_string(caps)); + if (gst_caps_is_empty (caps)) return 1; + gst_caps_free(caps1); + gst_caps_free(caps2); + + caps1 = gst_caps_copy( gst_static_caps_get (&rawcaps4)); + caps2 = gst_caps_copy( gst_static_caps_get (&rawcaps5)); + caps3 = gst_caps_copy( gst_static_caps_get (&rawcaps6)); + caps4 = gst_caps_intersect(caps1, caps2); + caps = gst_caps_intersect(caps3, caps4); + g_print("caps4 %s\n", gst_caps_to_string(caps4)); + g_print("caps %s\n", gst_caps_to_string(caps)); + gst_caps_free(caps1); + gst_caps_free(caps2); + gst_caps_free(caps3); + gst_caps_free(caps4); + + caps1 = gst_caps_copy( gst_static_caps_get (&rawcaps7)); + caps2 = gst_caps_copy( gst_static_caps_get (&rawcaps8)); + caps = gst_caps_intersect(caps1, caps2); + g_print("caps %s\n", gst_caps_to_string(caps)); + if (gst_caps_is_empty (caps)) return 1; + gst_caps_free(caps1); + gst_caps_free(caps2); return 0; } diff --git a/tests/old/testsuite/caps/intersection.c b/tests/old/testsuite/caps/intersection.c index 536042b8cf..e77bce19a2 100644 --- a/tests/old/testsuite/caps/intersection.c +++ b/tests/old/testsuite/caps/intersection.c @@ -1,7 +1,7 @@ #include <gst/gst.h> /* these caps all have a non empty intersection */ -GstStaticCaps2 sinkcaps = GST_STATIC_CAPS ( +GstStaticCaps sinkcaps = GST_STATIC_CAPS ( "video/mpeg, " "mpegtype=(int)1, " "foo1=(int)[20,40], " @@ -9,7 +9,7 @@ GstStaticCaps2 sinkcaps = GST_STATIC_CAPS ( "foo3=(int)[10,20]" ); -GstStaticCaps2 mp1parsecaps = GST_STATIC_CAPS ( +GstStaticCaps mp1parsecaps = GST_STATIC_CAPS ( "video/mpeg, " "mpegtype=(int)1, " "foo1=(int)30, " @@ -19,37 +19,37 @@ GstStaticCaps2 mp1parsecaps = GST_STATIC_CAPS ( -GstStaticCaps2 rawcaps = GST_STATIC_CAPS ( +GstStaticCaps rawcaps = GST_STATIC_CAPS ( "video/raw, " "width=(int)[16,4096], " "height=(int)[16,4096]" ); -GstStaticCaps2 rawcaps2 = GST_STATIC_CAPS ( +GstStaticCaps rawcaps2 = GST_STATIC_CAPS ( "video/raw, " "height=(int)[16,256], " "depth=(int)16" ); -GstStaticCaps2 rawcaps3 = GST_STATIC_CAPS ( +GstStaticCaps rawcaps3 = GST_STATIC_CAPS ( "video/raw, " "fourcc=(fourcc){\"YUY2\", \"YV12\" }, " "height=(int)[16,4096]" ); -GstStaticCaps2 rawcaps4 = GST_STATIC_CAPS ( +GstStaticCaps rawcaps4 = GST_STATIC_CAPS ( "video/raw, " "fourcc=(fourcc){\"YUY2\",\"YV12\",\"YUYV\" }, " "height=(int)[16,4096]" ); -GstStaticCaps2 rawcaps5 = GST_STATIC_CAPS ( +GstStaticCaps rawcaps5 = GST_STATIC_CAPS ( "video/raw, " "fourcc=(fourcc){\"YUYV\",\"YUY2\"}, " "height=(int)[16,4096]" ); -GstStaticCaps2 rawcaps6 = GST_STATIC_CAPS ( +GstStaticCaps rawcaps6 = GST_STATIC_CAPS ( "video/raw, " "fourcc=(fourcc)\"YUYV\", " "height=(int)640, " @@ -67,7 +67,7 @@ main (int argc, char *argv[]) { xmlDocPtr doc; xmlNodePtr parent; - GstCaps2 *caps; + GstCaps *caps; gst_init (&argc, &argv); @@ -77,36 +77,36 @@ main (int argc, char *argv[]) /* g_mem_chunk_info (); for (i = 0; i<100000; i++) { - caps = gst_caps2_intersect (gst_static_caps2_get (rawcaps3), GST_CAPS_GET (rawcaps4)); - gst_caps2_unref (caps); + caps = gst_caps_intersect (gst_static_caps_get (rawcaps3), GST_CAPS_GET (rawcaps4)); + gst_caps_unref (caps); } g_mem_chunk_info (); */ - caps = gst_caps2_intersect (gst_static_caps2_get (&sinkcaps), - gst_static_caps2_get (&mp1parsecaps)); + caps = gst_caps_intersect (gst_static_caps_get (&sinkcaps), + gst_static_caps_get (&mp1parsecaps)); parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities1", NULL); - gst_caps2_save_thyself (caps, parent); + gst_caps_save_thyself (caps, parent); - caps = gst_caps2_intersect (gst_static_caps2_get (&rawcaps), - gst_static_caps2_get (&rawcaps2)); + caps = gst_caps_intersect (gst_static_caps_get (&rawcaps), + gst_static_caps_get (&rawcaps2)); parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities2", NULL); - gst_caps2_save_thyself (caps, parent); + gst_caps_save_thyself (caps, parent); - caps = gst_caps2_intersect (gst_static_caps2_get (&rawcaps3), - gst_static_caps2_get (&rawcaps4)); + caps = gst_caps_intersect (gst_static_caps_get (&rawcaps3), + gst_static_caps_get (&rawcaps4)); parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities3", NULL); - gst_caps2_save_thyself (caps, parent); + gst_caps_save_thyself (caps, parent); - caps = gst_caps2_intersect (gst_static_caps2_get (&rawcaps3), - gst_static_caps2_get (&rawcaps5)); + caps = gst_caps_intersect (gst_static_caps_get (&rawcaps3), + gst_static_caps_get (&rawcaps5)); parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities4", NULL); - gst_caps2_save_thyself (caps, parent); + gst_caps_save_thyself (caps, parent); - caps = gst_caps2_intersect (gst_static_caps2_get (&rawcaps6), - gst_caps2_copy_1(gst_static_caps2_get (&rawcaps6))); + caps = gst_caps_intersect (gst_static_caps_get (&rawcaps6), + gst_caps_copy_1(gst_static_caps_get (&rawcaps6))); parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities5", NULL); - gst_caps2_save_thyself (caps, parent); + gst_caps_save_thyself (caps, parent); xmlDocDump(stdout, doc); diff --git a/tests/old/testsuite/caps/normalisation.c b/tests/old/testsuite/caps/normalisation.c index 3aab16964f..432a481f7e 100644 --- a/tests/old/testsuite/caps/normalisation.c +++ b/tests/old/testsuite/caps/normalisation.c @@ -1,7 +1,7 @@ #include <gst/gst.h> /* these caps all have a non empty intersection */ -GstStaticCaps2 sinkcaps = GST_STATIC_CAPS ( +GstStaticCaps sinkcaps = GST_STATIC_CAPS ( "video/mpeg, " "fourcc=(fourcc){\"YV12\",\"YUY2\"}, " "foo1=(int)[20,40], " @@ -9,20 +9,20 @@ GstStaticCaps2 sinkcaps = GST_STATIC_CAPS ( "foo3=(int)[10,20]" ); -GstStaticCaps2 mp1parsecaps = GST_STATIC_CAPS ( +GstStaticCaps mp1parsecaps = GST_STATIC_CAPS ( "video/mpeg, " "fourcc=(fourcc){\"YV12\",\"YUY2\"}, " "foo4=(fourcc){\"YV12\",\"YUY2\"}" ); -GstStaticCaps2 rawcaps = GST_STATIC_CAPS ( +GstStaticCaps rawcaps = GST_STATIC_CAPS ( "video/raw, " "width=(int)[16,4096], " "height=(int)[16,4096], " "fourcc=(fourcc){\"YV12\",\"YUY2\"}" ); -GstStaticCaps2 rawcaps2 = GST_STATIC_CAPS ( +GstStaticCaps rawcaps2 = GST_STATIC_CAPS ( "video/raw, " "width=(int)[16,256], " "height=(int)16; " @@ -31,7 +31,7 @@ GstStaticCaps2 rawcaps2 = GST_STATIC_CAPS ( "height=(int)16" ); -GstStaticCaps2 rawcaps3 = GST_STATIC_CAPS ( +GstStaticCaps rawcaps3 = GST_STATIC_CAPS ( "video/raw, " "width=(int)[16,256], " "height=(int)16; " @@ -75,32 +75,32 @@ main (int argc, char *argv[]) { xmlDocPtr doc; xmlNodePtr parent; - GstCaps2 *caps; + GstCaps *caps; gst_init (&argc, &argv); doc = xmlNewDoc ("1.0"); doc->xmlRootNode = xmlNewDocNode (doc, NULL, "Capabilities", NULL); - caps = gst_caps2_normalize (gst_static_caps2_get (&sinkcaps)); + caps = gst_caps_normalize (gst_static_caps_get (&sinkcaps)); parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities1", NULL); - gst_caps2_save_thyself (caps, parent); + gst_caps_save_thyself (caps, parent); - caps = gst_caps2_normalize (gst_static_caps2_get (&mp1parsecaps)); + caps = gst_caps_normalize (gst_static_caps_get (&mp1parsecaps)); parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities1", NULL); - gst_caps2_save_thyself (caps, parent); + gst_caps_save_thyself (caps, parent); - caps = gst_caps2_normalize (gst_static_caps2_get (&rawcaps)); + caps = gst_caps_normalize (gst_static_caps_get (&rawcaps)); parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities1", NULL); - gst_caps2_save_thyself (caps, parent); + gst_caps_save_thyself (caps, parent); - caps = gst_caps2_normalize (gst_static_caps2_get (&rawcaps2)); + caps = gst_caps_normalize (gst_static_caps_get (&rawcaps2)); parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities1", NULL); - gst_caps2_save_thyself (caps, parent); + gst_caps_save_thyself (caps, parent); - caps = gst_caps2_normalize (gst_static_caps2_get (&rawcaps3)); + caps = gst_caps_normalize (gst_static_caps_get (&rawcaps3)); parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities1", NULL); - gst_caps2_save_thyself (caps, parent); + gst_caps_save_thyself (caps, parent); xmlDocDump(stdout, doc); diff --git a/tests/old/testsuite/caps/string-conversions.c b/tests/old/testsuite/caps/string-conversions.c index acb8b3a8e9..d94ee385d9 100644 --- a/tests/old/testsuite/caps/string-conversions.c +++ b/tests/old/testsuite/caps/string-conversions.c @@ -1,55 +1,55 @@ #include <gst/gst.h> #include <string.h> -GstStaticCaps2 caps1 = GST_STATIC_CAPS ( +GstStaticCaps caps1 = GST_STATIC_CAPS ( "video/mpeg, " "mpegtype=(int){1,2}" ); -GstStaticCaps2 caps2 = GST_STATIC_CAPS ( +GstStaticCaps caps2 = GST_STATIC_CAPS ( "video/mpeg, " "mpegtype=(int){1}" ); -GstStaticCaps2 caps3 = GST_STATIC_CAPS ( +GstStaticCaps caps3 = GST_STATIC_CAPS ( "video/raw, " "fourcc=(fourcc){\"YV12\",\"YUY2\"}, " "width=(int)[16,4096], " "height=(int)[16,4096]" ); -GstStaticCaps2 caps4 = GST_STATIC_CAPS ( +GstStaticCaps caps4 = GST_STATIC_CAPS ( "video/raw, " "fourcc=(fourcc)\"YV12\", " "height=(int)[16,256]" ); -GstStaticCaps2 caps5 = GST_STATIC_CAPS ( +GstStaticCaps caps5 = GST_STATIC_CAPS ( "video/raw, " "fourcc=(fourcc){\"YV12\",\"YUY2\"}, " "height=(int)[16,4096]" ); -GstStaticCaps2 caps6 = GST_STATIC_CAPS ( +GstStaticCaps caps6 = GST_STATIC_CAPS ( "video/raw, " "fourcc=(fourcc){\"YV12\",\"YUYV\"}, " "height=(int)[16,4096]" ); -GstStaticCaps2 caps7 = GST_STATIC_CAPS ( +GstStaticCaps caps7 = GST_STATIC_CAPS ( "video/raw, " "fourcc=(fourcc){\"YVYV\",\"YUY2\"}, " "height=(int)[16,4096]" ); -GstStaticCaps2 caps8 = GST_STATIC_CAPS ( +GstStaticCaps caps8 = GST_STATIC_CAPS ( "video/raw, " "format=(fourcc)\"I420\"; " "video/raw, " "format=(fourcc)\"YUYV\"" ); -GstStaticCaps2 caps9 = GST_STATIC_CAPS ( +GstStaticCaps caps9 = GST_STATIC_CAPS ( "video/raw, " "format=(fourcc)\"I420\"; " "video/raw, " @@ -70,19 +70,19 @@ static gint failures = 0; } \ }G_STMT_END static void -test_caps_func (const GstCaps2 *caps) +test_caps_func (const GstCaps *caps) { gchar *str1, *str2; gboolean ret = FALSE; - str1 = gst_caps2_to_string (caps); - caps = gst_caps2_from_string (str1); + str1 = gst_caps_to_string (caps); + caps = gst_caps_from_string (str1); if (!caps) { g_print ("%3d, INFO : no caps from %s\n", test, str1); TEST_END (ret); return; } - str2 = gst_caps2_to_string (caps); + str2 = gst_caps_to_string (caps); g_print ("%3d, INFO : %s <==> %s\n", test, str1, str2); ret = strcmp (str1, str2) == 0; g_free (str1); @@ -90,7 +90,7 @@ test_caps_func (const GstCaps2 *caps) TEST_END (ret); } static void -test_caps (const GstCaps2 *caps) +test_caps (const GstCaps *caps) { TEST_START; test_caps_func (caps); @@ -98,11 +98,11 @@ test_caps (const GstCaps2 *caps) static void test_string (gchar *str) { - GstCaps2 *caps; + GstCaps *caps; TEST_START; g_print ("%3d, INFO : checking %s\n", test, str); - caps = gst_caps2_from_string (str); + caps = gst_caps_from_string (str); if (!caps) { g_print ("%3d, INFO : no caps from %s\n", test, str); TEST_FAIL; @@ -113,11 +113,11 @@ test_string (gchar *str) static void test_string_fail (gchar *str) { - GstCaps2 *caps; + GstCaps *caps; TEST_START; g_print ("%3d, INFO : checking %s for failure\n", test, str); - caps = gst_caps2_from_string (str); + caps = gst_caps_from_string (str); g_print("got %p\n", caps); TEST_END (caps == NULL); } @@ -128,18 +128,18 @@ main (int argc, char *argv[]) goto bla; bla: /* stupidity tests */ - test_caps (gst_caps2_new_simple ("audio/raw", NULL)); + test_caps (gst_caps_new_simple ("audio/raw", NULL)); /* all sorts of caps */ - test_caps (gst_static_caps2_get (&caps1)); - test_caps (gst_static_caps2_get (&caps2)); - test_caps (gst_static_caps2_get (&caps3)); - test_caps (gst_static_caps2_get (&caps4)); - test_caps (gst_static_caps2_get (&caps5)); - test_caps (gst_static_caps2_get (&caps6)); - test_caps (gst_static_caps2_get (&caps7)); - test_caps (gst_static_caps2_get (&caps8)); - test_caps (gst_static_caps2_get (&caps9)); + test_caps (gst_static_caps_get (&caps1)); + test_caps (gst_static_caps_get (&caps2)); + test_caps (gst_static_caps_get (&caps3)); + test_caps (gst_static_caps_get (&caps4)); + test_caps (gst_static_caps_get (&caps5)); + test_caps (gst_static_caps_get (&caps6)); + test_caps (gst_static_caps_get (&caps7)); + test_caps (gst_static_caps_get (&caps8)); + test_caps (gst_static_caps_get (&caps9)); /* mime types */ test_string ("audio/raw"); diff --git a/tests/old/testsuite/caps/union.c b/tests/old/testsuite/caps/union.c index a3ed4485a6..557cda4d08 100644 --- a/tests/old/testsuite/caps/union.c +++ b/tests/old/testsuite/caps/union.c @@ -1,7 +1,7 @@ #include <gst/gst.h> /* these caps all have a non empty intersection */ -GstStaticCaps2 sinkcaps = GST_STATIC_CAPS ( +GstStaticCaps sinkcaps = GST_STATIC_CAPS ( "video/mpeg, " "mpegtype:int=1, " "foo1:int=[20,40], " @@ -9,7 +9,7 @@ GstStaticCaps2 sinkcaps = GST_STATIC_CAPS ( "foo3:int=[10,20]" ); -GstStaticCaps2 mp1parsecaps = GST_STATIC_CAPS ( +GstStaticCaps mp1parsecaps = GST_STATIC_CAPS ( "video/mpeg, " "mpegtype:int=1, " "foo1:int=30, " @@ -22,17 +22,17 @@ main (int argc, char *argv[]) { xmlDocPtr doc; xmlNodePtr parent; - GstCaps2 *caps; + GstCaps *caps; gst_init (&argc, &argv); doc = xmlNewDoc ("1.0"); doc->xmlRootNode = xmlNewDocNode (doc, NULL, "Capabilities", NULL); - caps = gst_caps2_union (gst_static_caps2_get (&sinkcaps), - gst_static_caps2_get (&mp1parsecaps)); + caps = gst_caps_union (gst_static_caps_get (&sinkcaps), + gst_static_caps_get (&mp1parsecaps)); parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities1", NULL); - gst_caps2_save_thyself (caps, parent); + gst_caps_save_thyself (caps, parent); xmlDocDump(stdout, doc); diff --git a/tests/old/testsuite/caps2/caps.c b/tests/old/testsuite/caps2/caps.c index 333e95d02d..d2f159c5cf 100644 --- a/tests/old/testsuite/caps2/caps.c +++ b/tests/old/testsuite/caps2/caps.c @@ -4,126 +4,126 @@ void test1(void) { - GstCaps2 *caps; - GstCaps2 *caps2; + GstCaps *caps; + GstCaps *caps2; - g_print("type is %d\n", (int)gst_caps2_get_type()); + g_print("type is %d\n", (int)gst_caps_get_type()); - caps = gst_caps2_new_empty(); + caps = gst_caps_new_empty(); g_assert(caps != NULL); - gst_caps2_free(caps); + gst_caps_free(caps); - caps = gst_caps2_new_any(); + caps = gst_caps_new_any(); g_assert(caps != NULL); - gst_caps2_free(caps); + gst_caps_free(caps); - caps = gst_caps2_new_simple("audio/raw", + caps = gst_caps_new_simple("audio/raw", "_int", G_TYPE_INT, 100, NULL); g_assert(caps != NULL); - g_assert(gst_caps2_is_empty(caps)==FALSE); - g_assert(gst_caps2_is_any(caps)==FALSE); - g_assert(gst_caps2_is_chained(caps)==FALSE); - g_assert(gst_caps2_is_fixed(caps)==TRUE); - g_print("%s\n", gst_caps2_to_string(caps)); - gst_caps2_free(caps); - - caps = gst_caps2_new_simple("audio/raw", + 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_fixed(caps)==TRUE); + g_print("%s\n", gst_caps_to_string(caps)); + gst_caps_free(caps); + + caps = gst_caps_new_simple("audio/raw", "_double", G_TYPE_DOUBLE, 100.0, NULL); g_assert(caps != NULL); - g_assert(gst_caps2_is_empty(caps)==FALSE); - g_assert(gst_caps2_is_any(caps)==FALSE); - g_assert(gst_caps2_is_chained(caps)==FALSE); - g_assert(gst_caps2_is_fixed(caps)==TRUE); - g_print("%s\n", gst_caps2_to_string(caps)); - gst_caps2_free(caps); - - caps = gst_caps2_new_simple("audio/raw", + 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_fixed(caps)==TRUE); + g_print("%s\n", gst_caps_to_string(caps)); + gst_caps_free(caps); + + caps = gst_caps_new_simple("audio/raw", "_fourcc", GST_TYPE_FOURCC, GST_MAKE_FOURCC('a','b','c','d'), NULL); g_assert(caps != NULL); - g_assert(gst_caps2_is_empty(caps)==FALSE); - g_assert(gst_caps2_is_any(caps)==FALSE); - g_assert(gst_caps2_is_chained(caps)==FALSE); - g_assert(gst_caps2_is_fixed(caps)==TRUE); - g_print("%s\n", gst_caps2_to_string(caps)); - gst_caps2_free(caps); - - caps = gst_caps2_new_simple("audio/raw", + 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_fixed(caps)==TRUE); + g_print("%s\n", gst_caps_to_string(caps)); + gst_caps_free(caps); + + caps = gst_caps_new_simple("audio/raw", "_boolean", G_TYPE_BOOLEAN, TRUE, NULL); g_assert(caps != NULL); - g_assert(gst_caps2_is_empty(caps)==FALSE); - g_assert(gst_caps2_is_any(caps)==FALSE); - g_assert(gst_caps2_is_chained(caps)==FALSE); - g_assert(gst_caps2_is_fixed(caps)==TRUE); - g_print("%s\n", gst_caps2_to_string(caps)); - gst_caps2_free(caps); - - caps = gst_caps2_new_full( + 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_fixed(caps)==TRUE); + g_print("%s\n", gst_caps_to_string(caps)); + gst_caps_free(caps); + + caps = gst_caps_new_full( gst_structure_new("audio/raw", "_int", G_TYPE_INT, 100, NULL), gst_structure_new("audio/raw2", "_int", G_TYPE_INT, 100, NULL), NULL); g_assert(caps != NULL); - g_assert(gst_caps2_is_empty(caps)==FALSE); - g_assert(gst_caps2_is_any(caps)==FALSE); - g_assert(gst_caps2_is_chained(caps)==TRUE); - g_assert(gst_caps2_is_fixed(caps)==FALSE); - g_print("%s\n", gst_caps2_to_string(caps)); - gst_caps2_free(caps); - - caps = gst_caps2_new_simple("audio/raw", "_int", G_TYPE_INT, 100, 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_fixed(caps)==FALSE); + g_print("%s\n", gst_caps_to_string(caps)); + gst_caps_free(caps); + + caps = gst_caps_new_simple("audio/raw", "_int", G_TYPE_INT, 100, NULL); g_assert(caps != NULL); - caps2 = gst_caps2_copy(caps); + caps2 = gst_caps_copy(caps); g_assert(caps2 != NULL); - g_assert(gst_caps2_is_empty(caps2)==FALSE); - g_assert(gst_caps2_is_any(caps2)==FALSE); - g_assert(gst_caps2_is_chained(caps2)==FALSE); - g_assert(gst_caps2_is_fixed(caps2)==TRUE); - g_print("%s\n", gst_caps2_to_string(caps)); - g_print("%s\n", gst_caps2_to_string(caps2)); - gst_caps2_free(caps); - gst_caps2_free(caps2); - - caps = gst_caps2_new_simple("audio/raw", "_int", G_TYPE_INT, 100, NULL); - gst_caps2_append (caps, - gst_caps2_new_simple("audio/raw", "_int", G_TYPE_INT, 200, 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_fixed(caps2)==TRUE); + g_print("%s\n", gst_caps_to_string(caps)); + g_print("%s\n", gst_caps_to_string(caps2)); + gst_caps_free(caps); + gst_caps_free(caps2); + + caps = gst_caps_new_simple("audio/raw", "_int", G_TYPE_INT, 100, NULL); + gst_caps_append (caps, + gst_caps_new_simple("audio/raw", "_int", G_TYPE_INT, 200, NULL)); g_assert(caps != NULL); - g_assert(gst_caps2_is_empty(caps)==FALSE); - g_assert(gst_caps2_is_any(caps)==FALSE); - g_assert(gst_caps2_is_chained(caps)==TRUE); - g_assert(gst_caps2_is_fixed(caps)==FALSE); - g_print("%s\n", gst_caps2_to_string(caps)); - gst_caps2_free(caps); - - caps = gst_caps2_new_simple("audio/raw", "_int", G_TYPE_INT, 100, 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_fixed(caps)==FALSE); + g_print("%s\n", gst_caps_to_string(caps)); + gst_caps_free(caps); + + caps = gst_caps_new_simple("audio/raw", "_int", G_TYPE_INT, 100, NULL); g_assert(caps != NULL); - gst_caps2_append_cap (caps, + gst_caps_append_structure (caps, gst_structure_new("audio/raw", "_int", G_TYPE_INT, 200, NULL)); - g_assert(gst_caps2_is_empty(caps)==FALSE); - g_assert(gst_caps2_is_any(caps)==FALSE); - g_assert(gst_caps2_is_chained(caps)==TRUE); - g_assert(gst_caps2_is_fixed(caps)==FALSE); - g_print("%s\n", gst_caps2_to_string(caps)); - gst_caps2_free(caps); + 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_fixed(caps)==FALSE); + g_print("%s\n", gst_caps_to_string(caps)); + gst_caps_free(caps); } void test2(void) { - GstCaps2 *caps1; - GstCaps2 *caps2; - GstCaps2 *caps; + GstCaps *caps1; + GstCaps *caps2; + GstCaps *caps; - caps1 = gst_caps2_new_full( + caps1 = gst_caps_new_full( gst_structure_new("audio/raw", "_int", G_TYPE_INT, 100, NULL), gst_structure_new("audio/raw", "_int", G_TYPE_INT, 200, NULL), NULL); - caps2 = gst_caps2_new_full( + caps2 = gst_caps_new_full( gst_structure_new("audio/raw", "_int", G_TYPE_INT, 100, NULL), gst_structure_new("audio/raw", "_int", G_TYPE_INT, 300, NULL), NULL); - caps = gst_caps2_intersect(caps1, caps2); - g_print("%s\n", gst_caps2_to_string(caps)); - gst_caps2_free(caps); - gst_caps2_free(caps1); - gst_caps2_free(caps2); + caps = gst_caps_intersect(caps1, caps2); + g_print("%s\n", gst_caps_to_string(caps)); + gst_caps_free(caps); + gst_caps_free(caps1); + gst_caps_free(caps2); } diff --git a/tests/old/testsuite/elements/tee.c b/tests/old/testsuite/elements/tee.c index 3faf35401b..2c803931ea 100644 --- a/tests/old/testsuite/elements/tee.c +++ b/tests/old/testsuite/elements/tee.c @@ -42,8 +42,8 @@ main (int argc, char *argv[]) GstElement *pipeline = NULL; GstElement *tee, *src, *sink1, *sink2; GstPad *tee_src1, *tee_src2; - GstCaps2 *src_caps = NULL; - GstCaps2 *sink_caps = NULL; + GstCaps *src_caps = NULL; + GstCaps *sink_caps = NULL; GstStructure *structure = NULL; GstPad *pad = NULL; @@ -99,7 +99,7 @@ main (int argc, char *argv[]) /* now we try setting caps on the src pad */ /* FIXME: should we set to pause here ? */ - src_caps = gst_caps2_from_string ("audio/raw, format=(s)\"int\", " + src_caps = gst_caps_from_string ("audio/raw, format=(s)\"int\", " "rate=(i)44100"); g_assert (src_caps != NULL); @@ -112,8 +112,8 @@ main (int argc, char *argv[]) /* now iterate and see if it proxies caps ok */ gst_bin_iterate (GST_BIN (pipeline)); sink_caps = gst_pad_get_caps (gst_element_get_pad (sink1, "sink")); - if (sink_caps && gst_caps2_is_fixed (sink_caps)) { - structure = gst_caps2_get_nth_cap (sink_caps, 0); + if (sink_caps && gst_caps_is_fixed (sink_caps)) { + structure = gst_caps_get_structure (sink_caps, 0); }else { structure = NULL; g_print ("sink_caps is not fixed\n"); @@ -127,7 +127,7 @@ main (int argc, char *argv[]) g_print ("Rate of pad on sink1 : %d\n", rate); } sink_caps = gst_pad_get_caps (gst_element_get_pad (sink2, "sink")); - structure = gst_caps2_get_nth_cap (sink_caps, 0); + structure = gst_caps_get_structure (sink_caps, 0); if (structure != NULL && ! (gst_structure_has_field (structure, "rate"))) { g_print ("Hm, rate has not been propagated to sink2.\n"); return 1; |