<?xml version="1.0"?>
<!-- This file was automatically generated from C sources - DO NOT EDIT!
To affect the contents of this file, edit the original C definitions,
and/or use gtk-doc annotations.  -->
<repository version="1.2"
            xmlns="http://www.gtk.org/introspection/core/1.0"
            xmlns:c="http://www.gtk.org/introspection/c/1.0"
            xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
  <include name="Gst" version="1.0"/>
  <package name="gstreamer-check-1.0"/>
  <c:include name="gst/check/check.h"/>
  <namespace name="GstCheck"
             version="1.0"
             shared-library="libgstcheck-1.0.so.0"
             c:identifier-prefixes="Gst"
             c:symbol-prefixes="gst">
    <record name="CheckABIStruct" c:type="GstCheckABIStruct">
      <field name="name" writable="1">
        <type name="utf8" c:type="const char*"/>
      </field>
      <field name="size" writable="1">
        <type name="gint" c:type="int"/>
      </field>
      <field name="abi_size" writable="1">
        <type name="gint" c:type="int"/>
      </field>
    </record>
    <record name="StreamConsistency"
            c:type="GstStreamConsistency"
            disguised="1">
      <doc xml:space="preserve">Opaque consistency checker handle.</doc>
    </record>
    <class name="TestClock"
           c:symbol-prefix="test_clock"
           c:type="GstTestClock"
           version="1.2"
           parent="Gst.Clock"
           glib:type-name="GstTestClock"
           glib:get-type="gst_test_clock_get_type"
           glib:type-struct="TestClockClass">
      <doc xml:space="preserve">GstTestClock is an implementation of #GstClock which has different
behaviour compared to #GstSystemClock. Time for #GstSystemClock advances
according to the system time, while time for #GstTestClock changes only
when gst_test_clock_set_time() or gst_test_clock_advance_time() are
called. #GstTestClock provides unit tests with the possibility to
precisely advance the time in a deterministic manner, independent of the
system time or any other external factors.

&lt;example&gt;
&lt;title&gt;Advancing the time of a #GstTestClock&lt;/title&gt;
  &lt;programlisting language="c"&gt;
  #include &amp;lt;gst/gst.h&amp;gt;
  #include &amp;lt;gst/check/gsttestclock.h&amp;gt;

  GstClock *clock;
  GstTestClock *test_clock;

  clock = gst_test_clock_new ();
  test_clock = GST_TEST_CLOCK (clock);
  GST_INFO ("Time: %" GST_TIME_FORMAT, GST_TIME_ARGS (gst_clock_get_time (clock)));
  gst_test_clock_advance_time ( test_clock, 1 * GST_SECOND);
  GST_INFO ("Time: %" GST_TIME_FORMAT, GST_TIME_ARGS (gst_clock_get_time (clock)));
  g_usleep (10 * G_USEC_PER_SEC);
  GST_INFO ("Time: %" GST_TIME_FORMAT, GST_TIME_ARGS (gst_clock_get_time (clock)));
  gst_test_clock_set_time (test_clock, 42 * GST_SECOND);
  GST_INFO ("Time: %" GST_TIME_FORMAT, GST_TIME_ARGS (gst_clock_get_time (clock)));
  ...
  &lt;/programlisting&gt;
&lt;/example&gt;

#GstClock allows for setting up single shot or periodic clock notifications
as well as waiting for these notifications synchronously (using
gst_clock_id_wait()) or asynchronously (using gst_clock_id_wait_async() or
gst_clock_id_wait_async()). This is used by many GStreamer elements,
among them #GstBaseSrc and #GstBaseSink.

#GstTestClock keeps track of these clock notifications. By calling
gst_test_clock_wait_for_next_pending_id() or
gst_test_clock_wait_for_multiple_pending_ids() a unit tests may wait for the
next one or several clock notifications to be requested. Additionally unit
tests may release blocked waits in a controlled fashion by calling
gst_test_clock_process_next_clock_id(). This way a unit test can control the
inaccuracy (jitter) of clock notifications, since the test can decide to
release blocked waits when the clock time has advanced exactly to, or past,
the requested clock notification time.

There are also interfaces for determining if a notification belongs to a
#GstTestClock or not, as well as getting the number of requested clock
notifications so far.

N.B.: When a unit test waits for a certain amount of clock notifications to
be requested in gst_test_clock_wait_for_next_pending_id() or
gst_test_clock_wait_for_multiple_pending_ids() then these functions may block
for a long time. If they block forever then the expected clock notifications
were never requested from #GstTestClock, and so the assumptions in the code
of the unit test are wrong. The unit test case runner in gstcheck is
expected to catch these cases either by the default test case timeout or the
one set for the unit test by calling tcase_set_timeout\(\).

The sample code below assumes that the element under test will delay a
buffer pushed on the source pad by some latency until it arrives on the sink
pad. Moreover it is assumed that the element will at some point call
gst_clock_id_wait() to synchronously wait for a specific time. The first
buffer sent will arrive exactly on time only delayed by the latency. The
second buffer will arrive a little late (7ms) due to simulated jitter in the
clock notification.

&lt;example&gt;
&lt;title&gt;Demonstration of how to work with clock notifications and #GstTestClock&lt;/title&gt;
  &lt;programlisting language="c"&gt;
  #include &amp;lt;gst/gst.h&amp;gt;
  #include &amp;lt;gst/check/gstcheck.h&amp;gt;
  #include &amp;lt;gst/check/gsttestclock.h&amp;gt;

  GstClockTime latency;
  GstElement *element;
  GstPad *srcpad;
  GstClock *clock;
  GstTestClock *test_clock;
  GstBuffer buf;
  GstClockID pending_id;
  GstClockID processed_id;

  latency = 42 * GST_MSECOND;
  element = create_element (latency, ...);
  srcpad = get_source_pad (element);

  clock = gst_test_clock_new ();
  test_clock = GST_TEST_CLOCK (clock);
  gst_element_set_clock (element, clock);

  GST_INFO ("Set time, create and push the first buffer\n");
  gst_test_clock_set_time (test_clock, 0);
  buf = create_test_buffer (gst_clock_get_time (clock), ...);
  gst_assert_cmpint (gst_pad_push (srcpad, buf), ==, GST_FLOW_OK);

  GST_INFO ("Block until element is waiting for a clock notification\n");
  gst_test_clock_wait_for_next_pending_id (test_clock, &amp;pending_id);
  GST_INFO ("Advance to the requested time of the clock notification\n");
  gst_test_clock_advance_time (test_clock, latency);
  GST_INFO ("Release the next blocking wait and make sure it is the one from element\n");
  processed_id = gst_test_clock_process_next_clock_id (test_clock);
  g_assert (processed_id == pending_id);
  g_assert_cmpint (GST_CLOCK_ENTRY_STATUS (processed_id), ==, GST_CLOCK_OK);
  gst_clock_id_unref (pending_id);
  gst_clock_id_unref (processed_id);

  GST_INFO ("Validate that element produced an output buffer and check its timestamp\n");
  g_assert_cmpint (get_number_of_output_buffer (...), ==, 1);
  buf = get_buffer_pushed_by_element (element, ...);
  g_assert_cmpint (GST_BUFFER_TIMESTAMP (buf), ==, latency);
  gst_buffer_unref (buf);
  GST_INFO ("Check that element does not wait for any clock notification\n");
  g_assert (gst_test_clock_peek_next_pending_id (test_clock, NULL) == FALSE);

  GST_INFO ("Set time, create and push the second buffer\n");
  gst_test_clock_advance_time (test_clock, 10 * GST_SECOND);
  buf = create_test_buffer (gst_clock_get_time (clock), ...);
  gst_assert_cmpint (gst_pad_push (srcpad, buf), ==, GST_FLOW_OK);

  GST_INFO ("Block until element is waiting for a new clock notification\n");
  (gst_test_clock_wait_for_next_pending_id (test_clock, &amp;pending_id);
  GST_INFO ("Advance past 7ms beyond the requested time of the clock notification\n");
  gst_test_clock_advance_time (test_clock, latency + 7 * GST_MSECOND);
  GST_INFO ("Release the next blocking wait and make sure it is the one from element\n");
  processed_id = gst_test_clock_process_next_clock_id (test_clock);
  g_assert (processed_id == pending_id);
  g_assert_cmpint (GST_CLOCK_ENTRY_STATUS (processed_id), ==, GST_CLOCK_OK);
  gst_clock_id_unref (pending_id);
  gst_clock_id_unref (processed_id);

  GST_INFO ("Validate that element produced an output buffer and check its timestamp\n");
  g_assert_cmpint (get_number_of_output_buffer (...), ==, 1);
  buf = get_buffer_pushed_by_element (element, ...);
  g_assert_cmpint (GST_BUFFER_TIMESTAMP (buf), ==,
      10 * GST_SECOND + latency + 7 * GST_MSECOND);
  gst_buffer_unref (buf);
  GST_INFO ("Check that element does not wait for any clock notification\n");
  g_assert (gst_test_clock_peek_next_pending_id (test_clock, NULL) == FALSE);
  ...
  &lt;/programlisting&gt;
&lt;/example&gt;

Since #GstTestClock is only supposed to be used in unit tests it calls
g_assert(), g_assert_cmpint() or g_assert_cmpuint() to validate all function
arguments. This will highlight any issues with the unit test code itself.</doc>
      <constructor name="new" c:identifier="gst_test_clock_new" version="1.2">
        <doc xml:space="preserve">Creates a new test clock with its time set to zero.

MT safe.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">a #GstTestClock cast to #GstClock.</doc>
          <type name="Gst.Clock" c:type="GstClock*"/>
        </return-value>
      </constructor>
      <constructor name="new_with_start_time"
                   c:identifier="gst_test_clock_new_with_start_time"
                   version="1.2">
        <doc xml:space="preserve">Creates a new test clock with its time set to the specified time.

MT safe.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">a #GstTestClock cast to #GstClock.</doc>
          <type name="Gst.Clock" c:type="GstClock*"/>
        </return-value>
        <parameters>
          <parameter name="start_time" transfer-ownership="none">
            <doc xml:space="preserve">a #GstClockTime set to the desired start time of the clock.</doc>
            <type name="Gst.ClockTime" c:type="GstClockTime"/>
          </parameter>
        </parameters>
      </constructor>
      <function name="id_list_get_latest_time"
                c:identifier="gst_test_clock_id_list_get_latest_time"
                version="1.4">
        <doc xml:space="preserve">Finds the latest time inside the list.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <type name="Gst.ClockTime" c:type="GstClockTime"/>
        </return-value>
        <parameters>
          <parameter name="pending_list"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">List
    of of pending #GstClockIDs</doc>
            <type name="GLib.List" c:type="const GList*">
              <type name="Gst.ClockID"/>
            </type>
          </parameter>
        </parameters>
      </function>
      <method name="advance_time"
              c:identifier="gst_test_clock_advance_time"
              version="1.2">
        <doc xml:space="preserve">Advances the time of the @test_clock by the amount given by @delta. The
time of @test_clock is monotonically increasing, therefore providing a
@delta which is negative or zero is a programming error.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">a #GstTestClock for which to increase the time</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
          <parameter name="delta" transfer-ownership="none">
            <doc xml:space="preserve">a positive #GstClockTimeDiff to be added to the time of the clock</doc>
            <type name="Gst.ClockTimeDiff" c:type="GstClockTimeDiff"/>
          </parameter>
        </parameters>
      </method>
      <method name="get_next_entry_time"
              c:identifier="gst_test_clock_get_next_entry_time"
              version="1.2">
        <doc xml:space="preserve">Retrieve the requested time for the next pending clock notification.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">a #GstClockTime set to the time of the next pending clock
notification. If no clock notifications have been requested
%GST_CLOCK_TIME_NONE will be returned.</doc>
          <type name="Gst.ClockTime" c:type="GstClockTime"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">a #GstTestClock to fetch the next clock notification time for</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="has_id" c:identifier="gst_test_clock_has_id" version="1.2">
        <doc xml:space="preserve">Checks whether @test_clock was requested to provide the clock notification
given by @id.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if the clock has been asked to provide the given clock
notification, %FALSE otherwise.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">a #GstTestClock to ask if it provided the notification</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
          <parameter name="id" transfer-ownership="none">
            <doc xml:space="preserve">a #GstClockID clock notification</doc>
            <type name="Gst.ClockID" c:type="GstClockID"/>
          </parameter>
        </parameters>
      </method>
      <method name="peek_id_count"
              c:identifier="gst_test_clock_peek_id_count"
              version="1.2">
        <doc xml:space="preserve">Determine the number of pending clock notifications that have been
requested from the @test_clock.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">the number of pending clock notifications.</doc>
          <type name="guint" c:type="guint"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">a #GstTestClock for which to count notifications</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="peek_next_pending_id"
              c:identifier="gst_test_clock_peek_next_pending_id"
              version="1.2">
        <doc xml:space="preserve">Determines if the @pending_id is the next clock notification scheduled to
be triggered given the current time of the @test_clock.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <doc xml:space="preserve">%TRUE if @pending_id is the next clock notification to be
triggered, %FALSE otherwise.</doc>
          <type name="gboolean" c:type="gboolean"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">a #GstTestClock to check the clock notifications for</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
          <parameter name="pending_id"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="full"
                     optional="1"
                     allow-none="1">
            <doc xml:space="preserve">a #GstClockID clock
notification to look for</doc>
            <type name="Gst.ClockID" c:type="GstClockID*"/>
          </parameter>
        </parameters>
      </method>
      <method name="process_id_list"
              c:identifier="gst_test_clock_process_id_list"
              version="1.4">
        <doc xml:space="preserve">Processes and releases the pending IDs in the list.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <type name="guint" c:type="guint"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">#GstTestClock for which to process the pending IDs</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
          <parameter name="pending_list"
                     transfer-ownership="none"
                     nullable="1"
                     allow-none="1">
            <doc xml:space="preserve">List
    of pending #GstClockIDs</doc>
            <type name="GLib.List" c:type="const GList*">
              <type name="Gst.ClockID"/>
            </type>
          </parameter>
        </parameters>
      </method>
      <method name="process_next_clock_id"
              c:identifier="gst_test_clock_process_next_clock_id"
              version="1.2">
        <doc xml:space="preserve">MT safe.</doc>
        <return-value transfer-ownership="full">
          <doc xml:space="preserve">a #GstClockID containing the next pending clock
notification.</doc>
          <type name="Gst.ClockID" c:type="GstClockID"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">a #GstTestClock for which to retrieve the next pending clock
notification</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
        </parameters>
      </method>
      <method name="set_time"
              c:identifier="gst_test_clock_set_time"
              version="1.2">
        <doc xml:space="preserve">Sets the time of @test_clock to the time given by @new_time. The time of
@test_clock is monotonically increasing, therefore providing a @new_time
which is earlier or equal to the time of the clock as given by
gst_clock_get_time() is a programming error.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">a #GstTestClock of which to set the time</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
          <parameter name="new_time" transfer-ownership="none">
            <doc xml:space="preserve">a #GstClockTime later than that returned by gst_clock_get_time()</doc>
            <type name="Gst.ClockTime" c:type="GstClockTime"/>
          </parameter>
        </parameters>
      </method>
      <method name="wait_for_multiple_pending_ids"
              c:identifier="gst_test_clock_wait_for_multiple_pending_ids"
              version="1.4">
        <doc xml:space="preserve">Blocks until at least @count clock notifications have been requested from
@test_clock. There is no timeout for this wait, see the main description of
#GstTestClock.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">#GstTestClock for which to await having enough pending clock</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
          <parameter name="count" transfer-ownership="none">
            <doc xml:space="preserve">the number of pending clock notifications to wait for</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
          <parameter name="pending_list"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="full"
                     optional="1"
                     allow-none="1">
            <doc xml:space="preserve">Address
    of a #GList pointer variable to store the list of pending #GstClockIDs
    that expired, or %NULL</doc>
            <type name="GLib.List" c:type="GList**">
              <type name="Gst.ClockID"/>
            </type>
          </parameter>
        </parameters>
      </method>
      <method name="wait_for_next_pending_id"
              c:identifier="gst_test_clock_wait_for_next_pending_id"
              version="1.2">
        <doc xml:space="preserve">Waits until a clock notification is requested from @test_clock. There is no
timeout for this wait, see the main description of #GstTestClock. A reference
to the pending clock notification is stored in @pending_id.

MT safe.</doc>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">#GstTestClock for which to get the pending clock notification</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
          <parameter name="pending_id"
                     direction="out"
                     caller-allocates="0"
                     transfer-ownership="full"
                     optional="1"
                     allow-none="1">
            <doc xml:space="preserve">#GstClockID
with information about the pending clock notification</doc>
            <type name="Gst.ClockID" c:type="GstClockID*"/>
          </parameter>
        </parameters>
      </method>
      <method name="wait_for_pending_id_count"
              c:identifier="gst_test_clock_wait_for_pending_id_count"
              version="1.2"
              deprecated="1">
        <doc xml:space="preserve">Blocks until at least @count clock notifications have been requested from
@test_clock. There is no timeout for this wait, see the main description of
#GstTestClock.</doc>
        <doc-deprecated xml:space="preserve">use gst_test_clock_wait_for_multiple_pending_ids() instead.</doc-deprecated>
        <return-value transfer-ownership="none">
          <type name="none" c:type="void"/>
        </return-value>
        <parameters>
          <instance-parameter name="test_clock" transfer-ownership="none">
            <doc xml:space="preserve">#GstTestClock for which to await having enough pending clock</doc>
            <type name="TestClock" c:type="GstTestClock*"/>
          </instance-parameter>
          <parameter name="count" transfer-ownership="none">
            <doc xml:space="preserve">the number of pending clock notifications to wait for</doc>
            <type name="guint" c:type="guint"/>
          </parameter>
        </parameters>
      </method>
      <property name="start-time"
                writable="1"
                construct-only="1"
                transfer-ownership="none">
        <doc xml:space="preserve">When a #GstTestClock is constructed it will have a certain start time set.
If the clock was created using gst_test_clock_new_with_start_time() then
this property contains the value of the @start_time argument. If
gst_test_clock_new() was called the clock started at time zero, and thus
this property contains the value 0.</doc>
        <type name="guint64" c:type="guint64"/>
      </property>
      <field name="parent">
        <type name="Gst.Clock" c:type="GstClock"/>
      </field>
      <field name="priv" readable="0" private="1">
        <type name="TestClockPrivate" c:type="GstTestClockPrivate*"/>
      </field>
    </class>
    <record name="TestClockClass"
            c:type="GstTestClockClass"
            glib:is-gtype-struct-for="TestClock"
            version="1.2">
      <doc xml:space="preserve">The class of a #GstTestClock, which has no virtual methods to override.</doc>
      <field name="parent_class">
        <doc xml:space="preserve">the parent class structure</doc>
        <type name="Gst.ClockClass" c:type="GstClockClass"/>
      </field>
    </record>
    <record name="TestClockPrivate" c:type="GstTestClockPrivate" disguised="1">
    </record>
    <function name="buffer_straw_get_buffer"
              c:identifier="gst_buffer_straw_get_buffer">
      <doc xml:space="preserve">Get one buffer from @pad. Implemented via buffer probes. This function will
block until the pipeline passes a buffer over @pad, so for robust behavior
in unit tests, you need to use check's timeout to fail out in the case that a
buffer never arrives.

You must have previously called gst_buffer_straw_start_pipeline() on
@pipeline and @pad.</doc>
      <return-value transfer-ownership="full">
        <doc xml:space="preserve">the captured #GstBuffer.</doc>
        <type name="Gst.Buffer" c:type="GstBuffer*"/>
      </return-value>
      <parameters>
        <parameter name="bin" transfer-ownership="none">
          <doc xml:space="preserve">the pipeline previously started via gst_buffer_straw_start_pipeline()</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="pad" transfer-ownership="none">
          <doc xml:space="preserve">the pad previously passed to gst_buffer_straw_start_pipeline()</doc>
          <type name="Gst.Pad" c:type="GstPad*"/>
        </parameter>
      </parameters>
    </function>
    <function name="buffer_straw_start_pipeline"
              c:identifier="gst_buffer_straw_start_pipeline">
      <doc xml:space="preserve">Sets up a pipeline for buffer sucking. This will allow you to call
gst_buffer_straw_get_buffer() to access buffers as they pass over @pad.

This function is normally used in unit tests that want to verify that a
particular element is outputting correct buffers. For example, you would make
a pipeline via gst_parse_launch(), pull out the pad you want to monitor, then
call gst_buffer_straw_get_buffer() to get the buffers that pass through @pad.
The pipeline will block until you have sucked off the buffers.

This function will set the state of @bin to PLAYING; to clean up, be sure to
call gst_buffer_straw_stop_pipeline().

Note that you may not start two buffer straws at the same time. This function
is intended for unit tests, not general API use. In fact it calls fail_if
from libcheck, so you cannot use it outside unit tests.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="bin" transfer-ownership="none">
          <doc xml:space="preserve">the pipeline to run</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="pad" transfer-ownership="none">
          <doc xml:space="preserve">a pad on an element in @bin</doc>
          <type name="Gst.Pad" c:type="GstPad*"/>
        </parameter>
      </parameters>
    </function>
    <function name="buffer_straw_stop_pipeline"
              c:identifier="gst_buffer_straw_stop_pipeline">
      <doc xml:space="preserve">Set @bin to #GST_STATE_NULL and release resource allocated in
gst_buffer_straw_start_pipeline().

You must have previously called gst_buffer_straw_start_pipeline() on
@pipeline and @pad.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="bin" transfer-ownership="none">
          <doc xml:space="preserve">the pipeline previously started via gst_buffer_straw_start_pipeline()</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="pad" transfer-ownership="none">
          <doc xml:space="preserve">the pad previously passed to gst_buffer_straw_start_pipeline()</doc>
          <type name="Gst.Pad" c:type="GstPad*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_abi_list" c:identifier="gst_check_abi_list">
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="list" transfer-ownership="none">
          <type name="CheckABIStruct" c:type="GstCheckABIStruct"/>
        </parameter>
        <parameter name="have_abi_sizes" transfer-ownership="none">
          <type name="gboolean" c:type="gboolean"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_buffer_data" c:identifier="gst_check_buffer_data">
      <doc xml:space="preserve">Compare the buffer contents with @data and @size.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="buffer" transfer-ownership="none">
          <doc xml:space="preserve">buffer to compare</doc>
          <type name="Gst.Buffer" c:type="GstBuffer*"/>
        </parameter>
        <parameter name="data" transfer-ownership="none">
          <doc xml:space="preserve">data to compare to</doc>
          <type name="gpointer" c:type="gconstpointer"/>
        </parameter>
        <parameter name="size" transfer-ownership="none">
          <doc xml:space="preserve">size of data to compare</doc>
          <type name="gsize" c:type="gsize"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_caps_equal" c:identifier="gst_check_caps_equal">
      <doc xml:space="preserve">Compare two caps with gst_caps_is_equal and fail unless they are
equal.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="caps1" transfer-ownership="none">
          <doc xml:space="preserve">first caps to compare</doc>
          <type name="Gst.Caps" c:type="GstCaps*"/>
        </parameter>
        <parameter name="caps2" transfer-ownership="none">
          <doc xml:space="preserve">second caps to compare</doc>
          <type name="Gst.Caps" c:type="GstCaps*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_chain_func" c:identifier="gst_check_chain_func">
      <return-value transfer-ownership="none">
        <type name="Gst.FlowReturn" c:type="GstFlowReturn"/>
      </return-value>
      <parameters>
        <parameter name="pad" transfer-ownership="none">
          <type name="Gst.Pad" c:type="GstPad*"/>
        </parameter>
        <parameter name="parent" transfer-ownership="none">
          <type name="Gst.Object" c:type="GstObject*"/>
        </parameter>
        <parameter name="buffer" transfer-ownership="none">
          <type name="Gst.Buffer" c:type="GstBuffer*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_drop_buffers" c:identifier="gst_check_drop_buffers">
      <doc xml:space="preserve">Unref and remove all buffers that are in the global @buffers GList,
emptying the list.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
    </function>
    <function name="check_element_push_buffer"
              c:identifier="gst_check_element_push_buffer">
      <doc xml:space="preserve">Create an element using the factory providing the @element_name and
push the @buffer_in to this element. The element should create one buffer
and this will be compared with @buffer_out. We only check the caps
and the data of the buffers. This function unrefs the buffers.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="element_name" transfer-ownership="none">
          <doc xml:space="preserve">name of the element that needs to be created</doc>
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
        <parameter name="buffer_in" transfer-ownership="none">
          <doc xml:space="preserve">push this buffer to the element</doc>
          <type name="Gst.Buffer" c:type="GstBuffer*"/>
        </parameter>
        <parameter name="caps_in" transfer-ownership="none">
          <doc xml:space="preserve">the #GstCaps expected of the sinkpad of the element</doc>
          <type name="Gst.Caps" c:type="GstCaps*"/>
        </parameter>
        <parameter name="buffer_out" transfer-ownership="none">
          <doc xml:space="preserve">compare the result with this buffer</doc>
          <type name="Gst.Buffer" c:type="GstBuffer*"/>
        </parameter>
        <parameter name="caps_out" transfer-ownership="none">
          <doc xml:space="preserve">the #GstCaps expected of the srcpad of the element</doc>
          <type name="Gst.Caps" c:type="GstCaps*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_element_push_buffer_list"
              c:identifier="gst_check_element_push_buffer_list">
      <doc xml:space="preserve">Create an element using the factory providing the @element_name and push the
buffers in @buffer_in to this element. The element should create the buffers
equal to the buffers in @buffer_out. We only check the size and the data of
the buffers. This function unrefs the buffers in the two lists.
The last_flow_return parameter indicates the expected flow return value from
pushing the final buffer in the list.
This can be used to set up a test which pushes some buffers and then an
invalid buffer, when the final buffer is expected to fail, for example.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="element_name" transfer-ownership="none">
          <doc xml:space="preserve">name of the element that needs to be created</doc>
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
        <parameter name="buffer_in" transfer-ownership="full">
          <doc xml:space="preserve">a list of buffers that needs to be
 pushed to the element</doc>
          <type name="GLib.List" c:type="GList*">
            <type name="Gst.Buffer"/>
          </type>
        </parameter>
        <parameter name="caps_in" transfer-ownership="none">
          <doc xml:space="preserve">the #GstCaps expected of the sinkpad of the element</doc>
          <type name="Gst.Caps" c:type="GstCaps*"/>
        </parameter>
        <parameter name="buffer_out" transfer-ownership="full">
          <doc xml:space="preserve">a list of buffers that we expect from
the element</doc>
          <type name="GLib.List" c:type="GList*">
            <type name="Gst.Buffer"/>
          </type>
        </parameter>
        <parameter name="caps_out" transfer-ownership="none">
          <doc xml:space="preserve">the #GstCaps expected of the srcpad of the element</doc>
          <type name="Gst.Caps" c:type="GstCaps*"/>
        </parameter>
        <parameter name="last_flow_return" transfer-ownership="none">
          <doc xml:space="preserve">the last buffer push needs to give this GstFlowReturn</doc>
          <type name="Gst.FlowReturn" c:type="GstFlowReturn"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_init" c:identifier="gst_check_init">
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="argc" transfer-ownership="none">
          <type name="gint" c:type="int*"/>
        </parameter>
        <parameter name="argv" transfer-ownership="none">
          <type name="utf8" c:type="char**"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_message_error"
              c:identifier="gst_check_message_error">
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="message" transfer-ownership="none">
          <type name="Gst.Message" c:type="GstMessage*"/>
        </parameter>
        <parameter name="type" transfer-ownership="none">
          <type name="Gst.MessageType" c:type="GstMessageType"/>
        </parameter>
        <parameter name="domain" transfer-ownership="none">
          <type name="GLib.Quark" c:type="GQuark"/>
        </parameter>
        <parameter name="code" transfer-ownership="none">
          <type name="gint" c:type="gint"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_run_suite"
              c:identifier="gst_check_run_suite"
              introspectable="0">
      <return-value transfer-ownership="none">
        <type name="gint" c:type="gint"/>
      </return-value>
      <parameters>
        <parameter name="suite" transfer-ownership="none">
          <type c:type="Suite*"/>
        </parameter>
        <parameter name="name" transfer-ownership="none">
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
        <parameter name="fname" transfer-ownership="none">
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_setup_element"
              c:identifier="gst_check_setup_element">
      <doc xml:space="preserve">setup an element for a filter test with mysrcpad and mysinkpad</doc>
      <return-value transfer-ownership="full">
        <doc xml:space="preserve">a new element</doc>
        <type name="Gst.Element" c:type="GstElement*"/>
      </return-value>
      <parameters>
        <parameter name="factory" transfer-ownership="none">
          <doc xml:space="preserve">factory</doc>
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_setup_events" c:identifier="gst_check_setup_events">
      <doc xml:space="preserve">Push stream-start, caps and segment event, which consist of the minimum
required events to allow streaming. Caps is optional to allow raw src
testing. If @element has more than one src or sink pad, use
gst_check_setup_events_with_stream_id() instead.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="srcpad" transfer-ownership="none">
          <doc xml:space="preserve">The src #GstPad to push on</doc>
          <type name="Gst.Pad" c:type="GstPad*"/>
        </parameter>
        <parameter name="element" transfer-ownership="none">
          <doc xml:space="preserve">The #GstElement use to create the stream id</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="caps"
                   transfer-ownership="none"
                   nullable="1"
                   allow-none="1">
          <doc xml:space="preserve">#GstCaps in case caps event must be sent</doc>
          <type name="Gst.Caps" c:type="GstCaps*"/>
        </parameter>
        <parameter name="format" transfer-ownership="none">
          <doc xml:space="preserve">The #GstFormat of the default segment to send</doc>
          <type name="Gst.Format" c:type="GstFormat"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_setup_events_with_stream_id"
              c:identifier="gst_check_setup_events_with_stream_id">
      <doc xml:space="preserve">Push stream-start, caps and segment event, which consist of the minimum
required events to allow streaming. Caps is optional to allow raw src
testing.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="srcpad" transfer-ownership="none">
          <doc xml:space="preserve">The src #GstPad to push on</doc>
          <type name="Gst.Pad" c:type="GstPad*"/>
        </parameter>
        <parameter name="element" transfer-ownership="none">
          <doc xml:space="preserve">The #GstElement use to create the stream id</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="caps"
                   transfer-ownership="none"
                   nullable="1"
                   allow-none="1">
          <doc xml:space="preserve">#GstCaps in case caps event must be sent</doc>
          <type name="Gst.Caps" c:type="GstCaps*"/>
        </parameter>
        <parameter name="format" transfer-ownership="none">
          <doc xml:space="preserve">The #GstFormat of the default segment to send</doc>
          <type name="Gst.Format" c:type="GstFormat"/>
        </parameter>
        <parameter name="stream_id" transfer-ownership="none">
          <doc xml:space="preserve">A unique identifier for the stream</doc>
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_setup_sink_pad"
              c:identifier="gst_check_setup_sink_pad">
      <return-value transfer-ownership="full">
        <doc xml:space="preserve">a new pad</doc>
        <type name="Gst.Pad" c:type="GstPad*"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <doc xml:space="preserve">element to setup pad on</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="tmpl" transfer-ownership="none">
          <doc xml:space="preserve">pad template</doc>
          <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_setup_sink_pad_by_name"
              c:identifier="gst_check_setup_sink_pad_by_name">
      <return-value transfer-ownership="full">
        <doc xml:space="preserve">a new pad</doc>
        <type name="Gst.Pad" c:type="GstPad*"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <doc xml:space="preserve">element to setup pad on</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="tmpl" transfer-ownership="none">
          <doc xml:space="preserve">pad template</doc>
          <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
        </parameter>
        <parameter name="name" transfer-ownership="none">
          <doc xml:space="preserve">name</doc>
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_setup_sink_pad_by_name_from_template"
              c:identifier="gst_check_setup_sink_pad_by_name_from_template"
              version="1.4">
      <return-value transfer-ownership="full">
        <doc xml:space="preserve">a new pad</doc>
        <type name="Gst.Pad" c:type="GstPad*"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <doc xml:space="preserve">element to setup pad on</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="tmpl" transfer-ownership="none">
          <doc xml:space="preserve">pad template</doc>
          <type name="Gst.PadTemplate" c:type="GstPadTemplate*"/>
        </parameter>
        <parameter name="name" transfer-ownership="none">
          <doc xml:space="preserve">name</doc>
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_setup_sink_pad_from_template"
              c:identifier="gst_check_setup_sink_pad_from_template"
              version="1.4">
      <return-value transfer-ownership="full">
        <doc xml:space="preserve">a new pad</doc>
        <type name="Gst.Pad" c:type="GstPad*"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <doc xml:space="preserve">element to setup pad on</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="tmpl" transfer-ownership="none">
          <doc xml:space="preserve">pad template</doc>
          <type name="Gst.PadTemplate" c:type="GstPadTemplate*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_setup_src_pad"
              c:identifier="gst_check_setup_src_pad">
      <return-value transfer-ownership="full">
        <doc xml:space="preserve">a new pad</doc>
        <type name="Gst.Pad" c:type="GstPad*"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <doc xml:space="preserve">element to setup pad on</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="tmpl" transfer-ownership="none">
          <doc xml:space="preserve">pad template</doc>
          <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_setup_src_pad_by_name"
              c:identifier="gst_check_setup_src_pad_by_name">
      <return-value transfer-ownership="full">
        <doc xml:space="preserve">a new pad</doc>
        <type name="Gst.Pad" c:type="GstPad*"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <doc xml:space="preserve">element to setup pad on</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="tmpl" transfer-ownership="none">
          <doc xml:space="preserve">pad template</doc>
          <type name="Gst.StaticPadTemplate" c:type="GstStaticPadTemplate*"/>
        </parameter>
        <parameter name="name" transfer-ownership="none">
          <doc xml:space="preserve">name</doc>
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_setup_src_pad_by_name_from_template"
              c:identifier="gst_check_setup_src_pad_by_name_from_template"
              version="1.4">
      <return-value transfer-ownership="full">
        <doc xml:space="preserve">a new pad</doc>
        <type name="Gst.Pad" c:type="GstPad*"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <doc xml:space="preserve">element to setup pad on</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="tmpl" transfer-ownership="none">
          <doc xml:space="preserve">pad template</doc>
          <type name="Gst.PadTemplate" c:type="GstPadTemplate*"/>
        </parameter>
        <parameter name="name" transfer-ownership="none">
          <doc xml:space="preserve">name</doc>
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_setup_src_pad_from_template"
              c:identifier="gst_check_setup_src_pad_from_template"
              version="1.4">
      <return-value transfer-ownership="full">
        <doc xml:space="preserve">a new pad</doc>
        <type name="Gst.Pad" c:type="GstPad*"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <doc xml:space="preserve">element to setup pad on</doc>
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="tmpl" transfer-ownership="none">
          <doc xml:space="preserve">pad template</doc>
          <type name="Gst.PadTemplate" c:type="GstPadTemplate*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_teardown_element"
              c:identifier="gst_check_teardown_element">
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_teardown_pad_by_name"
              c:identifier="gst_check_teardown_pad_by_name">
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
        <parameter name="name" transfer-ownership="none">
          <type name="utf8" c:type="const gchar*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_teardown_sink_pad"
              c:identifier="gst_check_teardown_sink_pad">
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
      </parameters>
    </function>
    <function name="check_teardown_src_pad"
              c:identifier="gst_check_teardown_src_pad">
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="element" transfer-ownership="none">
          <type name="Gst.Element" c:type="GstElement*"/>
        </parameter>
      </parameters>
    </function>
    <function name="consistency_checker_add_pad"
              c:identifier="gst_consistency_checker_add_pad">
      <doc xml:space="preserve">Sets up a data probe on the given pad which will raise assertions if the
data flow is inconsistent.</doc>
      <return-value transfer-ownership="none">
        <doc xml:space="preserve">%TRUE if the pad was added</doc>
        <type name="gboolean" c:type="gboolean"/>
      </return-value>
      <parameters>
        <parameter name="consist" transfer-ownership="none">
          <doc xml:space="preserve">The #GstStreamConsistency handle</doc>
          <type name="StreamConsistency" c:type="GstStreamConsistency*"/>
        </parameter>
        <parameter name="pad" transfer-ownership="none">
          <doc xml:space="preserve">The #GstPad on which the dataflow will be checked.</doc>
          <type name="Gst.Pad" c:type="GstPad*"/>
        </parameter>
      </parameters>
    </function>
    <function name="consistency_checker_free"
              c:identifier="gst_consistency_checker_free">
      <doc xml:space="preserve">Frees the allocated data and probes associated with @consist.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="consist" transfer-ownership="none">
          <doc xml:space="preserve">The #GstStreamConsistency to free.</doc>
          <type name="StreamConsistency" c:type="GstStreamConsistency*"/>
        </parameter>
      </parameters>
    </function>
    <function name="consistency_checker_new"
              c:identifier="gst_consistency_checker_new"
              introspectable="0">
      <doc xml:space="preserve">Sets up a data probe on the given pad which will raise assertions if the
data flow is inconsistent.</doc>
      <return-value>
        <doc xml:space="preserve">A #GstStreamConsistency structure used to track data flow.</doc>
        <type name="StreamConsistency" c:type="GstStreamConsistency*"/>
      </return-value>
      <parameters>
        <parameter name="pad" transfer-ownership="none">
          <doc xml:space="preserve">The #GstPad on which the dataflow will be checked.</doc>
          <type name="Gst.Pad" c:type="GstPad*"/>
        </parameter>
      </parameters>
    </function>
    <function name="consistency_checker_reset"
              c:identifier="gst_consistency_checker_reset">
      <doc xml:space="preserve">Reset the stream checker's internal variables.</doc>
      <return-value transfer-ownership="none">
        <type name="none" c:type="void"/>
      </return-value>
      <parameters>
        <parameter name="consist" transfer-ownership="none">
          <doc xml:space="preserve">The #GstStreamConsistency to reset.</doc>
          <type name="StreamConsistency" c:type="GstStreamConsistency*"/>
        </parameter>
      </parameters>
    </function>
  </namespace>
</repository>
