mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
tests: fix indentation
This commit is contained in:
parent
9092fce0b0
commit
93e006bd66
2 changed files with 28 additions and 18 deletions
|
@ -51,12 +51,13 @@ GST_START_TEST (test_one_buffer)
|
||||||
gst_buffer_unref (buffer_out);
|
gst_buffer_unref (buffer_out);
|
||||||
gst_harness_teardown (h);
|
gst_harness_teardown (h);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
handoff_func (GstElement * identity, GstBuffer * buf, GstBuffer ** ret)
|
handoff_func (GstElement * identity, GstBuffer * buf, GstBuffer ** ret)
|
||||||
{
|
{
|
||||||
(void)identity;
|
(void) identity;
|
||||||
*ret = buf;
|
*ret = buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,6 +96,7 @@ GST_START_TEST (test_signal_handoffs)
|
||||||
/* cleanup */
|
/* cleanup */
|
||||||
gst_harness_teardown (h);
|
gst_harness_teardown (h);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
GST_START_TEST (test_sync_on_timestamp)
|
GST_START_TEST (test_sync_on_timestamp)
|
||||||
|
@ -102,7 +104,7 @@ GST_START_TEST (test_sync_on_timestamp)
|
||||||
/* the reason to use the queue in front of the identity element
|
/* the reason to use the queue in front of the identity element
|
||||||
is to effectively make gst_harness_push asynchronous, not locking
|
is to effectively make gst_harness_push asynchronous, not locking
|
||||||
up the test, waiting for gst_clock_id_wait */
|
up the test, waiting for gst_clock_id_wait */
|
||||||
GstHarness * h = gst_harness_new_parse ("queue ! identity sync=1");
|
GstHarness *h = gst_harness_new_parse ("queue ! identity sync=1");
|
||||||
GstBuffer *buf;
|
GstBuffer *buf;
|
||||||
GstClock *clock;
|
GstClock *clock;
|
||||||
GstClockTime timestamp = 123456789;
|
GstClockTime timestamp = 123456789;
|
||||||
|
@ -137,6 +139,7 @@ GST_START_TEST (test_sync_on_timestamp)
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
gst_harness_teardown (h);
|
gst_harness_teardown (h);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
GST_START_TEST (test_stopping_element_unschedules_sync)
|
GST_START_TEST (test_stopping_element_unschedules_sync)
|
||||||
|
@ -144,7 +147,7 @@ GST_START_TEST (test_stopping_element_unschedules_sync)
|
||||||
/* the reason to use the queue in front of the identity element
|
/* the reason to use the queue in front of the identity element
|
||||||
is to effectively make gst_harness_push asynchronous, not locking
|
is to effectively make gst_harness_push asynchronous, not locking
|
||||||
up the test, waiting for gst_clock_id_wait */
|
up the test, waiting for gst_clock_id_wait */
|
||||||
GstHarness * h = gst_harness_new_parse ("queue ! identity sync=1");
|
GstHarness *h = gst_harness_new_parse ("queue ! identity sync=1");
|
||||||
GstBuffer *buf;
|
GstBuffer *buf;
|
||||||
GstClockTime timestamp = 123456789;
|
GstClockTime timestamp = 123456789;
|
||||||
|
|
||||||
|
@ -174,6 +177,7 @@ GST_START_TEST (test_stopping_element_unschedules_sync)
|
||||||
|
|
||||||
gst_harness_teardown (h);
|
gst_harness_teardown (h);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
static Suite *
|
static Suite *
|
||||||
|
|
|
@ -25,15 +25,15 @@
|
||||||
static void
|
static void
|
||||||
create_destroy_element_harness (gpointer data, gpointer user_data)
|
create_destroy_element_harness (gpointer data, gpointer user_data)
|
||||||
{
|
{
|
||||||
GstElement * element = user_data;
|
GstElement *element = user_data;
|
||||||
GstHarness * h = gst_harness_new_with_element (element, NULL, NULL);
|
GstHarness *h = gst_harness_new_with_element (element, NULL, NULL);
|
||||||
gst_harness_teardown (h);
|
gst_harness_teardown (h);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_START_TEST(test_harness_element_ref)
|
GST_START_TEST (test_harness_element_ref)
|
||||||
{
|
{
|
||||||
GstHarness * h = gst_harness_new ("identity");
|
GstHarness *h = gst_harness_new ("identity");
|
||||||
GstHarnessThread * threads[100];
|
GstHarnessThread *threads[100];
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (threads); i++)
|
for (i = 0; i < G_N_ELEMENTS (threads); i++)
|
||||||
|
@ -46,12 +46,13 @@ GST_START_TEST(test_harness_element_ref)
|
||||||
|
|
||||||
gst_harness_teardown (h);
|
gst_harness_teardown (h);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
|
|
||||||
GST_START_TEST(test_src_harness)
|
GST_START_TEST (test_src_harness)
|
||||||
{
|
{
|
||||||
GstHarness * h = gst_harness_new ("identity");
|
GstHarness *h = gst_harness_new ("identity");
|
||||||
|
|
||||||
/* add a fakesrc that syncs to the clock and a
|
/* add a fakesrc that syncs to the clock and a
|
||||||
capsfilter that adds some caps to it */
|
capsfilter that adds some caps to it */
|
||||||
|
@ -67,11 +68,12 @@ GST_START_TEST(test_src_harness)
|
||||||
|
|
||||||
gst_harness_teardown (h);
|
gst_harness_teardown (h);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
GST_START_TEST(test_src_harness_no_forwarding)
|
GST_START_TEST (test_src_harness_no_forwarding)
|
||||||
{
|
{
|
||||||
GstHarness * h = gst_harness_new ("identity");
|
GstHarness *h = gst_harness_new ("identity");
|
||||||
|
|
||||||
/* turn of forwarding of necessary events */
|
/* turn of forwarding of necessary events */
|
||||||
gst_harness_set_forwarding (h, FALSE);
|
gst_harness_set_forwarding (h, FALSE);
|
||||||
|
@ -105,20 +107,22 @@ GST_START_TEST(test_src_harness_no_forwarding)
|
||||||
|
|
||||||
gst_harness_teardown (h);
|
gst_harness_teardown (h);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
GST_START_TEST(test_add_sink_harness_without_sinkpad)
|
GST_START_TEST (test_add_sink_harness_without_sinkpad)
|
||||||
{
|
{
|
||||||
GstHarness * h = gst_harness_new ("fakesink");
|
GstHarness *h = gst_harness_new ("fakesink");
|
||||||
|
|
||||||
gst_harness_add_sink (h, "fakesink");
|
gst_harness_add_sink (h, "fakesink");
|
||||||
|
|
||||||
gst_harness_teardown (h);
|
gst_harness_teardown (h);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
static GstEvent *
|
static GstEvent *
|
||||||
create_new_stream_start_event (GstHarness *h, gpointer data)
|
create_new_stream_start_event (GstHarness * h, gpointer data)
|
||||||
{
|
{
|
||||||
guint *counter = data;
|
guint *counter = data;
|
||||||
gchar *stream_id = g_strdup_printf ("streamid/%d", *counter);
|
gchar *stream_id = g_strdup_printf ("streamid/%d", *counter);
|
||||||
|
@ -148,7 +152,7 @@ GST_START_TEST (test_forward_event_and_query_to_sink_harness_while_teardown)
|
||||||
GstHarnessThread *q_thread = gst_harness_stress_custom_start (h, NULL,
|
GstHarnessThread *q_thread = gst_harness_stress_custom_start (h, NULL,
|
||||||
push_query, h, 0);
|
push_query, h, 0);
|
||||||
gdouble duration = 1.0;
|
gdouble duration = 1.0;
|
||||||
GTimer * timer = g_timer_new ();
|
GTimer *timer = g_timer_new ();
|
||||||
|
|
||||||
while (g_timer_elapsed (timer, NULL) < duration) {
|
while (g_timer_elapsed (timer, NULL) < duration) {
|
||||||
gst_harness_add_sink (h, "fakesink");
|
gst_harness_add_sink (h, "fakesink");
|
||||||
|
@ -160,6 +164,7 @@ GST_START_TEST (test_forward_event_and_query_to_sink_harness_while_teardown)
|
||||||
gst_harness_stress_thread_stop (e_thread);
|
gst_harness_stress_thread_stop (e_thread);
|
||||||
gst_harness_teardown (h);
|
gst_harness_teardown (h);
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_END_TEST;
|
GST_END_TEST;
|
||||||
|
|
||||||
static Suite *
|
static Suite *
|
||||||
|
@ -175,7 +180,8 @@ gst_harness_suite (void)
|
||||||
tcase_add_test (tc_chain, test_src_harness_no_forwarding);
|
tcase_add_test (tc_chain, test_src_harness_no_forwarding);
|
||||||
tcase_add_test (tc_chain, test_add_sink_harness_without_sinkpad);
|
tcase_add_test (tc_chain, test_add_sink_harness_without_sinkpad);
|
||||||
|
|
||||||
tcase_add_test (tc_chain, test_forward_event_and_query_to_sink_harness_while_teardown);
|
tcase_add_test (tc_chain,
|
||||||
|
test_forward_event_and_query_to_sink_harness_while_teardown);
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue