blob: 24acc86de5ceda7074b8f98909f732bb2225563b [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.79.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.25 (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 class="informaltable" 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-empty" title="gst_harness_new_empty ()">gst_harness_new_empty</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-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-add-element-full" title="gst_harness_add_element_full ()">gst_harness_add_element_full</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-parse" title="gst_harness_add_parse ()">gst_harness_add_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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="../html/GstBuffer.html#GstBuffer-struct"><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="../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="../html/GstBuffer.html#GstBuffer-struct"><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="../html/GstBuffer.html#GstBuffer-struct"><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="../html/GstBuffer.html#GstBuffer-struct"><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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="../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="/usr/share/gtk-doc/html/glibglib-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="../html/GstEvent.html#GstEvent-struct"><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="../html/GstEvent.html#GstEvent-struct"><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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="../html/GstEvent.html#GstEvent-struct"><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="../html/GstEvent.html#GstEvent-struct"><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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="../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="../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="../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="/usr/share/gtk-doc/html/glibglib-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="../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="../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="../html/GstElement.html#GstElement-struct"><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="/usr/share/gtk-doc/html/glibglib-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="../html/GstBuffer.html#GstBuffer-struct"><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="function_type">
<a href="../html/GstEvent.html#GstEvent-struct"><span class="returnvalue">GstEvent</span></a> *
</td>
<td class="function_name">
<span class="c_punctuation">(</span><a class="link" href="gstreamer-libs-GstHarness.html#GstHarnessPrepareEventFunc" title="GstHarnessPrepareEventFunc ()">*GstHarnessPrepareEventFunc</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-event-with-cb-start" title="gst_harness_stress_push_event_with_cb_start()">gst_harness_stress_push_event_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-event-with-cb-start-full" title="gst_harness_stress_push_event_with_cb_start_full ()">gst_harness_stress_push_event_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-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-send-upstream-event-with-cb-start" title="gst_harness_stress_send_upstream_event_with_cb_start()">gst_harness_stress_send_upstream_event_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-upstream-event-with-cb-start-full" title="gst_harness_stress_push_upstream_event_with_cb_start_full ()">gst_harness_stress_push_upstream_event_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-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 class="informaltable" 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 meant to make writing unit test for GStreamer much easier.
It can be thought of as a way of treating a <a href="../html/GstElement.html#GstElement-struct"><span class="type">GstElement</span></a> as a black box,
deterministically 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="../html/GstPad.html#GstPad-struct"><span class="type">GstPads</span></a> that connect
to the harnessed <a href="../html/GstElement.html#GstElement-struct"><span class="type">GstElement</span></a> src and sink <a href="../html/GstPad.html#GstPad-struct"><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="../html/GstElement.html#GstElement-struct"><span class="type">GstElement</span></a> might find
itself in. By specifying the <a href="../html/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> of the harness <a href="../html/GstPad.html#GstPad-struct"><span class="type">GstPads</span></a>, using
functions like <a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-set-src-caps" title="gst_harness_set_src_caps ()"><code class="function">gst_harness_set_src_caps()</code></a> or <a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-set-sink-caps-str" title="gst_harness_set_sink_caps_str ()"><code class="function">gst_harness_set_sink_caps_str()</code></a>,
you can test how the <a href="../html/GstElement.html#GstElement-struct"><span class="type">GstElement</span></a> interacts with different caps sets.</p>
<p>Your harnessed <a href="../html/GstElement.html#GstElement-struct"><span class="type">GstElement</span></a> can of course also be a bin, and using
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-new-parse" title="gst_harness_new_parse ()"><code class="function">gst_harness_new_parse()</code></a> 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="../html/GstBuffer.html#GstBuffer-struct"><span class="type">GstBuffers</span></a> and <a href="../html/GstEvent.html#GstEvent-struct"><span class="type">GstEvents</span></a> on to the srcpad,
using functions like <a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-push" title="gst_harness_push ()"><code class="function">gst_harness_push()</code></a> and <a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-push-event" title="gst_harness_push_event ()"><code class="function">gst_harness_push_event()</code></a>, and
then pull them out to examine them with <a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-pull" title="gst_harness_pull ()"><code class="function">gst_harness_pull()</code></a> and
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-pull-event" title="gst_harness_pull_event ()"><code class="function">gst_harness_pull_event()</code></a>.</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="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="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="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="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="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="../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="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="../html/GstClock.html#GstClockID"><span class="type">GstClockID</span></a>
that is waiting, with functions like <a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-crank-single-clock-wait" title="gst_harness_crank_single_clock_wait ()"><code class="function">gst_harness_crank_single_clock_wait()</code></a>.</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 <a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-add-src" title="gst_harness_add_src ()"><code class="function">gst_harness_add_src()</code></a> or
<a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-add-sink-parse" title="gst_harness_add_sink_parse ()"><code class="function">gst_harness_add_sink_parse()</code></a>. 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="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="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="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-empty"></a><h3>gst_harness_new_empty ()</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_empty (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Creates a new empty harness. Use <a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-add-element-full" title="gst_harness_add_element_full ()"><code class="function">gst_harness_add_element_full()</code></a> to add
an <a href="../html/GstElement.html#GstElement-struct"><span class="type">GstElement</span></a> to it.</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="gst-harness-new-empty.returns"></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="/usr/share/gtk-doc/html/glibglib-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: 1.8</p>
</div>
<hr>
<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="../html/GstElement.html#GstElement-struct"><span class="type">GstElement</span></a> *element</code></em>,
<em class="parameter"><code><a href="../html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> *hsrc</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *element_sinkpad_name</code></em>,
<em class="parameter"><code><a href="../html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> *hsink</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-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="gst-harness-new-full.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="../html/GstElement.html#GstElement-struct"><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="../html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> describing the harness srcpad.
<a href="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="../html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> describing the harness sinkpad.
<a href="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="gst-harness-new-full.returns"></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="/usr/share/gtk-doc/html/glibglib-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="../html/GstElement.html#GstElement-struct"><span class="type">GstElement</span></a> *element</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *element_sinkpad_name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-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 <a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-new-full" title="gst_harness_new_full ()"><code class="function">gst_harness_new_full()</code></a>, 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="gst-harness-new-with-element.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="../html/GstElement.html#GstElement-struct"><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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="gst-harness-new-with-element.returns"></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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *element_name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *element_sinkpad_name</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *element_srcpad_name</code></em>);</pre>
<p>Creates a new harness. Works like <a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-new-with-element" title="gst_harness_new_with_element ()"><code class="function">gst_harness_new_with_element()</code></a>,
except you specify the factoryname of the <a href="../html/GstElement.html#GstElement-struct"><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="gst-harness-new-with-padnames.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> describing the <a href="../html/GstElement.html#GstElement-struct"><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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="gst-harness-new-with-padnames.returns"></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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *element_name</code></em>,
<em class="parameter"><code><a href="../html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> *hsrc</code></em>,
<em class="parameter"><code><a href="../html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> *hsink</code></em>);</pre>
<p>Creates a new harness, like <a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-new-full" title="gst_harness_new_full ()"><code class="function">gst_harness_new_full()</code></a>, except it
assumes the <a href="../html/GstElement.html#GstElement-struct"><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="gst-harness-new-with-templates.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> describing the <a href="../html/GstElement.html#GstElement-struct"><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="../html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> describing the harness srcpad.
<a href="/usr/share/gtk-doc/html/glibglib-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="../html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> describing the harness sinkpad.
<a href="/usr/share/gtk-doc/html/glibglib-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="gst-harness-new-with-templates.returns"></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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *element_name</code></em>);</pre>
<p>Creates a new harness. Works like <a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-new-with-padnames" title="gst_harness_new_with_padnames ()"><code class="function">gst_harness_new_with_padnames()</code></a>, except it
assumes the <a href="../html/GstElement.html#GstElement-struct"><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="gst-harness-new.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> describing the <a href="../html/GstElement.html#GstElement-struct"><span class="type">GstElement</span></a> name</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gst-harness-new.returns"></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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="../html/GstBin.html#GstBin-struct"><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="gst-harness-new-parse.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="/usr/share/gtk-doc/html/glibglib-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="gst-harness-new-parse.returns"></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="/usr/share/gtk-doc/html/glibglib-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-add-element-full"></a><h3>gst_harness_add_element_full ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_harness_add_element_full (<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="../html/GstElement.html#GstElement-struct"><span class="type">GstElement</span></a> *element</code></em>,
<em class="parameter"><code><a href="../html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> *hsrc</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *element_sinkpad_name</code></em>,
<em class="parameter"><code><a href="../html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> *hsink</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *element_srcpad_name</code></em>);</pre>
<p>Adds a <a href="../html/GstElement.html#GstElement-struct"><span class="type">GstElement</span></a> to an empty <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</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="gst-harness-add-element-full.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>element</p></td>
<td class="parameter_description"><p>a <a href="../html/GstElement.html#GstElement-struct"><span class="type">GstElement</span></a> to add to the harness (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="../html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> describing the harness srcpad.
<a href="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="../html/GstPadTemplate.html#GstStaticPadTemplate"><span class="type">GstStaticPadTemplate</span></a> describing the harness sinkpad.
<a href="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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>
<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-parse"></a><h3>gst_harness_add_parse ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gst_harness_add_parse (<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="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *launchline</code></em>);</pre>
<p>Parses the <em class="parameter"><code>launchline</code></em>
and puts that in a <a href="../html/GstBin.html#GstBin-struct"><span class="type">GstBin</span></a>,
and then attches the supplied <a class="link" href="gstreamer-libs-GstHarness.html#GstHarness" title="struct GstHarness"><span class="type">GstHarness</span></a> 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="gst-harness-add-parse.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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>launchline</p></td>
<td class="parameter_description"><p>a <a href="/usr/share/gtk-doc/html/glibglib-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>
<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="gst-harness-teardown.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="../html/GstPad.html#GstPad-struct"><span class="type">GstPad</span></a> *srcpad</code></em>);</pre>
<p>Links the specifed <a href="../html/GstPad.html#GstPad-struct"><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="gst-harness-add-element-src-pad.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="../html/GstPad.html#GstPad-struct"><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="../html/GstPad.html#GstPad-struct"><span class="type">GstPad</span></a> *sinkpad</code></em>);</pre>
<p>Links the specifed <a href="../html/GstPad.html#GstPad-struct"><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="gst-harness-add-element-sink-pad.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="../html/GstPad.html#GstPad-struct"><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="../html/GstCaps.html#GstCaps-struct"><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="gst-harness-set-src-caps.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="../html/GstCaps.html#GstCaps-struct"><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="../html/GstCaps.html#GstCaps-struct"><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="gst-harness-set-sink-caps.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="../html/GstCaps.html#GstCaps-struct"><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="../html/GstCaps.html#GstCaps-struct"><span class="type">GstCaps</span></a> *in</code></em>,
<em class="parameter"><code><a href="../html/GstCaps.html#GstCaps-struct"><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="gst-harness-set-caps.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="../html/GstCaps.html#GstCaps-struct"><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="../html/GstCaps.html#GstCaps-struct"><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="/usr/share/gtk-doc/html/glibglib-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="gst-harness-set-src-caps-str.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="../html/GstCaps.html#GstCaps-struct"><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="/usr/share/gtk-doc/html/glibglib-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="gst-harness-set-sink-caps-str.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="../html/GstCaps.html#GstCaps-struct"><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="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *in</code></em>,
<em class="parameter"><code>const <a href="/usr/share/gtk-doc/html/glibglib-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="gst-harness-set-caps-str.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="../html/GstCaps.html#GstCaps-struct"><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="../html/GstCaps.html#GstCaps-struct"><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="../html/GstClock.html#GstClock-struct"><span class="type">GstClock</span></a> on the <em class="parameter"><code>GstHarness</code></em>
<a href="../html/GstElement.html#GstElement-struct"><span class="type">GstElement</span></a></p>
<p>MT safe.</p>
<div class="refsect3">
<a name="gst-harness-use-systemclock.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="../html/GstElement.html#GstElement-struct"><span class="type">GstElement</span></a></p>
<p>MT safe.</p>
<div class="refsect3">
<a name="gst-harness-use-testclock.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="gst-harness-get-testclock.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="gst-harness-get-testclock.returns"></a><h4>Returns</h4>
<p> a <a class="link" href="GstTestClock.html" title="GstTestClock"><span class="type">GstTestClock</span></a>, or <a href="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="../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="gst-harness-set-time.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="../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="gst-harness-set-time.returns"></a><h4>Returns</h4>
<p> a <em class="parameter"><code>gboolean</code></em>
<a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the time could be set. <a href="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> waits</code></em>,
<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glibglib-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="../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="gst-harness-wait-for-clock-id-waits.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> describing the numbers of <a href="../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="/usr/share/gtk-doc/html/glibglib-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="gst-harness-wait-for-clock-id-waits.returns"></a><h4>Returns</h4>
<p> a <em class="parameter"><code>gboolean</code></em>
<a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the waits have been registered, <a href="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="../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="../html/GstClock.html#GstClockID"><span class="type">GstClockID</span></a> is waiting for.
3: Release the <a href="../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="gst-harness-crank-single-clock-wait.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="gst-harness-crank-single-clock-wait.returns"></a><h4>Returns</h4>
<p> a <em class="parameter"><code>gboolean</code></em>
<a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the "crank" was successful, <a href="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-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="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> waits</code></em>);</pre>
<p>Similar to <a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-crank-single-clock-wait" title="gst_harness_crank_single_clock_wait ()"><code class="function">gst_harness_crank_single_clock_wait()</code></a>, 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="../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="gst-harness-crank-multiple-clock-waits.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#guint"><span class="type">guint</span></a> describing the number of <a href="../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="gst-harness-crank-multiple-clock-waits.returns"></a><h4>Returns</h4>
<p> a <em class="parameter"><code>gboolean</code></em>
<a href="/usr/share/gtk-doc/html/glibglib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the "crank" was successful, <a href="/usr/share/gtk-doc/html/glibglib-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="../html/GstElement.html#GstElement-struct"><span class="type">GstElement</span></a> to <a href="../html/GstElement.html#GST-STATE-PLAYING:CAPS"><code class="literal">GST_STATE_PLAYING</code></a>.
<a href="../html/GstElement.html#GstElement-struct"><span class="type">GstElements</span></a> without a sink-<a href="../html/GstPad.html#GstPad-struct"><span class="type">GstPad</span></a> and with the <a href="../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="../html/GstElement.html#GstElement-struct"><span class="type">GstElement</span></a>
Non-src <a href="../html/GstElement.html#GstElement-struct"><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="../html/GstElement.html#GstElement-struct"><span class="type">GstElements</span></a> are not to avoid them
starting to produce buffers.
Hence, for src <a href="../html/GstElement.html#GstElement-struct"><span class="type">GstElement</span></a> you must call <a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-play" title="gst_harness_play ()"><code class="function">gst_harness_play()</code></a> explicitly.</p>
<p>MT safe.</p>
<div class="refsect3">
<a name="gst-harness-play.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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 <a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-pull" title="gst_harness_pull ()"><code class="function">gst_harness_pull()</code></a> or <a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-try-pull" title="gst_harness_try_pull ()"><code class="function">gst_harness_try_pull()</code></a> is called.
Can be useful when wanting to control a src-element that is not implementing
<a href="../html/GstClock.html#gst-clock-id-wait"><code class="function">gst_clock_id_wait()</code></a> 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="gst-harness-set-blocking-push-mode.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="/usr/share/gtk-doc/html/glibglib-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="../html/GstEvent.html#GST-EVENT-STREAM-START:CAPS"><code class="literal">GST_EVENT_STREAM_START</code></a>,
<a href="../html/GstEvent.html#GST-EVENT-CAPS"><code class="literal">GST_EVENT_CAPS</code></a> and <a href="../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="../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 <a class="link" href="gstreamer-libs-GstHarness.html#gst-harness-src-push-event" title="gst_harness_src_push_event ()"><code class="function">gst_harness_src_push_event()</code></a>, 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="gst-harness-set-forwarding.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" 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="/usr/share/gtk-doc/html/glibglib-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="../html/GstBuffer.html#GstBuffer-struct"><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="/usr/share/gtk-doc/html/glibglib-Basic-Types.html#gsize"><span class="type">gsize</span></a> size</code></em>);</pre>
<p>Allocates a buffer using a <a href="../html/GstBufferPool.html#GstBufferPool-struct"><span class="type">GstBufferPool</span></a> if present, or else using the
configured <a href="../html/GstAllocator.html#GstAllocator-struct"><span class="type">GstAllocator</span></a> and <a href="../html/GstAllocator.html#GstAllocationParams-struct"><span class="type">GstAllocationParams</span></a></p>
<p>MT safe.</p>
<div class="refsect3">
<a name="gst-harness-create-buffer.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parame