From: David Schleef Date: Fri, 18 Apr 2003 23:37:05 +0000 (+0000) Subject: Add caps list test that shows incorrect behavior X-Git-Tag: BRANCH-ERROR-ROOT~283 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d48f56c8facd8633cccb843b2d5512019f4cce4;p=platform%2Fupstream%2Fgstreamer.git Add caps list test that shows incorrect behavior Original commit message from CVS: Add caps list test that shows incorrect behavior --- diff --git a/tests/old/testsuite/caps/compatibility.c b/tests/old/testsuite/caps/compatibility.c index 932741f..d6eefdd 100644 --- a/tests/old/testsuite/caps/compatibility.c +++ b/tests/old/testsuite/caps/compatibility.c @@ -86,6 +86,33 @@ GST_CAPS_FACTORY (rawcaps5, ); */ +GST_CAPS_FACTORY(rawcaps6, + GST_CAPS_NEW ( + "videotestsrc_src", + "video/raw", + "format", GST_PROPS_FOURCC(GST_MAKE_FOURCC('I','4','2','0')) + ), + GST_CAPS_NEW ( + "videotestsrc_src", + "video/raw", + "format", GST_PROPS_FOURCC(GST_MAKE_FOURCC('Y','U','Y','V')) + ) +) + +GST_CAPS_FACTORY(rawcaps7, + GST_CAPS_NEW ( + "xvideosink_sink", + "video/raw", + "format", GST_PROPS_FOURCC(GST_MAKE_FOURCC('I','4','2','0')) + ), + GST_CAPS_NEW ( + "xvideosink_sink", + "video/raw", + "format", GST_PROPS_FOURCC(GST_MAKE_FOURCC('Y','V','1','2')) + ) +) + + int main (int argc, char *argv[]) { @@ -120,5 +147,8 @@ main (int argc, char *argv[]) testret = gst_caps_is_always_compatible (GST_CAPS_GET (rawcaps), GST_CAPS_GET (rawcaps)); g_print ("2 <-> 2 == %d (valid, same caps)\n", testret); + testret = gst_caps_is_always_compatible (GST_CAPS_GET (rawcaps6), GST_CAPS_GET (rawcaps7)); + g_print ("6 <-> 7 == %d (invalid, second caps doesn't fit)\n", testret); + return 0; } diff --git a/testsuite/caps/compatibility.c b/testsuite/caps/compatibility.c index 932741f..d6eefdd 100644 --- a/testsuite/caps/compatibility.c +++ b/testsuite/caps/compatibility.c @@ -86,6 +86,33 @@ GST_CAPS_FACTORY (rawcaps5, ); */ +GST_CAPS_FACTORY(rawcaps6, + GST_CAPS_NEW ( + "videotestsrc_src", + "video/raw", + "format", GST_PROPS_FOURCC(GST_MAKE_FOURCC('I','4','2','0')) + ), + GST_CAPS_NEW ( + "videotestsrc_src", + "video/raw", + "format", GST_PROPS_FOURCC(GST_MAKE_FOURCC('Y','U','Y','V')) + ) +) + +GST_CAPS_FACTORY(rawcaps7, + GST_CAPS_NEW ( + "xvideosink_sink", + "video/raw", + "format", GST_PROPS_FOURCC(GST_MAKE_FOURCC('I','4','2','0')) + ), + GST_CAPS_NEW ( + "xvideosink_sink", + "video/raw", + "format", GST_PROPS_FOURCC(GST_MAKE_FOURCC('Y','V','1','2')) + ) +) + + int main (int argc, char *argv[]) { @@ -120,5 +147,8 @@ main (int argc, char *argv[]) testret = gst_caps_is_always_compatible (GST_CAPS_GET (rawcaps), GST_CAPS_GET (rawcaps)); g_print ("2 <-> 2 == %d (valid, same caps)\n", testret); + testret = gst_caps_is_always_compatible (GST_CAPS_GET (rawcaps6), GST_CAPS_GET (rawcaps7)); + g_print ("6 <-> 7 == %d (invalid, second caps doesn't fit)\n", testret); + return 0; }