From 49c896db3ae9290b3358979c611d12bd0501d805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 7 Jul 2015 00:53:48 +0100 Subject: [PATCH] docs: add GstHarness to documentation https://bugzilla.gnome.org/show_bug.cgi?id=751916 --- docs/libs/gstreamer-libs-docs.sgml | 1 + docs/libs/gstreamer-libs-sections.txt | 110 ++++++++++++++++++++++++++ libs/gst/check/check.h | 1 + libs/gst/check/gstharness.c | 8 +- libs/gst/check/gstharness.h | 23 +++++- 5 files changed, 140 insertions(+), 3 deletions(-) diff --git a/docs/libs/gstreamer-libs-docs.sgml b/docs/libs/gstreamer-libs-docs.sgml index c40f125174..e656179715 100644 --- a/docs/libs/gstreamer-libs-docs.sgml +++ b/docs/libs/gstreamer-libs-docs.sgml @@ -90,6 +90,7 @@ + diff --git a/docs/libs/gstreamer-libs-sections.txt b/docs/libs/gstreamer-libs-sections.txt index 52319e5a7e..4c72c8dd34 100644 --- a/docs/libs/gstreamer-libs-sections.txt +++ b/docs/libs/gstreamer-libs-sections.txt @@ -1198,6 +1198,116 @@ gst_consistency_checker_free gst_consistency_checker_add_pad +
+gstharness +GstHarness +gst/check/check.h +GstHarness + +gst_harness_new_full +gst_harness_new_with_element +gst_harness_new_with_padnames +gst_harness_new_with_templates +gst_harness_new +gst_harness_new_parse +gst_harness_teardown + +gst_harness_add_element_src_pad +gst_harness_add_element_sink_pad + +gst_harness_set_src_caps +gst_harness_set_sink_caps +gst_harness_set_caps +gst_harness_set_src_caps_str +gst_harness_set_sink_caps_str +gst_harness_set_caps_str + +gst_harness_use_systemclock +gst_harness_use_testclock +gst_harness_get_testclock +gst_harness_set_time +gst_harness_wait_for_clock_id_waits +gst_harness_crank_single_clock_wait +gst_harness_crank_multiple_clock_waits + +gst_harness_play +gst_harness_set_blocking_push_mode + +gst_harness_create_buffer +gst_harness_push +gst_harness_pull +gst_harness_try_pull +gst_harness_push_and_pull +gst_harness_buffers_received +gst_harness_buffers_in_queue +gst_harness_set_drop_buffers +gst_harness_dump_to_file +gst_harness_get_last_pushed_timestamp + +gst_harness_push_event +gst_harness_pull_event +gst_harness_try_pull_event +gst_harness_events_received +gst_harness_events_in_queue + +gst_harness_push_upstream_event +gst_harness_pull_upstream_event +gst_harness_try_pull_upstream_event +gst_harness_upstream_events_received +gst_harness_upstream_events_in_queue + +gst_harness_query_latency +gst_harness_set_upstream_latency + +gst_harness_set_propose_allocator +gst_harness_get_allocator + +gst_harness_add_src +gst_harness_add_src_parse +gst_harness_push_from_src +gst_harness_src_crank_and_push_many +gst_harness_src_push_event + +gst_harness_add_sink +gst_harness_add_sink_parse +gst_harness_push_to_sink +gst_harness_sink_push_many + +gst_harness_find_element +gst_harness_set +gst_harness_get +gst_harness_add_probe + +GstHarnessThread + +gst_harness_stress_thread_stop +gst_harness_stress_custom_start + +gst_harness_stress_statechange_start +gst_harness_stress_statechange_start_full + +gst_harness_stress_push_buffer_start +gst_harness_stress_push_buffer_start_full + +GstHarnessPrepareBuffer +gst_harness_stress_push_buffer_with_cb_start +gst_harness_stress_push_buffer_with_cb_start_full + +gst_harness_stress_push_event_start +gst_harness_stress_push_event_start_full + +gst_harness_stress_send_upstream_event_start +gst_harness_stress_push_upstream_event_start_full + +gst_harness_stress_property_start +gst_harness_stress_property_start_full + +gst_harness_stress_requestpad_start +gst_harness_stress_requestpad_start_full + +GstHarnessPrivate +
+
gsttestclock GstTestClock diff --git a/libs/gst/check/check.h b/libs/gst/check/check.h index 554ff93a83..6f58164dd0 100644 --- a/libs/gst/check/check.h +++ b/libs/gst/check/check.h @@ -25,6 +25,7 @@ #include #include #include +#include #include #endif /* __GST_CHECK__H__ */ diff --git a/libs/gst/check/gstharness.c b/libs/gst/check/gstharness.c index 2f7ce2813e..831ca75f3c 100644 --- a/libs/gst/check/gstharness.c +++ b/libs/gst/check/gstharness.c @@ -30,6 +30,7 @@ * The basic structure of #GstHarness is two "floating" #GstPads, that connects * to the harnessed #GstElement src and sink #GstPads like so: * + * * __________________________ * _____ | _____ _____ | _____ * | | | | | | | | | | @@ -37,6 +38,7 @@ * |_____| | |_____| |_____| | |_____| * |__________________________| * + * * * With this, you can now simulate any environment the #GstElement might find * itself in. By specifying the #GstCaps of the harness #GstPads, using @@ -1875,7 +1877,7 @@ gst_harness_get_allocator (GstHarness * h, GstAllocator ** allocator, /** - * gst_harness_get_allocator: + * gst_harness_set_propose_allocator: * @h: a #GstHarness * @allocator: (allow-none) (transfer full): a #GstAllocator * @params: (allow-none) (transfer none): a #GstAllocationParams @@ -2225,6 +2227,8 @@ gst_harness_find_element (GstHarness * h, const gchar * element_name) * @h: a #GstHarness * @element_name: a #gchar with a #GstElementFactory name * @first_property_name: a #gchar with the first property name + * @...: value for the first property, followed optionally by more + * name/value pairs, followed by %NULL * * A convenience function to allows you to call g_object_set on a #GstElement * that are residing inside the #GstHarness, by using normal g_object_set @@ -2251,6 +2255,8 @@ gst_harness_set (GstHarness * h, * @h: a #GstHarness * @element_name: a #gchar with a #GstElementFactory name * @first_property_name: a #gchar with the first property name + * @...: return location for the first property, followed optionally by more + * name/return location pairs, followed by %NULL * * A convenience function to allows you to call g_object_get on a #GstElement * that are residing inside the #GstHarness, by using normal g_object_get diff --git a/libs/gst/check/gstharness.h b/libs/gst/check/gstharness.h index f56adba037..ba3bd86bb1 100644 --- a/libs/gst/check/gstharness.h +++ b/libs/gst/check/gstharness.h @@ -26,10 +26,28 @@ G_BEGIN_DECLS -typedef struct _GstHarness GstHarness; -typedef struct _GstHarnessPrivate GstHarnessPrivate; +/** + * GstHarnessThread: + * + * Opaque handle representing a GstHarness stress testing thread. + * + * Since: 1.6 + */ typedef struct _GstHarnessThread GstHarnessThread; +typedef struct _GstHarness GstHarness; +typedef struct _GstHarnessPrivate GstHarnessPrivate; + +/** + * GstHarness: + * @element: the element inside the harness + * @srcpad: the internal harness source pad + * @sinkpad: the internal harness sink pad + * @src_harness: the source (input) harness (if any) + * @sink_harness: the sink (output) harness (if any) + * + * Since: 1.6 + */ struct _GstHarness { GstElement * element; @@ -39,6 +57,7 @@ struct _GstHarness { GstHarness * src_harness; GstHarness * sink_harness; + /*< private >*/ GstHarnessPrivate * priv; };