Revision 21005,
1.1 KB
checked in by ghudson, 20 years ago
(diff) |
This commit was generated by cvs2svn to compensate for changes in r21004,
which included commits to RCS files with non-trunk default branches.
|
Line | |
---|
1 | #include <gst/gst.h> |
---|
2 | |
---|
3 | /* this test checks that gst_pad_link takes into account all available |
---|
4 | * information when trying to link two pads. |
---|
5 | * Because identity proxies caps, the caps in the first and second link |
---|
6 | * must be compatible for this pipeline to work. |
---|
7 | * Since they are not, the second linkig attempt should fail. |
---|
8 | */ |
---|
9 | |
---|
10 | gint |
---|
11 | main (int argc, gchar ** argv) |
---|
12 | { |
---|
13 | GstElement *src, *identity, *sink; |
---|
14 | GstCaps *one, *two; |
---|
15 | |
---|
16 | gst_init (&argc, &argv); |
---|
17 | |
---|
18 | /* create incompatible caps */ |
---|
19 | src = gst_element_factory_make ("fakesrc", NULL); |
---|
20 | g_assert (src); |
---|
21 | identity = gst_element_factory_make ("identity", NULL); |
---|
22 | g_assert (identity); |
---|
23 | sink = gst_element_factory_make ("fakesink", NULL); |
---|
24 | g_assert (sink); |
---|
25 | |
---|
26 | one = gst_caps_from_string ("some/mime"); |
---|
27 | two = gst_caps_from_string ("other/mime"); |
---|
28 | |
---|
29 | g_assert (GST_PAD_LINK_SUCCESSFUL (gst_pad_link_filtered (gst_element_get_pad |
---|
30 | (src, "src"), gst_element_get_pad (identity, "sink"), one))); |
---|
31 | g_assert (!GST_PAD_LINK_SUCCESSFUL (gst_pad_link_filtered (gst_element_get_pad |
---|
32 | (identity, "src"), gst_element_get_pad (sink, "sink"), two))); |
---|
33 | |
---|
34 | return 0; |
---|
35 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.