gst_buffer_unref (buffer_out);
gst_harness_teardown (h);
}
+
GST_END_TEST;
static void
-handoff_func (GstElement * identity, GstBuffer * buf, GstBuffer ** ret)
+handoff_func (GstElement * identity, GstBuffer * buf, GstBuffer ** ret)
{
- (void)identity;
+ (void) identity;
*ret = buf;
}
/* cleanup */
gst_harness_teardown (h);
}
+
GST_END_TEST;
GST_START_TEST (test_sync_on_timestamp)
/* the reason to use the queue in front of the identity element
is to effectively make gst_harness_push asynchronous, not locking
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;
GstClock *clock;
GstClockTime timestamp = 123456789;
gst_buffer_unref (buf);
gst_harness_teardown (h);
}
+
GST_END_TEST;
GST_START_TEST (test_stopping_element_unschedules_sync)
/* the reason to use the queue in front of the identity element
is to effectively make gst_harness_push asynchronous, not locking
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;
GstClockTime timestamp = 123456789;
gst_harness_teardown (h);
}
+
GST_END_TEST;
static Suite *
static void
create_destroy_element_harness (gpointer data, gpointer user_data)
{
- GstElement * element = user_data;
- GstHarness * h = gst_harness_new_with_element (element, NULL, NULL);
+ GstElement *element = user_data;
+ GstHarness *h = gst_harness_new_with_element (element, NULL, NULL);
gst_harness_teardown (h);
}
-GST_START_TEST(test_harness_element_ref)
+GST_START_TEST (test_harness_element_ref)
{
- GstHarness * h = gst_harness_new ("identity");
- GstHarnessThread * threads[100];
+ GstHarness *h = gst_harness_new ("identity");
+ GstHarnessThread *threads[100];
gint i;
for (i = 0; i < G_N_ELEMENTS (threads); i++)
gst_harness_teardown (h);
}
+
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
capsfilter that adds some caps to it */
gst_harness_teardown (h);
}
+
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 */
gst_harness_set_forwarding (h, FALSE);
gst_harness_teardown (h);
}
+
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_teardown (h);
}
+
GST_END_TEST;
static GstEvent *
-create_new_stream_start_event (GstHarness *h, gpointer data)
+create_new_stream_start_event (GstHarness * h, gpointer data)
{
guint *counter = data;
gchar *stream_id = g_strdup_printf ("streamid/%d", *counter);
GstHarnessThread *q_thread = gst_harness_stress_custom_start (h, NULL,
push_query, h, 0);
gdouble duration = 1.0;
- GTimer * timer = g_timer_new ();
+ GTimer *timer = g_timer_new ();
while (g_timer_elapsed (timer, NULL) < duration) {
gst_harness_add_sink (h, "fakesink");
gst_harness_stress_thread_stop (e_thread);
gst_harness_teardown (h);
}
+
GST_END_TEST;
static Suite *
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_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;
}