mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 02:30:35 +00:00
testsuite/caps/: add test (that doesn't work right now, but should)
Original commit message from CVS: * testsuite/caps/Makefile.am: * testsuite/caps/filtercaps.c: (main): add test (that doesn't work right now, but should)
This commit is contained in:
parent
d10158fcb5
commit
781e79e043
5 changed files with 94 additions and 2 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-04-20 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||
|
||||
* testsuite/caps/Makefile.am:
|
||||
* testsuite/caps/filtercaps.c: (main):
|
||||
add test (that doesn't work right now, but should)
|
||||
|
||||
2004-04-19 David Schleef <ds@schleef.org>
|
||||
|
||||
* configure.ac: Add test for allowing unaligned access. Add define
|
||||
|
|
|
@ -14,7 +14,8 @@ tests_pass = \
|
|||
value_compare \
|
||||
value_intersect \
|
||||
value_serialize \
|
||||
audioscale
|
||||
audioscale \
|
||||
filtercaps
|
||||
|
||||
tests_fail =
|
||||
tests_ignore =
|
||||
|
@ -35,6 +36,8 @@ fixed_LDADD = $(GST_LIBS)
|
|||
fixed_CFLAGS = $(GST_CFLAGS) $(XML_CFLAGS)
|
||||
intersect2_LDADD = $(GST_LIBS)
|
||||
intersect2_CFLAGS = $(GST_CFLAGS) $(XML_CFLAGS)
|
||||
filtercaps_LDADD = $(GST_LIBS)
|
||||
filtercaps_CFLAGS = $(GST_CFLAGS) $(XML_CFLAGS)
|
||||
|
||||
|
||||
|
||||
|
|
40
tests/old/testsuite/caps/filtercaps.c
Normal file
40
tests/old/testsuite/caps/filtercaps.c
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (C) 2004 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU 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
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
gint
|
||||
main (gint argc, gchar ** argv)
|
||||
{
|
||||
GstCaps *caps;
|
||||
GstElement *sink, *identity;
|
||||
|
||||
gst_init (&argc, &argv);
|
||||
|
||||
identity = gst_element_factory_make ("identity", NULL);
|
||||
g_assert (identity);
|
||||
sink = gst_element_factory_make ("fakesink", NULL);
|
||||
g_assert (sink);
|
||||
gst_element_link_filtered (identity, sink,
|
||||
gst_caps_new_simple ("audio/x-raw-int", NULL));
|
||||
caps = gst_pad_get_allowed_caps (gst_element_get_pad (identity, "sink"));
|
||||
g_print ("caps: %s", gst_caps_to_string (caps));
|
||||
g_assert (!gst_caps_is_any (caps));
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -14,7 +14,8 @@ tests_pass = \
|
|||
value_compare \
|
||||
value_intersect \
|
||||
value_serialize \
|
||||
audioscale
|
||||
audioscale \
|
||||
filtercaps
|
||||
|
||||
tests_fail =
|
||||
tests_ignore =
|
||||
|
@ -35,6 +36,8 @@ fixed_LDADD = $(GST_LIBS)
|
|||
fixed_CFLAGS = $(GST_CFLAGS) $(XML_CFLAGS)
|
||||
intersect2_LDADD = $(GST_LIBS)
|
||||
intersect2_CFLAGS = $(GST_CFLAGS) $(XML_CFLAGS)
|
||||
filtercaps_LDADD = $(GST_LIBS)
|
||||
filtercaps_CFLAGS = $(GST_CFLAGS) $(XML_CFLAGS)
|
||||
|
||||
|
||||
|
||||
|
|
40
testsuite/caps/filtercaps.c
Normal file
40
testsuite/caps/filtercaps.c
Normal file
|
@ -0,0 +1,40 @@
|
|||
/*
|
||||
* Copyright (C) 2004 Benjamin Otte <in7y118@public.uni-hamburg.de>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU 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
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public
|
||||
* License along with this library; if not, write to the Free
|
||||
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
|
||||
#include <gst/gst.h>
|
||||
|
||||
gint
|
||||
main (gint argc, gchar ** argv)
|
||||
{
|
||||
GstCaps *caps;
|
||||
GstElement *sink, *identity;
|
||||
|
||||
gst_init (&argc, &argv);
|
||||
|
||||
identity = gst_element_factory_make ("identity", NULL);
|
||||
g_assert (identity);
|
||||
sink = gst_element_factory_make ("fakesink", NULL);
|
||||
g_assert (sink);
|
||||
gst_element_link_filtered (identity, sink,
|
||||
gst_caps_new_simple ("audio/x-raw-int", NULL));
|
||||
caps = gst_pad_get_allowed_caps (gst_element_get_pad (identity, "sink"));
|
||||
g_print ("caps: %s", gst_caps_to_string (caps));
|
||||
g_assert (!gst_caps_is_any (caps));
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in a new issue