mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 01:30:38 +00:00
tests: fix compilation
This commit is contained in:
parent
967bacb742
commit
021f09d622
9 changed files with 35 additions and 35 deletions
|
@ -36,7 +36,7 @@ struct TestData
|
|||
static void
|
||||
setup_test_objects (struct TestData *td, GstPadChainFunction chain_func)
|
||||
{
|
||||
td->mycaps = gst_caps_new_simple ("test/test", NULL);
|
||||
td->mycaps = gst_caps_new_empty_simple ("test/test");
|
||||
|
||||
td->funnel = gst_element_factory_make ("funnel", NULL);
|
||||
|
||||
|
|
|
@ -402,7 +402,7 @@ GST_START_TEST (test_output_selector_no_srcpad_negotiation);
|
|||
|
||||
gst_caps_unref (caps);
|
||||
|
||||
caps = gst_caps_new_simple ("mymedia/mycaps", NULL);
|
||||
caps = gst_caps_new_empty_simple ("mymedia/mycaps");
|
||||
fail_unless (gst_pad_set_caps (pad, caps));
|
||||
gst_caps_unref (caps);
|
||||
}
|
||||
|
@ -504,7 +504,7 @@ GST_START_TEST (test_output_selector_getcaps_all);
|
|||
|
||||
/* in 'all' mode, the intersection of the srcpad caps should be returned on
|
||||
* the sinkpad's getcaps */
|
||||
expected = gst_caps_new_simple ("format/abc", NULL);
|
||||
expected = gst_caps_new_empty_simple ("format/abc");
|
||||
|
||||
for (walker = output_pads; walker; walker = g_list_next (walker)) {
|
||||
GstCaps *caps;
|
||||
|
|
|
@ -193,7 +193,7 @@ buffer_alloc_harness_setup (BufferAllocHarness * h, gint countdown)
|
|||
fail_unless_equals_int (gst_element_set_state (h->tee, GST_STATE_PLAYING),
|
||||
TRUE);
|
||||
|
||||
h->caps = gst_caps_new_simple ("video/x-raw-yuv", NULL);
|
||||
h->caps = gst_caps_new_empty_simple ("video/x-raw-yuv");
|
||||
|
||||
h->start_srcpad = gst_pad_new ("src", GST_PAD_SRC);
|
||||
fail_if (h->start_srcpad == NULL);
|
||||
|
@ -462,7 +462,7 @@ GST_START_TEST (test_flow_aggregation)
|
|||
GstBuffer *buffer;
|
||||
GstCaps *caps;
|
||||
|
||||
caps = gst_caps_new_simple ("test/test", NULL);
|
||||
caps = gst_caps_new_empty_simple ("test/test");
|
||||
|
||||
tee = gst_element_factory_make ("tee", NULL);
|
||||
fail_unless (tee != NULL);
|
||||
|
|
|
@ -34,7 +34,7 @@ static void
|
|||
setup (void)
|
||||
{
|
||||
list = gst_buffer_list_new ();
|
||||
caps = gst_caps_new_simple ("text/plain", NULL);
|
||||
caps = gst_caps_new_empty_simple ("text/plain");
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -86,7 +86,7 @@ GST_START_TEST (test_can_sink_any_caps)
|
|||
factory = setup_factory ();
|
||||
fail_if (factory == NULL);
|
||||
|
||||
caps = gst_caps_new_simple ("audio/x-raw-int", NULL);
|
||||
caps = gst_caps_new_empty_simple ("audio/x-raw-int");
|
||||
fail_if (caps == NULL);
|
||||
res = gst_element_factory_can_sink_any_caps (factory, caps);
|
||||
fail_if (!res);
|
||||
|
@ -107,7 +107,7 @@ GST_START_TEST (test_can_sink_all_caps)
|
|||
factory = setup_factory ();
|
||||
fail_if (factory == NULL);
|
||||
|
||||
caps = gst_caps_new_simple ("audio/x-raw-int", NULL);
|
||||
caps = gst_caps_new_empty_simple ("audio/x-raw-int");
|
||||
fail_if (caps == NULL);
|
||||
res = gst_element_factory_can_sink_all_caps (factory, caps);
|
||||
fail_if (res);
|
||||
|
|
|
@ -501,7 +501,7 @@ GST_START_TEST (test_vararg_getters)
|
|||
data[2] = 0x0d;
|
||||
gst_buffer_unmap (buf, data, 3);
|
||||
|
||||
caps = gst_caps_new_simple ("video/x-foo", NULL);
|
||||
caps = gst_caps_new_empty_simple ("video/x-foo");
|
||||
|
||||
s = gst_structure_new ("test", "int", G_TYPE_INT, 12345678, "string",
|
||||
G_TYPE_STRING, "Hello World!", "buf", GST_TYPE_BUFFER, buf, "caps",
|
||||
|
|
|
@ -1003,12 +1003,12 @@ GST_START_TEST (test_pad_proxy_getcaps_aggregation)
|
|||
gst_caps_unref (caps);
|
||||
|
||||
/* these don't intersect we should get empty caps */
|
||||
caps = gst_caps_new_simple ("foo/bar", NULL);
|
||||
caps = gst_caps_new_empty_simple ("foo/bar");
|
||||
fail_unless (gst_pad_set_caps (sink1_sink, caps));
|
||||
gst_pad_use_fixed_caps (sink1_sink);
|
||||
gst_caps_unref (caps);
|
||||
|
||||
caps = gst_caps_new_simple ("bar/ter", NULL);
|
||||
caps = gst_caps_new_empty_simple ("bar/ter");
|
||||
fail_unless (gst_pad_set_caps (sink2_sink, caps));
|
||||
gst_pad_use_fixed_caps (sink2_sink);
|
||||
gst_caps_unref (caps);
|
||||
|
|
|
@ -119,7 +119,7 @@ GST_START_TEST (basetransform_chain_pt1)
|
|||
/* with caps buffer */
|
||||
GST_DEBUG_OBJECT (trans, "alloc with caps, size 10");
|
||||
|
||||
caps = gst_caps_new_simple ("foo/x-bar", NULL);
|
||||
caps = gst_caps_new_empty_simple ("foo/x-bar");
|
||||
buffer_alloc_pt1_called = FALSE;
|
||||
set_caps_pt1_called = FALSE;
|
||||
res = gst_pad_alloc_buffer (trans->srcpad, 0, 10, caps, &buffer);
|
||||
|
@ -172,7 +172,7 @@ GST_START_TEST (basetransform_chain_pt2)
|
|||
trans = gst_test_trans_new ();
|
||||
|
||||
/* first buffer */
|
||||
caps = gst_caps_new_simple ("foo/x-bar", NULL);
|
||||
caps = gst_caps_new_empty_simple ("foo/x-bar");
|
||||
|
||||
GST_DEBUG_OBJECT (trans, "buffer with caps, size 20");
|
||||
|
||||
|
@ -256,7 +256,7 @@ GST_START_TEST (basetransform_chain_pt2)
|
|||
gst_caps_unref (caps);
|
||||
|
||||
/* with caps that is a superset */
|
||||
caps = gst_caps_new_simple ("foo/x-bar", NULL);
|
||||
caps = gst_caps_new_empty_simple ("foo/x-bar");
|
||||
|
||||
#if 0
|
||||
GST_DEBUG_OBJECT (trans, "alloc with superset caps, size 20");
|
||||
|
@ -378,7 +378,7 @@ set_caps_1 (GstBaseTransform * trans, GstCaps * incaps, GstCaps * outcaps)
|
|||
|
||||
set_caps_1_called = TRUE;
|
||||
|
||||
caps = gst_caps_new_simple ("foo/x-bar", NULL);
|
||||
caps = gst_caps_new_empty_simple ("foo/x-bar");
|
||||
|
||||
fail_unless (gst_caps_is_equal (incaps, caps));
|
||||
fail_unless (gst_caps_is_equal (outcaps, caps));
|
||||
|
@ -415,7 +415,7 @@ GST_START_TEST (basetransform_chain_ip2)
|
|||
gst_buffer_unref (buffer);
|
||||
#endif
|
||||
|
||||
caps = gst_caps_new_simple ("foo/x-bar", NULL);
|
||||
caps = gst_caps_new_empty_simple ("foo/x-bar");
|
||||
|
||||
#if 0
|
||||
/* with caps buffer */
|
||||
|
@ -551,8 +551,8 @@ set_caps_ct1 (GstBaseTransform * trans, GstCaps * incaps, GstCaps * outcaps)
|
|||
|
||||
GST_DEBUG_OBJECT (trans, "set_caps called");
|
||||
|
||||
caps1 = gst_caps_new_simple ("baz/x-foo", NULL);
|
||||
caps2 = gst_caps_new_simple ("foo/x-bar", NULL);
|
||||
caps1 = gst_caps_new_empty_simple ("baz/x-foo");
|
||||
caps2 = gst_caps_new_empty_simple ("foo/x-bar");
|
||||
|
||||
fail_unless (gst_caps_is_equal (incaps, caps1));
|
||||
fail_unless (gst_caps_is_equal (outcaps, caps2));
|
||||
|
@ -586,9 +586,9 @@ transform_caps_ct1 (GstBaseTransform * trans, GstPadDirection dir,
|
|||
GstCaps *res;
|
||||
|
||||
if (dir == GST_PAD_SINK) {
|
||||
res = gst_caps_new_simple ("foo/x-bar", NULL);
|
||||
res = gst_caps_new_empty_simple ("foo/x-bar");
|
||||
} else {
|
||||
res = gst_caps_new_simple ("baz/x-foo", NULL);
|
||||
res = gst_caps_new_empty_simple ("baz/x-foo");
|
||||
}
|
||||
|
||||
if (filter) {
|
||||
|
@ -628,7 +628,7 @@ buffer_alloc_ct1 (GstPad * pad, guint64 offset, guint size, GstCaps * caps,
|
|||
|
||||
buffer_alloc_ct1_called = TRUE;
|
||||
|
||||
outcaps = gst_caps_new_simple ("foo/x-bar", NULL);
|
||||
outcaps = gst_caps_new_empty_simple ("foo/x-bar");
|
||||
fail_unless (gst_caps_is_equal (outcaps, caps));
|
||||
gst_caps_unref (outcaps);
|
||||
|
||||
|
@ -657,8 +657,8 @@ GST_START_TEST (basetransform_chain_ct1)
|
|||
|
||||
trans = gst_test_trans_new ();
|
||||
|
||||
incaps = gst_caps_new_simple ("baz/x-foo", NULL);
|
||||
outcaps = gst_caps_new_simple ("foo/x-bar", NULL);
|
||||
incaps = gst_caps_new_empty_simple ("baz/x-foo");
|
||||
outcaps = gst_caps_new_empty_simple ("foo/x-bar");
|
||||
|
||||
#if 0
|
||||
/* without caps buffer, I think this should fail */
|
||||
|
@ -823,12 +823,12 @@ set_caps_ct2 (GstBaseTransform * trans, GstCaps * incaps, GstCaps * outcaps)
|
|||
|
||||
GST_DEBUG_OBJECT (trans, "set_caps called");
|
||||
|
||||
caps1 = gst_caps_new_simple ("foo/x-bar", NULL);
|
||||
caps1 = gst_caps_new_empty_simple ("foo/x-bar");
|
||||
|
||||
if (set_caps_ct2_case == 1)
|
||||
caps2 = gst_caps_copy (caps1);
|
||||
else
|
||||
caps2 = gst_caps_new_simple ("baz/x-foo", NULL);
|
||||
caps2 = gst_caps_new_empty_simple ("baz/x-foo");
|
||||
|
||||
fail_unless (gst_caps_is_equal (incaps, caps1));
|
||||
fail_unless (gst_caps_is_equal (outcaps, caps2));
|
||||
|
@ -866,7 +866,7 @@ transform_caps_ct2 (GstBaseTransform * trans, GstPadDirection dir,
|
|||
res = gst_caps_from_string ("foo/x-bar;baz/x-foo");
|
||||
} else {
|
||||
/* all on the srcpad can be transformed to the format of the sinkpad */
|
||||
res = gst_caps_new_simple ("foo/x-bar", NULL);
|
||||
res = gst_caps_new_empty_simple ("foo/x-bar");
|
||||
}
|
||||
|
||||
if (filter) {
|
||||
|
@ -913,16 +913,16 @@ buffer_alloc_ct2 (GstPad * pad, guint64 offset, guint size, GstCaps * caps,
|
|||
buffer_alloc_ct2_called = TRUE;
|
||||
|
||||
if (buffer_alloc_ct2_case == 1) {
|
||||
incaps = gst_caps_new_simple ("foo/x-bar", NULL);
|
||||
incaps = gst_caps_new_empty_simple ("foo/x-bar");
|
||||
if (buffer_alloc_ct2_suggest) {
|
||||
outcaps = gst_caps_new_simple ("baz/x-foo", NULL);
|
||||
outcaps = gst_caps_new_empty_simple ("baz/x-foo");
|
||||
size *= 2;
|
||||
} else
|
||||
outcaps = gst_caps_ref (incaps);
|
||||
} else {
|
||||
incaps = gst_caps_new_simple ("baz/x-foo", NULL);
|
||||
incaps = gst_caps_new_empty_simple ("baz/x-foo");
|
||||
if (buffer_alloc_ct2_suggest) {
|
||||
outcaps = gst_caps_new_simple ("foo/x-bar", NULL);
|
||||
outcaps = gst_caps_new_empty_simple ("foo/x-bar");
|
||||
size /= 2;
|
||||
} else
|
||||
outcaps = gst_caps_ref (incaps);
|
||||
|
@ -962,8 +962,8 @@ GST_START_TEST (basetransform_chain_ct2)
|
|||
|
||||
trans = gst_test_trans_new ();
|
||||
|
||||
incaps = gst_caps_new_simple ("foo/x-bar", NULL);
|
||||
outcaps = gst_caps_new_simple ("baz/x-foo", NULL);
|
||||
incaps = gst_caps_new_empty_simple ("foo/x-bar");
|
||||
outcaps = gst_caps_new_empty_simple ("baz/x-foo");
|
||||
|
||||
#if 0
|
||||
/* without caps buffer, I think this should fail */
|
||||
|
@ -1132,8 +1132,8 @@ GST_START_TEST (basetransform_chain_ct3)
|
|||
|
||||
trans = gst_test_trans_new ();
|
||||
|
||||
incaps = gst_caps_new_simple ("foo/x-bar", NULL);
|
||||
outcaps = gst_caps_new_simple ("baz/x-foo", NULL);
|
||||
incaps = gst_caps_new_empty_simple ("foo/x-bar");
|
||||
outcaps = gst_caps_new_empty_simple ("baz/x-foo");
|
||||
|
||||
#if 0
|
||||
/* without caps buffer, I think this should fail */
|
||||
|
|
|
@ -37,7 +37,7 @@ modify_caps (GstObject * pad, GstProbeType type, GstEvent * event,
|
|||
return GST_PROBE_OK;
|
||||
|
||||
/* trigger caps negotiation error */
|
||||
caps = gst_caps_new_simple ("video/x-raw-rgb", NULL);
|
||||
caps = gst_caps_new_empty_simple ("video/x-raw-rgb");
|
||||
g_object_set (filter, "caps", caps, NULL);
|
||||
gst_caps_unref (caps);
|
||||
|
||||
|
|
Loading…
Reference in a new issue