mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 18:51:11 +00:00
fix up tests
This commit is contained in:
parent
4d59dc2391
commit
a69a438d6c
2 changed files with 16 additions and 16 deletions
|
@ -185,13 +185,13 @@ gst_multifdsink_create_streamheader (const gchar * data1,
|
||||||
fail_if (hbuf2 == NULL);
|
fail_if (hbuf2 == NULL);
|
||||||
fail_if (caps == NULL);
|
fail_if (caps == NULL);
|
||||||
|
|
||||||
/* create caps with streamheader, set the caps, and push the IN_CAPS
|
/* create caps with streamheader, set the caps, and push the HEADER
|
||||||
* buffers */
|
* buffers */
|
||||||
*hbuf1 = gst_buffer_new_and_alloc (size1);
|
*hbuf1 = gst_buffer_new_and_alloc (size1);
|
||||||
GST_BUFFER_FLAG_SET (*hbuf1, GST_BUFFER_FLAG_IN_CAPS);
|
GST_BUFFER_FLAG_SET (*hbuf1, GST_BUFFER_FLAG_HEADER);
|
||||||
gst_buffer_fill (*hbuf1, 0, data1, size1);
|
gst_buffer_fill (*hbuf1, 0, data1, size1);
|
||||||
*hbuf2 = gst_buffer_new_and_alloc (size2);
|
*hbuf2 = gst_buffer_new_and_alloc (size2);
|
||||||
GST_BUFFER_FLAG_SET (*hbuf2, GST_BUFFER_FLAG_IN_CAPS);
|
GST_BUFFER_FLAG_SET (*hbuf2, GST_BUFFER_FLAG_HEADER);
|
||||||
gst_buffer_fill (*hbuf2, 0, data2, size2);
|
gst_buffer_fill (*hbuf2, 0, data2, size2);
|
||||||
|
|
||||||
g_value_init (&array, GST_TYPE_ARRAY);
|
g_value_init (&array, GST_TYPE_ARRAY);
|
||||||
|
@ -231,7 +231,7 @@ gst_multifdsink_create_streamheader (const gchar * data1,
|
||||||
/* this test:
|
/* this test:
|
||||||
* - adds a first client
|
* - adds a first client
|
||||||
* - sets streamheader caps on the pad
|
* - sets streamheader caps on the pad
|
||||||
* - pushes the IN_CAPS buffers
|
* - pushes the HEADER buffers
|
||||||
* - pushes a buffer
|
* - pushes a buffer
|
||||||
* - verifies that the client received all the data correctly, and did not
|
* - verifies that the client received all the data correctly, and did not
|
||||||
* get multiple copies of the streamheader
|
* get multiple copies of the streamheader
|
||||||
|
@ -258,7 +258,7 @@ GST_START_TEST (test_streamheader)
|
||||||
g_signal_emit_by_name (sink, "add", pfd1[1]);
|
g_signal_emit_by_name (sink, "add", pfd1[1]);
|
||||||
fail_unless_num_handles (sink, 1);
|
fail_unless_num_handles (sink, 1);
|
||||||
|
|
||||||
/* create caps with streamheader, set the caps, and push the IN_CAPS
|
/* create caps with streamheader, set the caps, and push the HEADER
|
||||||
* buffers */
|
* buffers */
|
||||||
gst_multifdsink_create_streamheader ("babe", "deadbeef", &hbuf1, &hbuf2,
|
gst_multifdsink_create_streamheader ("babe", "deadbeef", &hbuf1, &hbuf2,
|
||||||
&caps);
|
&caps);
|
||||||
|
@ -273,7 +273,7 @@ GST_START_TEST (test_streamheader)
|
||||||
//FIXME:
|
//FIXME:
|
||||||
//fail_if_can_read ("first client", pfd1[0]);
|
//fail_if_can_read ("first client", pfd1[0]);
|
||||||
|
|
||||||
/* push a non-IN_CAPS buffer, this should trigger the client receiving the
|
/* push a non-HEADER buffer, this should trigger the client receiving the
|
||||||
* first three buffers */
|
* first three buffers */
|
||||||
buf = gst_buffer_new_and_alloc (4);
|
buf = gst_buffer_new_and_alloc (4);
|
||||||
gst_buffer_fill (buf, 0, "f00d", 4);
|
gst_buffer_fill (buf, 0, "f00d", 4);
|
||||||
|
@ -328,7 +328,7 @@ GST_END_TEST;
|
||||||
|
|
||||||
/* this tests changing of streamheaders
|
/* this tests changing of streamheaders
|
||||||
* - set streamheader caps on the pad
|
* - set streamheader caps on the pad
|
||||||
* - pushes the IN_CAPS buffers
|
* - pushes the HEADER buffers
|
||||||
* - pushes a buffer
|
* - pushes a buffer
|
||||||
* - add a first client
|
* - add a first client
|
||||||
* - verifies that this first client receives the first streamheader caps,
|
* - verifies that this first client receives the first streamheader caps,
|
||||||
|
@ -350,7 +350,7 @@ GST_START_TEST (test_change_streamheader)
|
||||||
|
|
||||||
ASSERT_SET_STATE (sink, GST_STATE_PLAYING, GST_STATE_CHANGE_ASYNC);
|
ASSERT_SET_STATE (sink, GST_STATE_PLAYING, GST_STATE_CHANGE_ASYNC);
|
||||||
|
|
||||||
/* create caps with streamheader, set the caps, and push the IN_CAPS
|
/* create caps with streamheader, set the caps, and push the HEADER
|
||||||
* buffers */
|
* buffers */
|
||||||
gst_multifdsink_create_streamheader ("first", "header", &hbuf1, &hbuf2,
|
gst_multifdsink_create_streamheader ("first", "header", &hbuf1, &hbuf2,
|
||||||
&caps);
|
&caps);
|
||||||
|
|
|
@ -218,13 +218,13 @@ gst_multisocketsink_create_streamheader (const gchar * data1,
|
||||||
fail_if (hbuf2 == NULL);
|
fail_if (hbuf2 == NULL);
|
||||||
fail_if (caps == NULL);
|
fail_if (caps == NULL);
|
||||||
|
|
||||||
/* create caps with streamheader, set the caps, and push the IN_CAPS
|
/* create caps with streamheader, set the caps, and push the HEADER
|
||||||
* buffers */
|
* buffers */
|
||||||
*hbuf1 = gst_buffer_new_and_alloc (size1);
|
*hbuf1 = gst_buffer_new_and_alloc (size1);
|
||||||
GST_BUFFER_FLAG_SET (*hbuf1, GST_BUFFER_FLAG_IN_CAPS);
|
GST_BUFFER_FLAG_SET (*hbuf1, GST_BUFFER_FLAG_HEADER);
|
||||||
gst_buffer_fill (*hbuf1, 0, data1, size1);
|
gst_buffer_fill (*hbuf1, 0, data1, size1);
|
||||||
*hbuf2 = gst_buffer_new_and_alloc (size2);
|
*hbuf2 = gst_buffer_new_and_alloc (size2);
|
||||||
GST_BUFFER_FLAG_SET (*hbuf2, GST_BUFFER_FLAG_IN_CAPS);
|
GST_BUFFER_FLAG_SET (*hbuf2, GST_BUFFER_FLAG_HEADER);
|
||||||
gst_buffer_fill (*hbuf2, 0, data2, size2);
|
gst_buffer_fill (*hbuf2, 0, data2, size2);
|
||||||
|
|
||||||
g_value_init (&array, GST_TYPE_ARRAY);
|
g_value_init (&array, GST_TYPE_ARRAY);
|
||||||
|
@ -264,7 +264,7 @@ gst_multisocketsink_create_streamheader (const gchar * data1,
|
||||||
/* this test:
|
/* this test:
|
||||||
* - adds a first client
|
* - adds a first client
|
||||||
* - sets streamheader caps on the pad
|
* - sets streamheader caps on the pad
|
||||||
* - pushes the IN_CAPS buffers
|
* - pushes the HEADER buffers
|
||||||
* - pushes a buffer
|
* - pushes a buffer
|
||||||
* - verifies that the client received all the data correctly, and did not
|
* - verifies that the client received all the data correctly, and did not
|
||||||
* get multiple copies of the streamheader
|
* get multiple copies of the streamheader
|
||||||
|
@ -291,7 +291,7 @@ GST_START_TEST (test_streamheader)
|
||||||
g_signal_emit_by_name (sink, "add", socket[0]);
|
g_signal_emit_by_name (sink, "add", socket[0]);
|
||||||
fail_unless_num_handles (sink, 1);
|
fail_unless_num_handles (sink, 1);
|
||||||
|
|
||||||
/* create caps with streamheader, set the caps, and push the IN_CAPS
|
/* create caps with streamheader, set the caps, and push the HEADER
|
||||||
* buffers */
|
* buffers */
|
||||||
gst_multisocketsink_create_streamheader ("babe", "deadbeef", &hbuf1, &hbuf2,
|
gst_multisocketsink_create_streamheader ("babe", "deadbeef", &hbuf1, &hbuf2,
|
||||||
&caps);
|
&caps);
|
||||||
|
@ -312,7 +312,7 @@ GST_START_TEST (test_streamheader)
|
||||||
//FIXME:
|
//FIXME:
|
||||||
//fail_if_can_read ("first client", socket[1]);
|
//fail_if_can_read ("first client", socket[1]);
|
||||||
|
|
||||||
/* push a non-IN_CAPS buffer, this should trigger the client receiving the
|
/* push a non-HEADER buffer, this should trigger the client receiving the
|
||||||
* first three buffers */
|
* first three buffers */
|
||||||
buf = gst_buffer_new_and_alloc (4);
|
buf = gst_buffer_new_and_alloc (4);
|
||||||
gst_buffer_fill (buf, 0, "f00d", 4);
|
gst_buffer_fill (buf, 0, "f00d", 4);
|
||||||
|
@ -367,7 +367,7 @@ GST_END_TEST;
|
||||||
|
|
||||||
/* this tests changing of streamheaders
|
/* this tests changing of streamheaders
|
||||||
* - set streamheader caps on the pad
|
* - set streamheader caps on the pad
|
||||||
* - pushes the IN_CAPS buffers
|
* - pushes the HEADER buffers
|
||||||
* - pushes a buffer
|
* - pushes a buffer
|
||||||
* - add a first client
|
* - add a first client
|
||||||
* - verifies that this first client receives the first streamheader caps,
|
* - verifies that this first client receives the first streamheader caps,
|
||||||
|
@ -389,7 +389,7 @@ GST_START_TEST (test_change_streamheader)
|
||||||
|
|
||||||
ASSERT_SET_STATE (sink, GST_STATE_PLAYING, GST_STATE_CHANGE_ASYNC);
|
ASSERT_SET_STATE (sink, GST_STATE_PLAYING, GST_STATE_CHANGE_ASYNC);
|
||||||
|
|
||||||
/* create caps with streamheader, set the caps, and push the IN_CAPS
|
/* create caps with streamheader, set the caps, and push the HEADER
|
||||||
* buffers */
|
* buffers */
|
||||||
gst_multisocketsink_create_streamheader ("first", "header", &hbuf1, &hbuf2,
|
gst_multisocketsink_create_streamheader ("first", "header", &hbuf1, &hbuf2,
|
||||||
&caps);
|
&caps);
|
||||||
|
|
Loading…
Reference in a new issue