blob: 9d993f98ef4b80347afca996d2ad39c9dc7d32bd [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GstHarness: GStreamer 1.0 Library Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="GStreamer 1.0 Library Reference Manual">
<link rel="up" href="gstreamer-check.html" title="GStreamer Check Unit Testing">
<link rel="prev" href="gstreamer-libs-GstStreamConsistency.html" title="GstStreamConsistency">
<link rel="next" href="GstTestClock.html" title="GstTestClock">
<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
<a href="#gstreamer-libs-GstHarness.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="gstreamer-check.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gstreamer-libs-GstStreamConsistency.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="GstTestClock.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gstreamer-libs-GstHarness"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gstreamer-libs-GstHarness.top_of_page"></a>GstHarness</span></h2>
<p>GstHarness — A test-harness for writing GStreamer unit tests</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gstreamer-libs-GstHarness.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="returnvalue">GstHarness</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-new-full" title="gst_harness_new_full ()">gst_harness_new_full</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="returnvalue">GstHarness</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-new-with-element" title="gst_harness_new_with_element ()">gst_harness_new_with_element</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="returnvalue">GstHarness</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-new-with-padnames" title="gst_harness_new_with_padnames ()">gst_harness_new_with_padnames</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="returnvalue">GstHarness</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-new-with-templates" title="gst_harness_new_with_templates ()">gst_harness_new_with_templates</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="returnvalue">GstHarness</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-new" title="gst_harness_new ()">gst_harness_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="returnvalue">GstHarness</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-new-parse" title="gst_harness_new_parse ()">gst_harness_new_parse</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-teardown" title="gst_harness_teardown ()">gst_harness_teardown</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-add-element-src-pad" title="gst_harness_add_element_src_pad ()">gst_harness_add_element_src_pad</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-add-element-sink-pad" title="gst_harness_add_element_sink_pad ()">gst_harness_add_element_sink_pad</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-set-src-caps" title="gst_harness_set_src_caps ()">gst_harness_set_src_caps</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-set-sink-caps" title="gst_harness_set_sink_caps ()">gst_harness_set_sink_caps</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-set-caps" title="gst_harness_set_caps ()">gst_harness_set_caps</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-set-src-caps-str" title="gst_harness_set_src_caps_str ()">gst_harness_set_src_caps_str</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-set-sink-caps-str" title="gst_harness_set_sink_caps_str ()">gst_harness_set_sink_caps_str</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-set-caps-str" title="gst_harness_set_caps_str ()">gst_harness_set_caps_str</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-use-systemclock" title="gst_harness_use_systemclock ()">gst_harness_use_systemclock</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-use-testclock" title="gst_harness_use_testclock ()">gst_harness_use_testclock</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GstTestClock.html" title="GstTestClock"><span class="returnvalue">GstTestClock</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-get-testclock" title="gst_harness_get_testclock ()">gst_harness_get_testclock</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-set-time" title="gst_harness_set_time ()">gst_harness_set_time</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-wait-for-clock-id-waits" title="gst_harness_wait_for_clock_id_waits ()">gst_harness_wait_for_clock_id_waits</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-crank-single-clock-wait" title="gst_harness_crank_single_clock_wait ()">gst_harness_crank_single_clock_wait</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-crank-multiple-clock-waits" title="gst_harness_crank_multiple_clock_waits ()">gst_harness_crank_multiple_clock_waits</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-play" title="gst_harness_play ()">gst_harness_play</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-set-blocking-push-mode" title="gst_harness_set_blocking_push_mode ()">gst_harness_set_blocking_push_mode</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-set-forwarding" title="gst_harness_set_forwarding ()">gst_harness_set_forwarding</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="returnvalue">GstBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-create-buffer" title="gst_harness_create_buffer ()">gst_harness_create_buffer</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-push" title="gst_harness_push ()">gst_harness_push</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="returnvalue">GstBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-pull" title="gst_harness_pull ()">gst_harness_pull</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="returnvalue">GstBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-try-pull" title="gst_harness_try_pull ()">gst_harness_try_pull</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="returnvalue">GstBuffer</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-push-and-pull" title="gst_harness_push_and_pull ()">gst_harness_push_and_pull</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-buffers-received" title="gst_harness_buffers_received ()">gst_harness_buffers_received</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-buffers-in-queue" title="gst_harness_buffers_in_queue ()">gst_harness_buffers_in_queue</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-set-drop-buffers" title="gst_harness_set_drop_buffers ()">gst_harness_set_drop_buffers</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-dump-to-file" title="gst_harness_dump_to_file ()">gst_harness_dump_to_file</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="returnvalue">GstClockTime</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-get-last-pushed-timestamp" title="gst_harness_get_last_pushed_timestamp ()">gst_harness_get_last_pushed_timestamp</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-push-event" title="gst_harness_push_event ()">gst_harness_push_event</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstEvent.html"><span class="returnvalue">GstEvent</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-pull-event" title="gst_harness_pull_event ()">gst_harness_pull_event</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstEvent.html"><span class="returnvalue">GstEvent</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-try-pull-event" title="gst_harness_try_pull_event ()">gst_harness_try_pull_event</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-events-received" title="gst_harness_events_received ()">gst_harness_events_received</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-events-in-queue" title="gst_harness_events_in_queue ()">gst_harness_events_in_queue</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-push-upstream-event" title="gst_harness_push_upstream_event ()">gst_harness_push_upstream_event</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstEvent.html"><span class="returnvalue">GstEvent</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-pull-upstream-event" title="gst_harness_pull_upstream_event ()">gst_harness_pull_upstream_event</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstEvent.html"><span class="returnvalue">GstEvent</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-try-pull-upstream-event" title="gst_harness_try_pull_upstream_event ()">gst_harness_try_pull_upstream_event</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-upstream-events-received" title="gst_harness_upstream_events_received ()">gst_harness_upstream_events_received</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-upstream-events-in-queue" title="gst_harness_upstream_events_in_queue ()">gst_harness_upstream_events_in_queue</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="returnvalue">GstClockTime</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-query-latency" title="gst_harness_query_latency ()">gst_harness_query_latency</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-set-upstream-latency" title="gst_harness_set_upstream_latency ()">gst_harness_set_upstream_latency</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-set-propose-allocator" title="gst_harness_set_propose_allocator ()">gst_harness_set_propose_allocator</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-get-allocator" title="gst_harness_get_allocator ()">gst_harness_get_allocator</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-add-src" title="gst_harness_add_src ()">gst_harness_add_src</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-add-src-harness" title="gst_harness_add_src_harness ()">gst_harness_add_src_harness</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-add-src-parse" title="gst_harness_add_src_parse ()">gst_harness_add_src_parse</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-push-from-src" title="gst_harness_push_from_src ()">gst_harness_push_from_src</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-src-crank-and-push-many" title="gst_harness_src_crank_and_push_many ()">gst_harness_src_crank_and_push_many</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-src-push-event" title="gst_harness_src_push_event ()">gst_harness_src_push_event</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-add-sink" title="gst_harness_add_sink ()">gst_harness_add_sink</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-add-sink-harness" title="gst_harness_add_sink_harness ()">gst_harness_add_sink_harness</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-add-sink-parse" title="gst_harness_add_sink_parse ()">gst_harness_add_sink_parse</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-push-to-sink" title="gst_harness_push_to_sink ()">gst_harness_push_to_sink</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-sink-push-many" title="gst_harness_sink_push_many ()">gst_harness_sink_push_many</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="returnvalue">GstElement</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-find-element" title="gst_harness_find_element ()">gst_harness_find_element</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-set" title="gst_harness_set ()">gst_harness_set</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-get" title="gst_harness_get ()">gst_harness_get</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-add-probe" title="gst_harness_add_probe ()">gst_harness_add_probe</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-stress-thread-stop" title="gst_harness_stress_thread_stop ()">gst_harness_stress_thread_stop</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gstreamer-libs-GstHarness.html#GstHarnessThread" title="GstHarnessThread"><span class="returnvalue">GstHarnessThread</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-stress-custom-start" title="gst_harness_stress_custom_start ()">gst_harness_stress_custom_start</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-stress-statechange-start" title="gst_harness_stress_statechange_start()">gst_harness_stress_statechange_start</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gstreamer-libs-GstHarness.html#GstHarnessThread" title="GstHarnessThread"><span class="returnvalue">GstHarnessThread</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-stress-statechange-start-full" title="gst_harness_stress_statechange_start_full ()">gst_harness_stress_statechange_start_full</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-stress-push-buffer-start" title="gst_harness_stress_push_buffer_start()">gst_harness_stress_push_buffer_start</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gstreamer-libs-GstHarness.html#GstHarnessThread" title="GstHarnessThread"><span class="returnvalue">GstHarnessThread</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-stress-push-buffer-start-full" title="gst_harness_stress_push_buffer_start_full ()">gst_harness_stress_push_buffer_start_full</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="returnvalue">GstBuffer</span></a> *
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="gstreamer-libs-GstHarness.html#GstHarnessPrepareBufferFunc" title="GstHarnessPrepareBufferFunc ()">*GstHarnessPrepareBufferFunc</a><span class="c_punctuation">)</span> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-stress-push-buffer-with-cb-start" title="gst_harness_stress_push_buffer_with_cb_start()">gst_harness_stress_push_buffer_with_cb_start</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gstreamer-libs-GstHarness.html#GstHarnessThread" title="GstHarnessThread"><span class="returnvalue">GstHarnessThread</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-stress-push-buffer-with-cb-start-full" title="gst_harness_stress_push_buffer_with_cb_start_full ()">gst_harness_stress_push_buffer_with_cb_start_full</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-stress-push-event-start" title="gst_harness_stress_push_event_start()">gst_harness_stress_push_event_start</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gstreamer-libs-GstHarness.html#GstHarnessThread" title="GstHarnessThread"><span class="returnvalue">GstHarnessThread</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-stress-push-event-start-full" title="gst_harness_stress_push_event_start_full ()">gst_harness_stress_push_event_start_full</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-stress-send-upstream-event-start" title="gst_harness_stress_send_upstream_event_start()">gst_harness_stress_send_upstream_event_start</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gstreamer-libs-GstHarness.html#GstHarnessThread" title="GstHarnessThread"><span class="returnvalue">GstHarnessThread</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-stress-push-upstream-event-start-full" title="gst_harness_stress_push_upstream_event_start_full ()">gst_harness_stress_push_upstream_event_start_full</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-stress-property-start" title="gst_harness_stress_property_start()">gst_harness_stress_property_start</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gstreamer-libs-GstHarness.html#GstHarnessThread" title="GstHarnessThread"><span class="returnvalue">GstHarnessThread</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-stress-property-start-full" title="gst_harness_stress_property_start_full ()">gst_harness_stress_property_start_full</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-stress-requestpad-start" title="gst_harness_stress_requestpad_start()">gst_harness_stress_requestpad_start</a><span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gstreamer-libs-GstHarness.html#GstHarnessThread" title="GstHarnessThread"><span class="returnvalue">GstHarnessThread</span></a> *
</td>
<td class="function_name">
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-stress-requestpad-start-full" title="gst_harness_stress_requestpad_start_full ()">gst_harness_stress_requestpad_start_full</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gstreamer-libs-GstHarness.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword">struct</td>
<td class="function_name"><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness">GstHarness</a></td>
</tr>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="gstreamer-libs-GstHarness.html#GstHarnessThread" title="GstHarnessThread">GstHarnessThread</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gstreamer-libs-GstHarness.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gst/check/check.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="gstreamer-libs-GstHarness.description"></a><h2>Description</h2>
<p><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> is ment to make writing unit test for GStreamer much easier.
It can be though of as a way of treating a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> as a black box,
deterministially feeding it data, and controlling what data it outputs.</p>
<p>The basic structure of <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> is two "floating" <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="type">GstPads</span></a>, that connects
to the harnessed <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> src and sink <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="type">GstPads</span></a> like so:</p>
<pre class="programlisting">
__________________________
_____ | _____ _____ | _____
| | | | | | | | | |
| src |--+-| sink| Element | src |-+--| sink|
|_____| | |_____| |_____| | |_____|
|__________________________|
</pre>
<p>With this, you can now simulate any environment the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> might find
itself in. By specifying the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> of the harness <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="type">GstPads</span></a>, using
functions like gst_harness_set_src_caps or gst_harness_set_sink_caps_str,
you can test how the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> interacts with different capssets.</p>
<p>Your harnessed <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> can of course also be a bin, and using
gst_harness_new_parse supporting standard gst-launch syntax, you can
easily test a whole pipeline instead of just one element.</p>
<p>You can then go on to push <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffers</span></a> and <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstEvent.html"><span class="type">GstEvents</span></a> on to the srcpad,
using functions like gst_harness_push and gst_harness_push_event, and
then pull them out to examine them with gst_harness_pull and
gst_harness_pull_event.</p>
<div class="example">
<a name="id-1.2.7.6.6.8"></a><p class="title"><b>Example 1. A simple buffer-in buffer-out example</b></p>
<div class="example-contents">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="gtkdoc ppc">#include &lt;gst/gst.h&gt;</span>
<span class="gtkdoc ppc">#include &lt;gst/check/gstharness.h&gt;</span>
GstHarness <span class="gtkdoc opt">*</span>h<span class="gtkdoc opt">;</span>
GstBuffer <span class="gtkdoc opt">*</span>in_buf<span class="gtkdoc opt">;</span>
GstBuffer <span class="gtkdoc opt">*</span>out_buf<span class="gtkdoc opt">;</span>
<span class="gtkdoc slc">// attach the harness to the src and sink pad of GstQueue</span>
h <span class="gtkdoc opt">=</span> <span class="function"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/gstreamer-libs-GstHarness.html#gst-harness-new">gst_harness_new</a></span> <span class="gtkdoc opt">(</span><span class="string">&quot;queue&quot;</span><span class="gtkdoc opt">);</span>
<span class="gtkdoc slc">// we must specify a caps before pushing buffers</span>
<span class="function"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/gstreamer-libs-GstHarness.html#gst-harness-set-src-caps-str">gst_harness_set_src_caps_str</a></span> <span class="gtkdoc opt">(</span>h<span class="gtkdoc opt">,</span> <span class="string">&quot;mycaps&quot;</span><span class="gtkdoc opt">);</span>
<span class="gtkdoc slc">// create a buffer of size 42</span>
in_buf <span class="gtkdoc opt">=</span> <span class="function"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/gstreamer-libs-GstHarness.html#gst-harness-create-buffer">gst_harness_create_buffer</a></span> <span class="gtkdoc opt">(</span>h<span class="gtkdoc opt">,</span> <span class="number">42</span><span class="gtkdoc opt">);</span>
<span class="gtkdoc slc">// push the buffer into the queue</span>
<span class="function"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/gstreamer-libs-GstHarness.html#gst-harness-push">gst_harness_push</a></span> <span class="gtkdoc opt">(</span>h<span class="gtkdoc opt">,</span> in_buf<span class="gtkdoc opt">);</span>
<span class="gtkdoc slc">// pull the buffer from the queue</span>
out_buf <span class="gtkdoc opt">=</span> <span class="function"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/gstreamer-libs-GstHarness.html#gst-harness-pull">gst_harness_pull</a></span> <span class="gtkdoc opt">(</span>h<span class="gtkdoc opt">);</span>
<span class="gtkdoc slc">// validate the buffer in is the same as buffer out</span>
<span class="function">fail_unless</span> <span class="gtkdoc opt">(</span>in_buf <span class="gtkdoc opt">==</span> out_buf<span class="gtkdoc opt">);</span>
<span class="gtkdoc slc">// cleanup</span>
<span class="function"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html#gst-buffer-unref">gst_buffer_unref</a></span> <span class="gtkdoc opt">(</span>out_buf<span class="gtkdoc opt">);</span>
<span class="function"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/gstreamer-libs-GstHarness.html#gst-harness-teardown">gst_harness_teardown</a></span> <span class="gtkdoc opt">(</span>h<span class="gtkdoc opt">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="example-break"><p>Another main feature of the <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> is its integration with the
<a class="link" href="GstTestClock.html" title="GstTestClock"><span class="type">GstTestClock</span></a>. Operating the <a class="link" href="GstTestClock.html" title="GstTestClock"><span class="type">GstTestClock</span></a> can be very challenging, but
<a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> simplifies some of the most desired actions a lot, like wanting
to manually advance the clock while at the same time releasing a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockID"><span class="type">GstClockID</span></a>
that is waiting, with functions like gst_harness_crank_single_clock_wait.</p>
<p><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> also supports sub-harnesses, as a way of generating and
validating data. A sub-harness is another <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> that is managed by
the "parent" harness, and can either be created by using the standard
gst_harness_new type functions directly on the (GstHarness *)-&gt;src_harness,
or using the much more convenient gst_harness_add_src or
gst_harness_add_sink_parse. If you have a decoder-element you want to test,
(like vp8dec) it can be very useful to add a src-harness with both a
src-element (videotestsrc) and an encoder (vp8enc) to feed the decoder data
with different configurations, by simply doing:</p>
<div class="example">
<a name="id-1.2.7.6.6.11"></a><p class="title"><b>Example 2. </b></p>
<div class="example-contents">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2</pre></td>
<td class="listing_code"><pre class="programlisting">GstHarness <span class="gtkdoc opt">*</span> h <span class="gtkdoc opt">=</span> <span class="function"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/gstreamer-libs-GstHarness.html#gst-harness-new">gst_harness_new</a></span> <span class="gtkdoc opt">(</span>h<span class="gtkdoc opt">,</span> <span class="string">&quot;vp8dec&quot;</span><span class="gtkdoc opt">);</span>
<span class="function"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/gstreamer-libs-GstHarness.html#gst-harness-add-src-parse">gst_harness_add_src_parse</a></span> <span class="gtkdoc opt">(</span>h<span class="gtkdoc opt">,</span> <span class="string">&quot;videotestsrc is-live=1 ! vp8enc&quot;</span><span class="gtkdoc opt">,</span> TRUE<span class="gtkdoc opt">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="example-break"><p>and then feeding it data with:</p>
<div class="example">
<a name="id-1.2.7.6.6.13"></a><p class="title"><b>Example 3. </b></p>
<div class="example-contents">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="function"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer-libs/html/gstreamer-libs-GstHarness.html#gst-harness-push-from-src">gst_harness_push_from_src</a></span> <span class="gtkdoc opt">(</span>h<span class="gtkdoc opt">);</span></pre></td>
</tr>
</tbody>
</table>
</div>
</div>
<br class="example-break">
</div>
<div class="refsect1">
<a name="gstreamer-libs-GstHarness.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gst-harness-new-full"></a><h3>gst_harness_new_full ()</h3>
<pre class="programlisting"><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="returnvalue">GstHarness</span></a> *
gst_harness_new_full (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> *element</code></em>,
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> *hsrc</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *element_sinkpad_name</code></em>,
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> *hsink</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *element_srcpad_name</code></em>);</pre>
<p>Creates a new harness.</p>
<p>MT safe.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.2.7.6.7.2.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>element</p></td>
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> to attach the harness to (transfer none)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>hsrc</p></td>
<td class="parameter_description"><p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> describing the harness srcpad.
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will not create a harness srcpad. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>element_sinkpad_name</p></td>
<td class="parameter_description"><p> a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> with the name of the element
sinkpad that is then linked to the harness srcpad. Can be a static or request
or a sometimes pad that has been added. <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will not get/request a sinkpad
from the element. (Like if the element is a src.). </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>hsink</p></td>
<td class="parameter_description"><p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> describing the harness sinkpad.
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will not create a harness sinkpad. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>element_srcpad_name</p></td>
<td class="parameter_description"><p> a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> with the name of the element
srcpad that is then linked to the harness sinkpad, similar to the
<em class="parameter"><code>element_sinkpad_name</code></em>
. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.2.8"></a><h4>Returns</h4>
<p> a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the harness could
not be created. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-new-with-element"></a><h3>gst_harness_new_with_element ()</h3>
<pre class="programlisting"><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="returnvalue">GstHarness</span></a> *
gst_harness_new_with_element (<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> *element</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *element_sinkpad_name</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *element_srcpad_name</code></em>);</pre>
<p>Creates a new harness. Works in the same way as gst_harness_new_full, only
that generic padtemplates are used for the harness src and sinkpads, which
will be sufficient in most usecases.</p>
<p>MT safe.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.2.7.6.7.3.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>element</p></td>
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> to attach the harness to (transfer none)</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>element_sinkpad_name</p></td>
<td class="parameter_description"><p> a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> with the name of the element
sinkpad that is then linked to the harness srcpad. <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> does not attach a
sinkpad. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>element_srcpad_name</p></td>
<td class="parameter_description"><p> a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> with the name of the element
srcpad that is then linked to the harness sinkpad. <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> does not attach a
srcpad. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.3.8"></a><h4>Returns</h4>
<p> a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the harness could
not be created. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-new-with-padnames"></a><h3>gst_harness_new_with_padnames ()</h3>
<pre class="programlisting"><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="returnvalue">GstHarness</span></a> *
gst_harness_new_with_padnames (<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *element_name</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *element_sinkpad_name</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *element_srcpad_name</code></em>);</pre>
<p>Creates a new harness. Works in the same way as gst_harness_new_with_element,
except you specify the factoryname of the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
<p>MT safe.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.2.7.6.7.4.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>element_name</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> describing the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> name</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>element_sinkpad_name</p></td>
<td class="parameter_description"><p> a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> with the name of the element
sinkpad that is then linked to the harness srcpad. <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> does not attach a
sinkpad. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>element_srcpad_name</p></td>
<td class="parameter_description"><p> a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> with the name of the element
srcpad that is then linked to the harness sinkpad. <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> does not attach a
srcpad. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.4.8"></a><h4>Returns</h4>
<p> a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the harness could
not be created. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-new-with-templates"></a><h3>gst_harness_new_with_templates ()</h3>
<pre class="programlisting"><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="returnvalue">GstHarness</span></a> *
gst_harness_new_with_templates (<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *element_name</code></em>,
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> *hsrc</code></em>,
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> *hsink</code></em>);</pre>
<p>Creates a new harness, like gst_harness_new_full, except it
assumes the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> sinkpad is named "sink" and srcpad is named "src"</p>
<p>MT safe.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.2.7.6.7.5.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>element_name</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> describing the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> name</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>hsrc</p></td>
<td class="parameter_description"><p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> describing the harness srcpad.
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will not create a harness srcpad. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>hsink</p></td>
<td class="parameter_description"><p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> describing the harness sinkpad.
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> will not create a harness sinkpad. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.5.8"></a><h4>Returns</h4>
<p> a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the harness could
not be created. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-new"></a><h3>gst_harness_new ()</h3>
<pre class="programlisting"><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="returnvalue">GstHarness</span></a> *
gst_harness_new (<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *element_name</code></em>);</pre>
<p>Creates a new harness. Works like gst_harness_new_with_padnames, except it
assumes the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> sinkpad is named "sink" and srcpad is named "src"</p>
<p>MT safe.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.2.7.6.7.6.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>element_name</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> describing the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> name</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.6.8"></a><h4>Returns</h4>
<p> a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the harness could
not be created. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-new-parse"></a><h3>gst_harness_new_parse ()</h3>
<pre class="programlisting"><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="returnvalue">GstHarness</span></a> *
gst_harness_new_parse (<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *launchline</code></em>);</pre>
<p>Creates a new harness, parsing the <em class="parameter"><code>launchline</code></em>
and putting that in a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBin.html"><span class="type">GstBin</span></a>,
and then attches the harness to the bin.</p>
<p>MT safe.</p>
<p><span class="annotation">[<acronym title="Exposed in C code, not necessarily available in other languages."><span class="acronym">skip</span></acronym>]</span></p>
<div class="refsect3">
<a name="id-1.2.7.6.7.7.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>launchline</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> describing a gst-launch type line</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.7.8"></a><h4>Returns</h4>
<p> a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the harness could
not be created. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-teardown"></a><h3>gst_harness_teardown ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_harness_teardown (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>);</pre>
<p>Tears down a <em class="parameter"><code>GstHarness</code></em>
, freeing all resources allocated using it.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.8.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-add-element-src-pad"></a><h3>gst_harness_add_element_src_pad ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_harness_add_element_src_pad (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>,
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="type">GstPad</span></a> *srcpad</code></em>);</pre>
<p>Links the specifed <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="type">GstPad</span></a> the <em class="parameter"><code>GstHarness</code></em>
sinkpad. This can be useful if
perhaps the srcpad did not exist at the time of creating the harness,
like a demuxer that provides a sometimes-pad after receiving data.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.9.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>srcpad</p></td>
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="type">GstPad</span></a> to link to the harness sinkpad</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-add-element-sink-pad"></a><h3>gst_harness_add_element_sink_pad ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_harness_add_element_sink_pad (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>,
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="type">GstPad</span></a> *sinkpad</code></em>);</pre>
<p>Links the specifed <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="type">GstPad</span></a> the <em class="parameter"><code>GstHarness</code></em>
srcpad.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.10.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>sinkpad</p></td>
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="type">GstPad</span></a> to link to the harness srcpad</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-set-src-caps"></a><h3>gst_harness_set_src_caps ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_harness_set_src_caps (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>,
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *caps</code></em>);</pre>
<p>Sets the <em class="parameter"><code>GstHarness</code></em>
srcpad caps. This must be done before any buffers
can legally be pushed from the harness to the element.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.11.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>caps</p></td>
<td class="parameter_description"><p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> to set on the harness srcpad. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-set-sink-caps"></a><h3>gst_harness_set_sink_caps ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_harness_set_sink_caps (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>,
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *caps</code></em>);</pre>
<p>Sets the <em class="parameter"><code>GstHarness</code></em>
sinkpad caps.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.12.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>caps</p></td>
<td class="parameter_description"><p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> to set on the harness sinkpad. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-set-caps"></a><h3>gst_harness_set_caps ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_harness_set_caps (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>,
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *in</code></em>,
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> *out</code></em>);</pre>
<p>Sets the <em class="parameter"><code>GstHarness</code></em>
srcpad and sinkpad caps.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.13.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>in</p></td>
<td class="parameter_description"><p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> to set on the harness srcpad. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>out</p></td>
<td class="parameter_description"><p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> to set on the harness sinkpad. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-set-src-caps-str"></a><h3>gst_harness_set_src_caps_str ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_harness_set_src_caps_str (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>);</pre>
<p>Sets the <em class="parameter"><code>GstHarness</code></em>
srcpad caps using a string. This must be done before
any buffers can legally be pushed from the harness to the element.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.14.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>a <em class="parameter"><code>gchar</code></em>
describing a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> to set on the harness srcpad</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-set-sink-caps-str"></a><h3>gst_harness_set_sink_caps_str ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_harness_set_sink_caps_str (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *str</code></em>);</pre>
<p>Sets the <em class="parameter"><code>GstHarness</code></em>
sinkpad caps using a string.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.15.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>str</p></td>
<td class="parameter_description"><p>a <em class="parameter"><code>gchar</code></em>
describing a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> to set on the harness sinkpad</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-set-caps-str"></a><h3>gst_harness_set_caps_str ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_harness_set_caps_str (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *in</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *out</code></em>);</pre>
<p>Sets the <em class="parameter"><code>GstHarness</code></em>
srcpad and sinkpad caps using strings.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.16.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>in</p></td>
<td class="parameter_description"><p>a <em class="parameter"><code>gchar</code></em>
describing a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> to set on the harness srcpad</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out</p></td>
<td class="parameter_description"><p>a <em class="parameter"><code>gchar</code></em>
describing a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstCaps.html"><span class="type">GstCaps</span></a> to set on the harness sinkpad</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-use-systemclock"></a><h3>gst_harness_use_systemclock ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_harness_use_systemclock (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>);</pre>
<p>Sets the system <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html"><span class="type">GstClock</span></a> on the <em class="parameter"><code>GstHarness</code></em>
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.17.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-use-testclock"></a><h3>gst_harness_use_testclock ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_harness_use_testclock (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>);</pre>
<p>Sets the <a class="link" href="GstTestClock.html" title="GstTestClock"><span class="type">GstTestClock</span></a> on the <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a></p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.18.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-get-testclock"></a><h3>gst_harness_get_testclock ()</h3>
<pre class="programlisting"><a class="link" href="GstTestClock.html" title="GstTestClock"><span class="returnvalue">GstTestClock</span></a> *
gst_harness_get_testclock (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>);</pre>
<p>Get the <a class="link" href="GstTestClock.html" title="GstTestClock"><span class="type">GstTestClock</span></a>. Useful if specific operations on the testclock is
needed.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.19.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.19.7"></a><h4>Returns</h4>
<p> a <a class="link" href="GstTestClock.html" title="GstTestClock"><span class="type">GstTestClock</span></a>, or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the testclock is not
present. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-set-time"></a><h3>gst_harness_set_time ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_harness_set_time (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>,
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> time</code></em>);</pre>
<p>Advance the <a class="link" href="GstTestClock.html" title="GstTestClock"><span class="type">GstTestClock</span></a> to a specific time.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.20.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>time</p></td>
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> to advance the clock to</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.20.7"></a><h4>Returns</h4>
<p> a <em class="parameter"><code>gboolean</code></em>
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the time could be set. <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not.</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-wait-for-clock-id-waits"></a><h3>gst_harness_wait_for_clock_id_waits ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_harness_wait_for_clock_id_waits (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> waits</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> timeout</code></em>);</pre>
<p>Waits for <em class="parameter"><code>timeout</code></em>
seconds until <em class="parameter"><code>waits</code></em>
number of <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockID"><span class="type">GstClockID</span></a> waits is
registered with the <a class="link" href="GstTestClock.html" title="GstTestClock"><span class="type">GstTestClock</span></a>. Useful for writing deterministic tests,
where you want to make sure that an expected number of waits have been
reached.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.21.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>waits</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> describing the numbers of <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockID"><span class="type">GstClockID</span></a> registered with
the <a class="link" href="GstTestClock.html" title="GstTestClock"><span class="type">GstTestClock</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>timeout</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> describing how many seconds to wait for <em class="parameter"><code>waits</code></em>
to be true</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.21.7"></a><h4>Returns</h4>
<p> a <em class="parameter"><code>gboolean</code></em>
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the waits have been registered, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not.
(Could be that it timed out waiting or that more waits then waits was found)</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-crank-single-clock-wait"></a><h3>gst_harness_crank_single_clock_wait ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_harness_crank_single_clock_wait (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>);</pre>
<p>A "crank" consists of three steps:
1: Wait for a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockID"><span class="type">GstClockID</span></a> to be registered with the <a class="link" href="GstTestClock.html" title="GstTestClock"><span class="type">GstTestClock</span></a>.
2: Advance the <a class="link" href="GstTestClock.html" title="GstTestClock"><span class="type">GstTestClock</span></a> to the time the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockID"><span class="type">GstClockID</span></a> is waiting for.
3: Release the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockID"><span class="type">GstClockID</span></a> wait.
Together, this provides an easy way to not have to think about the details
around clocks and time, but still being able to write deterministic tests
that are dependant on this. A "crank" can be though of as the notion of
manually driving the clock forward to its next logical step.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.22.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.22.7"></a><h4>Returns</h4>
<p> a <em class="parameter"><code>gboolean</code></em>
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the "crank" was successful, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not.</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-crank-multiple-clock-waits"></a><h3>gst_harness_crank_multiple_clock_waits ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_harness_crank_multiple_clock_waits
(<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> waits</code></em>);</pre>
<p>Similar to gst_harness_crank_single_clock_wait, this is the function to use
if your harnessed element(s) are using more then one gst_clock_id_wait.
Failing to do so can (and will) make it racy which <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockID"><span class="type">GstClockID</span></a> you actually
are releasing, where as this function will process all the waits at the
same time, ensuring that one thread can't register another wait before
both are released.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.23.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>waits</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> describing the number of <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockID"><span class="type">GstClockIDs</span></a> to crank</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.23.7"></a><h4>Returns</h4>
<p> a <em class="parameter"><code>gboolean</code></em>
<a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the "crank" was successful, <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> if not.</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-play"></a><h3>gst_harness_play ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_harness_play (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>);</pre>
<p>This will set the harnessed <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> to <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html#GST-STATE-PLAYING:CAPS"><code class="literal">GST_STATE_PLAYING</code></a>.
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElements</span></a> without a sink-<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html"><span class="type">GstPad</span></a> and with the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html#GST-ELEMENT-FLAG-SOURCE:CAPS"><code class="literal">GST_ELEMENT_FLAG_SOURCE</code></a>
flag set is concidered a src <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a>
Non-src <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElements</span></a> (like sinks and filters) are automatically set to
playing by the <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a>, but src <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElements</span></a> are not to avoid them
starting to produce buffers.
Hence, for src <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> you will need to call gst_harness_play explicitly.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.24.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-set-blocking-push-mode"></a><h3>gst_harness_set_blocking_push_mode ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_harness_set_blocking_push_mode (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>);</pre>
<p>Setting this will make the harness block in the chain-function, and
then release when gst_harness_pull or gst_harness_try_pull is called.
Can be useful when wanting to control a src-element that is not implementing
gst_clock_id_wait so it can't be controlled by the <a class="link" href="GstTestClock.html" title="GstTestClock"><span class="type">GstTestClock</span></a>, since
it otherwise would produce buffers as fast as possible.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.25.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-set-forwarding"></a><h3>gst_harness_set_forwarding ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_harness_set_forwarding (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> forwarding</code></em>);</pre>
<p>As a convenience, a src-harness will forward <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstEvent.html#GST-EVENT-STREAM-START:CAPS"><code class="literal">GST_EVENT_STREAM_START</code></a>,
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstEvent.html#GST-EVENT-CAPS"><code class="literal">GST_EVENT_CAPS</code></a> and <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstEvent.html#GST-EVENT-SEGMENT:CAPS"><code class="literal">GST_EVENT_SEGMENT</code></a> to the main-harness if forwarding
is enabled, and forward any sticky-events from the main-harness to
the sink-harness. It will also forward the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstQuery.html#GST-QUERY-ALLOCATION:CAPS"><code class="literal">GST_QUERY_ALLOCATION</code></a>.</p>
<p>If forwarding is disabled, the user will have to either manually push
these events from the src-harness using gst_harness_src_push_event, or
create and push them manually. While this will allow full control and
inspection of these events, for the most cases having forwarding enabled
will be sufficient when writing a test where the src-harness' main function
is providing data for the main-harness.</p>
<p>Forwarding is enabled by default.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.26.8"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>forwarding</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> to enable/disable forwarding</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-create-buffer"></a><h3>gst_harness_create_buffer ()</h3>
<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="returnvalue">GstBuffer</span></a> *
gst_harness_create_buffer (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>);</pre>
<p>Allocates a buffer using a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBufferPool.html"><span class="type">GstBufferPool</span></a> if present, or else using the
configured <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstAllocator.html"><span class="type">GstAllocator</span></a> and <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstAllocator.html#GstAllocationParams"><span class="type">GstAllocationParams</span></a></p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.27.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>size</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gsize"><span class="type">gsize</span></a> specifying the size of the buffer</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.27.7"></a><h4>Returns</h4>
<p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> of size <em class="parameter"><code>size</code></em>
</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-push"></a><h3>gst_harness_push ()</h3>
<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="returnvalue">GstFlowReturn</span></a>
gst_harness_push (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>,
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
<p>Pushes a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> on the <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> srcpad. The standard way of
interacting with an harnessed element.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.28.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> to push</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.28.7"></a><h4>Returns</h4>
<p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstPad.html#GstFlowReturn"><span class="type">GstFlowReturn</span></a> with the result from the push</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-pull"></a><h3>gst_harness_pull ()</h3>
<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="returnvalue">GstBuffer</span></a> *
gst_harness_pull (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>);</pre>
<p>Pulls a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> from the <a href="https://developer.gnome.org/glib/unstable/glib-Asynchronous-Queues.html#GAsyncQueue"><span class="type">GAsyncQueue</span></a> on the <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> sinkpad. The pull
will timeout in 60 seconds. This is the standard way of getting a buffer
from a harnessed <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a>.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.29.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.29.7"></a><h4>Returns</h4>
<p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if timed out.</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-try-pull"></a><h3>gst_harness_try_pull ()</h3>
<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="returnvalue">GstBuffer</span></a> *
gst_harness_try_pull (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>);</pre>
<p>Pulls a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> from the <a href="https://developer.gnome.org/glib/unstable/glib-Asynchronous-Queues.html#GAsyncQueue"><span class="type">GAsyncQueue</span></a> on the <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> sinkpad. Unlike
gst_harness_pull this will not wait for any buffers if not any are present,
and return <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> straight away.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.30.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.30.7"></a><h4>Returns</h4>
<p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if no buffers are present in the <a href="https://developer.gnome.org/glib/unstable/glib-Asynchronous-Queues.html#GAsyncQueue"><span class="type">GAsyncQueue</span></a></p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-push-and-pull"></a><h3>gst_harness_push_and_pull ()</h3>
<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="returnvalue">GstBuffer</span></a> *
gst_harness_push_and_pull (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>,
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> *buffer</code></em>);</pre>
<p>Basically a gst_harness_push and a gst_harness_pull in one line. Reflects
the fact that you often want to do exactly this in your test: Push one buffer
in, and inspect the outcome.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.31.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>buffer</p></td>
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> to push</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.31.7"></a><h4>Returns</h4>
<p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> or <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if timed out.</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-buffers-received"></a><h3>gst_harness_buffers_received ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
gst_harness_buffers_received (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>);</pre>
<p>The total number of <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffers</span></a> that has arrived on the <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> sinkpad.
This number includes buffers that have been dropped as well as buffers
that have already been pulled out.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.32.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.32.7"></a><h4>Returns</h4>
<p> a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> number of buffers received</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-buffers-in-queue"></a><h3>gst_harness_buffers_in_queue ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="returnvalue">guint</span></a>
gst_harness_buffers_in_queue (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>);</pre>
<p>The number of <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffers</span></a> currently in the <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> sinkpad <a href="https://developer.gnome.org/glib/unstable/glib-Asynchronous-Queues.html#GAsyncQueue"><span class="type">GAsyncQueue</span></a></p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.33.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.33.7"></a><h4>Returns</h4>
<p> a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#guint"><span class="type">guint</span></a> number of buffers in the queue</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-set-drop-buffers"></a><h3>gst_harness_set_drop_buffers ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_harness_set_drop_buffers (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>,
<em class="parameter"><code><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> drop_buffers</code></em>);</pre>
<p>When set to <a href="https://developer.gnome.org/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a>, instead of placing the buffers arriving from the harnessed
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstElement.html"><span class="type">GstElement</span></a> inside the sinkpads <a href="https://developer.gnome.org/glib/unstable/glib-Asynchronous-Queues.html#GAsyncQueue"><span class="type">GAsyncQueue</span></a>, they are instead unreffed.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.34.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>drop_buffers</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> specifying to drop outgoing buffers or not</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-dump-to-file"></a><h3>gst_harness_dump_to_file ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_harness_dump_to_file (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>,
<em class="parameter"><code>const <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *filename</code></em>);</pre>
<p>Allows you to dump the <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffers</span></a> the <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> sinkpad <a href="https://developer.gnome.org/glib/unstable/glib-Asynchronous-Queues.html#GAsyncQueue"><span class="type">GAsyncQueue</span></a>
to a file.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.35.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p>a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> with a the name of a file</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-get-last-pushed-timestamp"></a><h3>gst_harness_get_last_pushed_timestamp ()</h3>
<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="returnvalue">GstClockTime</span></a>
gst_harness_get_last_pushed_timestamp (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>);</pre>
<p>Get the timestamp of the last <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> pushed on the <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> srcpad,
typically with gst_harness_push or gst_harness_push_from_src.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.36.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.36.7"></a><h4>Returns</h4>
<p> a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GstClockTime"><span class="type">GstClockTime</span></a> with the timestamp or <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstClock.html#GST-CLOCK-TIME-NONE:CAPS"><code class="literal">GST_CLOCK_TIME_NONE</code></a> if no
<a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstBuffer.html"><span class="type">GstBuffer</span></a> has been pushed on the <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> srcpad</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-push-event"></a><h3>gst_harness_push_event ()</h3>
<pre class="programlisting"><a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
gst_harness_push_event (<em class="parameter"><code><a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> *h</code></em>,
<em class="parameter"><code><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstEvent.html"><span class="type">GstEvent</span></a> *event</code></em>);</pre>
<p>Pushes an <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstEvent.html"><span class="type">GstEvent</span></a> on the <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> srcpad.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="id-1.2.7.6.7.37.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>h</p></td>
<td class="parameter_description"><p>a <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>event</p></td>
<td class="parameter_description"><p>a <a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstEvent.html"><span class="type">GstEvent</span></a> to push</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.7.6.7.37.7"></a><h4>Returns</h4>
<p> a <a href="https://developer.gnome.org/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> with the result from the push</p>
</div>
<p class="since">Since: <a class="link" href="ix03.html#api-index-1.6">1.6</a></p>
</div>
<hr>
<div class="refsect2">
<a name="gst-harness-pull-event"></a><h3>gst_harness_pull_event ()</h3>
<pre class="programlisting"><a href="http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/GstEvent.html"><span class="returnvalue">GstEvent<