mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-09-09 05:38:58 +00:00
Original commit message from CVS: * gst/gstpad.c: (gst_pad_get_direction), (_gst_pad_default_fixate_foreach), (gst_pad_collectv), (gst_pad_collect_valist): * testsuite/bins/interface.c: (main): * testsuite/caps/audioscale.c: (test_caps): * testsuite/caps/caps.c: (test1), (test2), (test3): * testsuite/caps/deserialize.c: (main): * testsuite/caps/enumcaps.c: (main): * testsuite/caps/filtercaps.c: (main): * testsuite/caps/intersect2.c: (main): * testsuite/caps/random.c: (main): * testsuite/caps/renegotiate.c: (my_fixate), (main): * testsuite/caps/sets.c: (check_caps): * testsuite/caps/simplify.c: (check_caps), (main): * testsuite/caps/subtract.c: (check_caps): Fix _pad_get_direction wrt ghostpads. Fix caps testsuite.
49 lines
1.7 KiB
C
49 lines
1.7 KiB
C
/*
|
|
* 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;
|
|
GstElement *pipeline;
|
|
|
|
gst_init (&argc, &argv);
|
|
|
|
pipeline = gst_pipeline_new ("pipeline");
|
|
g_assert (pipeline);
|
|
identity = gst_element_factory_make ("identity", NULL);
|
|
g_assert (identity);
|
|
sink = gst_element_factory_make ("fakesink", NULL);
|
|
g_assert (sink);
|
|
gst_bin_add_many (GST_BIN (pipeline), identity, sink, NULL);
|
|
gst_element_link_filtered (identity, sink,
|
|
gst_caps_new_simple ("audio/x-raw-int", NULL));
|
|
caps = gst_pad_get_caps (gst_element_get_pad (identity, "sink"));
|
|
g_print ("caps: %s\n", gst_caps_to_string (caps));
|
|
g_assert (!gst_caps_is_any (caps));
|
|
|
|
caps = gst_pad_get_allowed_caps (gst_element_get_pad (identity, "sink"));
|
|
g_print ("allowed caps: %s\n", gst_caps_to_string (caps));
|
|
/* get_allowed_caps doesn't mean anything if you aren't connected */
|
|
g_assert (!caps);
|
|
|
|
return 0;
|
|
}
|