# GstHarness

GstHarness is meant to make writing unit test for GStreamer much easier. It can be thought of as a way of treating a GstElement as a black box, deterministically feeding it data, and controlling what data it outputs.

The basic structure of GstHarness is two "floating" GstPad that connect to the harnessed GstElement src and sink GstPad like so:

               __________________________
      _____   |  _____            _____  |   _____
     |     |  | |     |          |     | |  |     |
     | src |--+-| sink|  Element | src |-+--| sink|
     |_____|  | |_____|          |_____| |  |_____|
              |__________________________|

With this, you can now simulate any environment the GstElement might find itself in. By specifying the GstCaps of the harness GstPad, using functions like gst_harness_set_src_caps or gst_harness_set_sink_caps_str, you can test how the GstElement interacts with different caps sets.

Your harnessed GstElement can of course also be a bin, and using gst_harness_new_parse supporting standard gst-launch syntax, you can easily test a whole pipeline instead of just one element.

You can then go on to push GstBuffer and GstEvent on to the srcpad, using functions like gst_harness_push and gst_harness_push_event, and then pull them out to examine them with gst_harness_pull and gst_harness_pull_event.

## A simple buffer-in buffer-out example

       #include <gst/gst.h>
       #include <gst/check/gstharness.h>
       GstHarness *h;
       GstBuffer *in_buf;
       GstBuffer *out_buf;

       // attach the harness to the src and sink pad of GstQueue
       h = gst_harness_new ("queue");

       // we must specify a caps before pushing buffers
       gst_harness_set_src_caps_str (h, "mycaps");

       // create a buffer of size 42
       in_buf = gst_harness_create_buffer (h, 42);

       // push the buffer into the queue
       gst_harness_push (h, in_buf);

       // pull the buffer from the queue
       out_buf = gst_harness_pull (h);

       // validate the buffer in is the same as buffer out
       fail_unless (in_buf == out_buf);

       // cleanup
       gst_buffer_unref (out_buf);
       gst_harness_teardown (h);

Another main feature of the GstHarness is its integration with the GstTestClock. Operating the GstTestClock can be very challenging, but GstHarness simplifies some of the most desired actions a lot, like wanting to manually advance the clock while at the same time releasing a GstClockID that is waiting, with functions like gst_harness_crank_single_clock_wait.

GstHarness also supports sub-harnesses, as a way of generating and validating data. A sub-harness is another GstHarness 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 *)->src_harness, or using the much more convenient gst_harness_add_src or gst_harness_add_sink_parse. If you have a decoder-element you want to test, (like vp8dec) it can be very useful to add a src-harness with both a src-element (videotestsrc) and an encoder (vp8enc) to feed the decoder data with different configurations, by simply doing:

       GstHarness * h = gst_harness_new ("vp8dec");
       gst_harness_add_src_parse (h, "videotestsrc is-live=1 ! vp8enc", TRUE);

and then feeding it data with:

     gst_harness_push_from_src (h);

## GstHarness

### Members

`element` (GstElement *) –

the element inside the harness

`srcpad` (GstPad *) –

the internal harness source pad

`sinkpad` (GstPad *) –

the internal harness sink pad

`src_harness` (GstHarness *) –

the source (input) harness (if any)

`sink_harness` (GstHarness *) –

the sink (output) harness (if any)

Since : 1.6

## GstCheck.Harness

### Members

`element` (Gst.Element) –

the element inside the harness

`srcpad` (Gst.Pad) –

the internal harness source pad

`sinkpad` (Gst.Pad) –

the internal harness sink pad

`src_harness` (GstCheck.Harness) –

the source (input) harness (if any)

`sink_harness` (GstCheck.Harness) –

the sink (output) harness (if any)

Since : 1.6

## GstCheck.Harness

### Members

`element` (Gst.Element) –

the element inside the harness

`srcpad` (Gst.Pad) –

the internal harness source pad

`sinkpad` (Gst.Pad) –

the internal harness sink pad

`src_harness` (GstCheck.Harness) –

the source (input) harness (if any)

`sink_harness` (GstCheck.Harness) –

the sink (output) harness (if any)

Since : 1.6

### Methods

#### gst_harness_add_element_full

    gst_harness_add_element_full (GstHarness * h,
                                  GstElement * element,
                                  GstStaticPadTemplate * hsrc,
                                  const gchar * element_sinkpad_name,
                                  GstStaticPadTemplate * hsink,
                                  const gchar * element_srcpad_name)

Adds a GstElement to an empty GstHarness

MT safe.

Parameters:

`h` –

a GstHarness

`element` –

a GstElement to add to the harness (transfer none)

`hsrc` ( [nullable]) –

a GstStaticPadTemplate describing the harness srcpad. NULL will not create a harness srcpad.

`element_sinkpad_name` ( [nullable]) –

a gchar 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. NULL will not get/request a sinkpad from the element. (Like if the element is a src.)

`hsink` ( [nullable]) –

a GstStaticPadTemplate describing the harness sinkpad. NULL will not create a harness sinkpad.

`element_srcpad_name` ( [nullable]) –

a gchar with the name of the element srcpad that is then linked to the harness sinkpad, similar to the element_sinkpad_name.

Since : 1.6

#### gst_harness_add_element_sink_pad

    gst_harness_add_element_sink_pad (GstHarness * h,
                                      GstPad * sinkpad)

Links the specified GstPad the GstHarness srcpad.

MT safe.

Parameters:

`h` –

a GstHarness

`sinkpad` –

a GstPad to link to the harness srcpad

Since : 1.6

#### GstCheck.Harness.prototype.add_element_sink_pad

    function GstCheck.Harness.prototype.add_element_sink_pad(sinkpad: Gst.Pad): {
        // javascript wrapper for 'gst_harness_add_element_sink_pad'
    }

Links the specified Gst.Pad the GstHarness srcpad.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`sinkpad` (Gst.Pad) –

a Gst.Pad to link to the harness srcpad

Since : 1.6

#### GstCheck.Harness.add_element_sink_pad

    def GstCheck.Harness.add_element_sink_pad (self, sinkpad):
        #python wrapper for 'gst_harness_add_element_sink_pad'

Links the specified Gst.Pad the GstHarness srcpad.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`sinkpad` (Gst.Pad) –

a Gst.Pad to link to the harness srcpad

Since : 1.6

#### gst_harness_add_element_src_pad

    gst_harness_add_element_src_pad (GstHarness * h,
                                     GstPad * srcpad)

Links the specified GstPad the GstHarness 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.

MT safe.

Parameters:

`h` –

a GstHarness

`srcpad` –

a GstPad to link to the harness sinkpad

Since : 1.6

#### GstCheck.Harness.prototype.add_element_src_pad

    function GstCheck.Harness.prototype.add_element_src_pad(srcpad: Gst.Pad): {
        // javascript wrapper for 'gst_harness_add_element_src_pad'
    }

Links the specified Gst.Pad the GstHarness 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.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`srcpad` (Gst.Pad) –

a Gst.Pad to link to the harness sinkpad

Since : 1.6

#### GstCheck.Harness.add_element_src_pad

    def GstCheck.Harness.add_element_src_pad (self, srcpad):
        #python wrapper for 'gst_harness_add_element_src_pad'

Links the specified Gst.Pad the GstHarness 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.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`srcpad` (Gst.Pad) –

a Gst.Pad to link to the harness sinkpad

Since : 1.6

#### gst_harness_add_parse

    gst_harness_add_parse (GstHarness * h,
                           const gchar * launchline)

Parses the launchline and puts that in a GstBin, and then attches the supplied GstHarness to the bin.

MT safe.

Parameters:

`h` –

a GstHarness

`launchline` –

a gchar describing a gst-launch type line

Since : 1.6

#### gst_harness_add_probe

    gst_harness_add_probe (GstHarness * h,
                           const gchar * element_name,
                           const gchar * pad_name,
                           GstPadProbeType mask,
                           GstPadProbeCallback callback,
                           gpointer user_data,
                           GDestroyNotify destroy_data)

A convenience function to allows you to call gst_pad_add_probe on a GstPad of a GstElement that are residing inside the GstHarness, by using normal gst_pad_add_probe syntax

MT safe.

Parameters:

`h` –

a GstHarness

`element_name` –

a gchar with a GstElementFactory name

`pad_name` –

a gchar with the name of the pad to attach the probe to

`mask` –

a GstPadProbeType (see gst_pad_add_probe)

`callback` –

a GstPadProbeCallback (see gst_pad_add_probe)

`user_data` –

a gpointer (see gst_pad_add_probe)

`destroy_data` –

a GDestroyNotify (see gst_pad_add_probe)

Since : 1.6

#### GstCheck.Harness.prototype.add_probe

    function GstCheck.Harness.prototype.add_probe(element_name: String, pad_name: String, mask: Gst.PadProbeType, callback: Gst.PadProbeCallback, user_data: Object): {
        // javascript wrapper for 'gst_harness_add_probe'
    }

A convenience function to allows you to call gst_pad_add_probe on a Gst.Pad of a Gst.Element that are residing inside the GstCheck.Harness, by using normal gst_pad_add_probe syntax

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`element_name` (String) –

a String with a Gst.ElementFactory name

`pad_name` (String) –

a String with the name of the pad to attach the probe to

`mask` (Gst.PadProbeType) –

a Gst.PadProbeType (see gst_pad_add_probe)

`callback` (Gst.PadProbeCallback) –

a Gst.PadProbeCallback (see gst_pad_add_probe)

`user_data` (Object) –

a Object (see gst_pad_add_probe)

Since : 1.6

#### GstCheck.Harness.add_probe

    def GstCheck.Harness.add_probe (self, element_name, pad_name, mask, callback, *user_data):
        #python wrapper for 'gst_harness_add_probe'

A convenience function to allows you to call gst_pad_add_probe on a Gst.Pad of a Gst.Element that are residing inside the GstCheck.Harness, by using normal gst_pad_add_probe syntax

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`element_name` (str) –

a int with a Gst.ElementFactory name

`pad_name` (str) –

a int with the name of the pad to attach the probe to

`mask` (Gst.PadProbeType) –

a Gst.PadProbeType (see gst_pad_add_probe)

`callback` (Gst.PadProbeCallback) –

a Gst.PadProbeCallback (see gst_pad_add_probe)

`user_data` (variadic) –

a object (see gst_pad_add_probe)

Since : 1.6

#### gst_harness_add_propose_allocation_meta

    gst_harness_add_propose_allocation_meta (GstHarness * h,
                                             GType api,
                                             const GstStructure * params)

Add api with params as one of the supported metadata API to propose when receiving an allocation query.

MT safe.

Parameters:

`h` –

a GstHarness

`api` –

a metadata API

`params` ( [nullable][transfer: none]) –

API specific parameters

Since : 1.16

#### GstCheck.Harness.prototype.add_propose_allocation_meta

    function GstCheck.Harness.prototype.add_propose_allocation_meta(api: GObject.Type, params: Gst.Structure): {
        // javascript wrapper for 'gst_harness_add_propose_allocation_meta'
    }

Add api with params as one of the supported metadata API to propose when receiving an allocation query.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`api` (GObject.Type) –

a metadata API

`params` (Gst.Structure) –

API specific parameters

Since : 1.16

#### GstCheck.Harness.add_propose_allocation_meta

    def GstCheck.Harness.add_propose_allocation_meta (self, api, params):
        #python wrapper for 'gst_harness_add_propose_allocation_meta'

Add api with params as one of the supported metadata API to propose when receiving an allocation query.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`api` (GObject.Type) –

a metadata API

`params` (Gst.Structure) –

API specific parameters

Since : 1.16

#### gst_harness_add_sink

    gst_harness_add_sink (GstHarness * h,
                          const gchar * sink_element_name)

Similar to gst_harness_add_sink_harness, this is a convenience to directly create a sink-harness using the sink_element_name name specified.

MT safe.

Parameters:

`h` –

a GstHarness

`sink_element_name` –

a gchar with the name of a GstElement

Since : 1.6

#### GstCheck.Harness.prototype.add_sink

    function GstCheck.Harness.prototype.add_sink(sink_element_name: String): {
        // javascript wrapper for 'gst_harness_add_sink'
    }

Similar to gst_harness_add_sink_harness, this is a convenience to directly create a sink-harness using the sink_element_name name specified.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`sink_element_name` (String) –

a String with the name of a Gst.Element

Since : 1.6

#### GstCheck.Harness.add_sink

    def GstCheck.Harness.add_sink (self, sink_element_name):
        #python wrapper for 'gst_harness_add_sink'

Similar to gst_harness_add_sink_harness, this is a convenience to directly create a sink-harness using the sink_element_name name specified.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`sink_element_name` (str) –

a int with the name of a Gst.Element

Since : 1.6

#### gst_harness_add_sink_harness

    gst_harness_add_sink_harness (GstHarness * h,
                                  GstHarness * sink_harness)

Similar to gst_harness_add_src, this allows you to send the data coming out of your harnessed GstElement to a sink-element, allowing to test different responses the element output might create in sink elements. An example might be an existing sink providing some analytical data on the input it receives that can be useful to your testing. If the goal is to test a sink-element itself, this is better achieved using gst_harness_new directly on the sink.

If a sink-harness already exists it will be replaced.

MT safe.

Parameters:

`h` –

a GstHarness

`sink_harness` ( [transfer: full]) –

a GstHarness to be added as a sink-harness.

Since : 1.6

#### GstCheck.Harness.prototype.add_sink_harness

    function GstCheck.Harness.prototype.add_sink_harness(sink_harness: GstCheck.Harness): {
        // javascript wrapper for 'gst_harness_add_sink_harness'
    }

Similar to gst_harness_add_src, this allows you to send the data coming out of your harnessed Gst.Element to a sink-element, allowing to test different responses the element output might create in sink elements. An example might be an existing sink providing some analytical data on the input it receives that can be useful to your testing. If the goal is to test a sink-element itself, this is better achieved using gst_harness_new directly on the sink.

If a sink-harness already exists it will be replaced.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`sink_harness` (GstCheck.Harness) –

a GstCheck.Harness to be added as a sink-harness.

Since : 1.6

#### GstCheck.Harness.add_sink_harness

    def GstCheck.Harness.add_sink_harness (self, sink_harness):
        #python wrapper for 'gst_harness_add_sink_harness'

Similar to gst_harness_add_src, this allows you to send the data coming out of your harnessed Gst.Element to a sink-element, allowing to test different responses the element output might create in sink elements. An example might be an existing sink providing some analytical data on the input it receives that can be useful to your testing. If the goal is to test a sink-element itself, this is better achieved using gst_harness_new directly on the sink.

If a sink-harness already exists it will be replaced.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`sink_harness` (GstCheck.Harness) –

a GstCheck.Harness to be added as a sink-harness.

Since : 1.6

#### gst_harness_add_sink_parse

    gst_harness_add_sink_parse (GstHarness * h,
                                const gchar * launchline)

Similar to gst_harness_add_sink, this allows you to specify a launch-line instead of just an element name. See gst_harness_add_src_parse for details.

MT safe.

Parameters:

`h` –

a GstHarness

`launchline` –

a gchar with the name of a GstElement

Since : 1.6

#### GstCheck.Harness.prototype.add_sink_parse

    function GstCheck.Harness.prototype.add_sink_parse(launchline: String): {
        // javascript wrapper for 'gst_harness_add_sink_parse'
    }

Similar to gst_harness_add_sink, this allows you to specify a launch-line instead of just an element name. See gst_harness_add_src_parse for details.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`launchline` (String) –

a String with the name of a Gst.Element

Since : 1.6

#### GstCheck.Harness.add_sink_parse

    def GstCheck.Harness.add_sink_parse (self, launchline):
        #python wrapper for 'gst_harness_add_sink_parse'

Similar to gst_harness_add_sink, this allows you to specify a launch-line instead of just an element name. See gst_harness_add_src_parse for details.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`launchline` (str) –

a int with the name of a Gst.Element

Since : 1.6

#### gst_harness_add_src

    gst_harness_add_src (GstHarness * h,
                         const gchar * src_element_name,
                         gboolean has_clock_wait)

Similar to gst_harness_add_src_harness, this is a convenience to directly create a src-harness using the src_element_name name specified.

MT safe.

Parameters:

`h` –

a GstHarness

`src_element_name` –

a gchar with the name of a GstElement

`has_clock_wait` –

a gboolean specifying if the GstElement uses gst_clock_wait_id internally.

Since : 1.6

#### GstCheck.Harness.prototype.add_src

    function GstCheck.Harness.prototype.add_src(src_element_name: String, has_clock_wait: Number): {
        // javascript wrapper for 'gst_harness_add_src'
    }

Similar to gst_harness_add_src_harness, this is a convenience to directly create a src-harness using the src_element_name name specified.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`src_element_name` (String) –

a String with the name of a Gst.Element

`has_clock_wait` (Number) –

a Number specifying if the Gst.Element uses gst_clock_wait_id internally.

Since : 1.6

#### GstCheck.Harness.add_src

    def GstCheck.Harness.add_src (self, src_element_name, has_clock_wait):
        #python wrapper for 'gst_harness_add_src'

Similar to gst_harness_add_src_harness, this is a convenience to directly create a src-harness using the src_element_name name specified.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`src_element_name` (str) –

a int with the name of a Gst.Element

`has_clock_wait` (bool) –

a bool specifying if the Gst.Element uses gst_clock_wait_id internally.

Since : 1.6

#### gst_harness_add_src_harness

    gst_harness_add_src_harness (GstHarness * h,
                                 GstHarness * src_harness,
                                 gboolean has_clock_wait)

A src-harness is a great way of providing the GstHarness with data. By adding a src-type GstElement, it is then easy to use functions like gst_harness_push_from_src or gst_harness_src_crank_and_push_many to provide your harnessed element with input. The has_clock_wait variable is a great way to control you src-element with, in that you can have it produce a buffer for you by simply cranking the clock, and not have it spin out of control producing buffers as fast as possible.

If a src-harness already exists it will be replaced.

MT safe.

Parameters:

`h` –

a GstHarness

`src_harness` ( [transfer: full]) –

a GstHarness to be added as a src-harness.

`has_clock_wait` –

a gboolean specifying if the GstElement uses gst_clock_wait_id internally.

Since : 1.6

#### GstCheck.Harness.prototype.add_src_harness

    function GstCheck.Harness.prototype.add_src_harness(src_harness: GstCheck.Harness, has_clock_wait: Number): {
        // javascript wrapper for 'gst_harness_add_src_harness'
    }

A src-harness is a great way of providing the GstCheck.Harness with data. By adding a src-type Gst.Element, it is then easy to use functions like gst_harness_push_from_src or gst_harness_src_crank_and_push_many to provide your harnessed element with input. The has_clock_wait variable is a great way to control you src-element with, in that you can have it produce a buffer for you by simply cranking the clock, and not have it spin out of control producing buffers as fast as possible.

If a src-harness already exists it will be replaced.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`src_harness` (GstCheck.Harness) –

a GstCheck.Harness to be added as a src-harness.

`has_clock_wait` (Number) –

a Number specifying if the Gst.Element uses gst_clock_wait_id internally.

Since : 1.6

#### GstCheck.Harness.add_src_harness

    def GstCheck.Harness.add_src_harness (self, src_harness, has_clock_wait):
        #python wrapper for 'gst_harness_add_src_harness'

A src-harness is a great way of providing the GstCheck.Harness with data. By adding a src-type Gst.Element, it is then easy to use functions like gst_harness_push_from_src or gst_harness_src_crank_and_push_many to provide your harnessed element with input. The has_clock_wait variable is a great way to control you src-element with, in that you can have it produce a buffer for you by simply cranking the clock, and not have it spin out of control producing buffers as fast as possible.

If a src-harness already exists it will be replaced.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`src_harness` (GstCheck.Harness) –

a GstCheck.Harness to be added as a src-harness.

`has_clock_wait` (bool) –

a bool specifying if the Gst.Element uses gst_clock_wait_id internally.

Since : 1.6

#### gst_harness_add_src_parse

    gst_harness_add_src_parse (GstHarness * h,
                               const gchar * launchline,
                               gboolean has_clock_wait)

Similar to gst_harness_add_src, this allows you to specify a launch-line, which can be useful for both having more then one GstElement acting as your src (Like a src producing raw buffers, and then an encoder, providing encoded data), but also by allowing you to set properties like "is-live" directly on the elements.

MT safe.

Parameters:

`h` –

a GstHarness

`launchline` –

a gchar describing a gst-launch type line

`has_clock_wait` –

a gboolean specifying if the GstElement uses gst_clock_wait_id internally.

Since : 1.6

#### GstCheck.Harness.prototype.add_src_parse

    function GstCheck.Harness.prototype.add_src_parse(launchline: String, has_clock_wait: Number): {
        // javascript wrapper for 'gst_harness_add_src_parse'
    }

Similar to gst_harness_add_src, this allows you to specify a launch-line, which can be useful for both having more then one Gst.Element acting as your src (Like a src producing raw buffers, and then an encoder, providing encoded data), but also by allowing you to set properties like "is-live" directly on the elements.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`launchline` (String) –

a String describing a gst-launch type line

`has_clock_wait` (Number) –

a Number specifying if the Gst.Element uses gst_clock_wait_id internally.

Since : 1.6

#### GstCheck.Harness.add_src_parse

    def GstCheck.Harness.add_src_parse (self, launchline, has_clock_wait):
        #python wrapper for 'gst_harness_add_src_parse'

Similar to gst_harness_add_src, this allows you to specify a launch-line, which can be useful for both having more then one Gst.Element acting as your src (Like a src producing raw buffers, and then an encoder, providing encoded data), but also by allowing you to set properties like "is-live" directly on the elements.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`launchline` (str) –

a int describing a gst-launch type line

`has_clock_wait` (bool) –

a bool specifying if the Gst.Element uses gst_clock_wait_id internally.

Since : 1.6

#### gst_harness_buffers_in_queue

    guint
    gst_harness_buffers_in_queue (GstHarness * h)

The number of GstBuffer currently in the GstHarness sinkpad GAsyncQueue

MT safe.

Parameters:

`h` –

a GstHarness

Returns –

a guint number of buffers in the queue

Since : 1.6

#### GstCheck.Harness.prototype.buffers_in_queue

    function GstCheck.Harness.prototype.buffers_in_queue(): {
        // javascript wrapper for 'gst_harness_buffers_in_queue'
    }

The number of Gst.Buffer currently in the GstCheck.Harness sinkpad GLib.AsyncQueue

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Number) –

a Number number of buffers in the queue

Since : 1.6

#### GstCheck.Harness.buffers_in_queue

    def GstCheck.Harness.buffers_in_queue (self):
        #python wrapper for 'gst_harness_buffers_in_queue'

The number of Gst.Buffer currently in the GstCheck.Harness sinkpad GLib.AsyncQueue

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (int) –

a int number of buffers in the queue

Since : 1.6

#### gst_harness_buffers_received

    guint
    gst_harness_buffers_received (GstHarness * h)

The total number of GstBuffer that has arrived on the GstHarness sinkpad. This number includes buffers that have been dropped as well as buffers that have already been pulled out.

MT safe.

Parameters:

`h` –

a GstHarness

Returns –

a guint number of buffers received

Since : 1.6

#### GstCheck.Harness.prototype.buffers_received

    function GstCheck.Harness.prototype.buffers_received(): {
        // javascript wrapper for 'gst_harness_buffers_received'
    }

The total number of Gst.Buffer that has arrived on the GstCheck.Harness sinkpad. This number includes buffers that have been dropped as well as buffers that have already been pulled out.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Number) –

a Number number of buffers received

Since : 1.6

#### GstCheck.Harness.buffers_received

    def GstCheck.Harness.buffers_received (self):
        #python wrapper for 'gst_harness_buffers_received'

The total number of Gst.Buffer that has arrived on the GstCheck.Harness sinkpad. This number includes buffers that have been dropped as well as buffers that have already been pulled out.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (int) –

a int number of buffers received

Since : 1.6

#### gst_harness_crank_multiple_clock_waits

    gboolean
    gst_harness_crank_multiple_clock_waits (GstHarness * h,
                                            guint waits)

Similar to gst_harness_crank_single_clock_wait, this is the function to use if your harnessed element(s) are using more then one gst_clock_id_wait. Failing to do so can (and will) make it racy which GstClockID 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.

MT safe.

Parameters:

`h` –

a GstHarness

`waits` –

a guint describing the number of GstClockID to crank

Returns –

a gboolean TRUE if the "crank" was successful, FALSE if not.

Since : 1.6

#### GstCheck.Harness.prototype.crank_multiple_clock_waits

    function GstCheck.Harness.prototype.crank_multiple_clock_waits(waits: Number): {
        // javascript wrapper for 'gst_harness_crank_multiple_clock_waits'
    }

Similar to GstCheck.Harness.prototype.crank_single_clock_wait, this is the function to use if your harnessed element(s) are using more then one gst_clock_id_wait. Failing to do so can (and will) make it racy which Object 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.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`waits` (Number) –

a Number describing the number of Object to crank

Returns (Number) –

a gboolean true if the "crank" was successful, false if not.

Since : 1.6

#### GstCheck.Harness.crank_multiple_clock_waits

    def GstCheck.Harness.crank_multiple_clock_waits (self, waits):
        #python wrapper for 'gst_harness_crank_multiple_clock_waits'

Similar to GstCheck.Harness.crank_single_clock_wait, this is the function to use if your harnessed element(s) are using more then one gst_clock_id_wait. Failing to do so can (and will) make it racy which object 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.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`waits` (int) –

a int describing the number of object to crank

Returns (bool) –

a gboolean True if the "crank" was successful, False if not.

Since : 1.6

#### gst_harness_crank_single_clock_wait

    gboolean
    gst_harness_crank_single_clock_wait (GstHarness * h)

A "crank" consists of three steps: 1: Wait for a GstClockID to be registered with the GstTestClock. 2: Advance the GstTestClock to the time the GstClockID is waiting for. 3: Release the GstClockID 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 dependent on this. A "crank" can be though of as the notion of manually driving the clock forward to its next logical step.

MT safe.

Parameters:

`h` –

a GstHarness

Returns –

a gboolean TRUE if the "crank" was successful, FALSE if not.

Since : 1.6

#### GstCheck.Harness.prototype.crank_single_clock_wait

    function GstCheck.Harness.prototype.crank_single_clock_wait(): {
        // javascript wrapper for 'gst_harness_crank_single_clock_wait'
    }

A "crank" consists of three steps: 1: Wait for a Object to be registered with the GstCheck.TestClock. 2: Advance the GstCheck.TestClock to the time the Object is waiting for. 3: Release the Object 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 dependent on this. A "crank" can be though of as the notion of manually driving the clock forward to its next logical step.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Number) –

a gboolean true if the "crank" was successful, false if not.

Since : 1.6

#### GstCheck.Harness.crank_single_clock_wait

    def GstCheck.Harness.crank_single_clock_wait (self):
        #python wrapper for 'gst_harness_crank_single_clock_wait'

A "crank" consists of three steps: 1: Wait for a object to be registered with the GstCheck.TestClock. 2: Advance the GstCheck.TestClock to the time the object is waiting for. 3: Release the object 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 dependent on this. A "crank" can be though of as the notion of manually driving the clock forward to its next logical step.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (bool) –

a gboolean True if the "crank" was successful, False if not.

Since : 1.6

#### gst_harness_create_buffer

    GstBuffer *
    gst_harness_create_buffer (GstHarness * h,
                               gsize size)

Allocates a buffer using a GstBufferPool if present, or else using the configured GstAllocator and GstAllocationParams

MT safe.

Parameters:

`h` –

a GstHarness

`size` –

a gsize specifying the size of the buffer

Returns –

a GstBuffer of size size

Since : 1.6

#### GstCheck.Harness.prototype.create_buffer

    function GstCheck.Harness.prototype.create_buffer(size: Number): {
        // javascript wrapper for 'gst_harness_create_buffer'
    }

Allocates a buffer using a Gst.BufferPool if present, or else using the configured Gst.Allocator and Gst.AllocationParams

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`size` (Number) –

a Number specifying the size of the buffer

Returns (Gst.Buffer) –

a Gst.Buffer of size size

Since : 1.6

#### GstCheck.Harness.create_buffer

    def GstCheck.Harness.create_buffer (self, size):
        #python wrapper for 'gst_harness_create_buffer'

Allocates a buffer using a Gst.BufferPool if present, or else using the configured Gst.Allocator and Gst.AllocationParams

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`size` (int) –

a int specifying the size of the buffer

Returns (Gst.Buffer) –

a Gst.Buffer of size size

Since : 1.6

#### gst_harness_dump_to_file

    gst_harness_dump_to_file (GstHarness * h,
                              const gchar * filename)

Allows you to dump the GstBuffer the GstHarness sinkpad GAsyncQueue to a file.

MT safe.

Parameters:

`h` –

a GstHarness

`filename` –

a gchar with a the name of a file

Since : 1.6

#### GstCheck.Harness.prototype.dump_to_file

    function GstCheck.Harness.prototype.dump_to_file(filename: String): {
        // javascript wrapper for 'gst_harness_dump_to_file'
    }

Allows you to dump the Gst.Buffer the GstCheck.Harness sinkpad GLib.AsyncQueue to a file.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`filename` (String) –

a String with a the name of a file

Since : 1.6

#### GstCheck.Harness.dump_to_file

    def GstCheck.Harness.dump_to_file (self, filename):
        #python wrapper for 'gst_harness_dump_to_file'

Allows you to dump the Gst.Buffer the GstCheck.Harness sinkpad GLib.AsyncQueue to a file.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`filename` (str) –

a int with a the name of a file

Since : 1.6

#### gst_harness_events_in_queue

    guint
    gst_harness_events_in_queue (GstHarness * h)

The number of GstEvent currently in the GstHarness sinkpad GAsyncQueue

MT safe.

Parameters:

`h` –

a GstHarness

Returns –

a guint number of events in the queue

Since : 1.6

#### GstCheck.Harness.prototype.events_in_queue

    function GstCheck.Harness.prototype.events_in_queue(): {
        // javascript wrapper for 'gst_harness_events_in_queue'
    }

The number of Gst.Event currently in the GstCheck.Harness sinkpad GLib.AsyncQueue

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Number) –

a Number number of events in the queue

Since : 1.6

#### GstCheck.Harness.events_in_queue

    def GstCheck.Harness.events_in_queue (self):
        #python wrapper for 'gst_harness_events_in_queue'

The number of Gst.Event currently in the GstCheck.Harness sinkpad GLib.AsyncQueue

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (int) –

a int number of events in the queue

Since : 1.6

#### gst_harness_events_received

    guint
    gst_harness_events_received (GstHarness * h)

The total number of GstEvent that has arrived on the GstHarness sinkpad This number includes events handled by the harness as well as events that have already been pulled out.

MT safe.

Parameters:

`h` –

a GstHarness

Returns –

a guint number of events received

Since : 1.6

#### GstCheck.Harness.prototype.events_received

    function GstCheck.Harness.prototype.events_received(): {
        // javascript wrapper for 'gst_harness_events_received'
    }

The total number of Gst.Event that has arrived on the GstCheck.Harness sinkpad This number includes events handled by the harness as well as events that have already been pulled out.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Number) –

a Number number of events received

Since : 1.6

#### GstCheck.Harness.events_received

    def GstCheck.Harness.events_received (self):
        #python wrapper for 'gst_harness_events_received'

The total number of Gst.Event that has arrived on the GstCheck.Harness sinkpad This number includes events handled by the harness as well as events that have already been pulled out.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (int) –

a int number of events received

Since : 1.6

#### gst_harness_find_element

    GstElement *
    gst_harness_find_element (GstHarness * h,
                              const gchar * element_name)

Most useful in conjunction with gst_harness_new_parse, this will scan the GstElement inside the GstHarness, and check if any of them matches element_name. Typical usecase being that you need to access one of the harnessed elements for properties and/or signals.

MT safe.

Parameters:

`h` –

a GstHarness

`element_name` –

a gchar with a GstElementFactory name

Returns ( [transfer: full][nullable]) –

a GstElement or NULL if not found

Since : 1.6

#### GstCheck.Harness.prototype.find_element

    function GstCheck.Harness.prototype.find_element(element_name: String): {
        // javascript wrapper for 'gst_harness_find_element'
    }

Most useful in conjunction with gst_harness_new_parse, this will scan the Gst.Element inside the GstCheck.Harness, and check if any of them matches element_name. Typical usecase being that you need to access one of the harnessed elements for properties and/or signals.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`element_name` (String) –

a String with a Gst.ElementFactory name

Returns (Gst.Element) –

a Gst.Element or null if not found

Since : 1.6

#### GstCheck.Harness.find_element

    def GstCheck.Harness.find_element (self, element_name):
        #python wrapper for 'gst_harness_find_element'

Most useful in conjunction with gst_harness_new_parse, this will scan the Gst.Element inside the GstCheck.Harness, and check if any of them matches element_name. Typical usecase being that you need to access one of the harnessed elements for properties and/or signals.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`element_name` (str) –

a int with a Gst.ElementFactory name

Returns (Gst.Element) –

a Gst.Element or None if not found

Since : 1.6

#### gst_harness_get

    gst_harness_get (GstHarness * h,
                     const gchar * element_name,
                     const gchar * first_property_name,
                     ... ...)

A convenience function to allows you to call g_object_get on a GstElement that are residing inside the GstHarness, by using normal g_object_get syntax.

MT safe.

Parameters:

`h` –

a GstHarness

`element_name` –

a gchar with a GstElementFactory name

`first_property_name` –

a gchar with the first property name

`...` –

return location for the first property, followed optionally by more name/return location pairs, followed by NULL

Since : 1.6

#### gst_harness_get_allocator

    gst_harness_get_allocator (GstHarness * h,
                               GstAllocator ** allocator,
                               GstAllocationParams * params)

Gets the allocator and its params that has been decided to use after an allocation query.

MT safe.

Parameters:

`h` –

a GstHarness

`allocator` ( [out][optional][nullable][transfer: none]) –

the GstAllocator used

`params` ( [out][optional]) –

the GstAllocationParams of allocator

Since : 1.6

#### GstCheck.Harness.prototype.get_allocator

    function GstCheck.Harness.prototype.get_allocator(): {
        // javascript wrapper for 'gst_harness_get_allocator'
    }

Gets the allocator and its params that has been decided to use after an allocation query.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Since : 1.6

#### GstCheck.Harness.get_allocator

    def GstCheck.Harness.get_allocator (self):
        #python wrapper for 'gst_harness_get_allocator'

Gets the allocator and its params that has been decided to use after an allocation query.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Since : 1.6

#### gst_harness_get_last_pushed_timestamp

    GstClockTime
    gst_harness_get_last_pushed_timestamp (GstHarness * h)

Get the timestamp of the last GstBuffer pushed on the GstHarness srcpad, typically with gst_harness_push or gst_harness_push_from_src.

MT safe.

Parameters:

`h` –

a GstHarness

Returns –

a GstClockTime with the timestamp or GST_CLOCK_TIME_NONE if no GstBuffer has been pushed on the GstHarness srcpad

Since : 1.6

#### GstCheck.Harness.prototype.get_last_pushed_timestamp

    function GstCheck.Harness.prototype.get_last_pushed_timestamp(): {
        // javascript wrapper for 'gst_harness_get_last_pushed_timestamp'
    }

Get the timestamp of the last Gst.Buffer pushed on the GstCheck.Harness srcpad, typically with gst_harness_push or gst_harness_push_from_src.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Number) –

a Number with the timestamp or Gst.CLOCK_TIME_NONE if no Gst.Buffer has been pushed on the GstCheck.Harness srcpad

Since : 1.6

#### GstCheck.Harness.get_last_pushed_timestamp

    def GstCheck.Harness.get_last_pushed_timestamp (self):
        #python wrapper for 'gst_harness_get_last_pushed_timestamp'

Get the timestamp of the last Gst.Buffer pushed on the GstCheck.Harness srcpad, typically with gst_harness_push or gst_harness_push_from_src.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (int) –

a int with the timestamp or Gst.CLOCK_TIME_NONE if no Gst.Buffer has been pushed on the GstCheck.Harness srcpad

Since : 1.6

#### gst_harness_get_testclock

    GstTestClock *
    gst_harness_get_testclock (GstHarness * h)

Get the GstTestClock. Useful if specific operations on the testclock is needed.

MT safe.

Parameters:

`h` –

a GstHarness

Returns ( [transfer: full][nullable]) –

a GstTestClock, or NULL if the testclock is not present.

Since : 1.6

#### GstCheck.Harness.prototype.get_testclock

    function GstCheck.Harness.prototype.get_testclock(): {
        // javascript wrapper for 'gst_harness_get_testclock'
    }

Get the GstCheck.TestClock. Useful if specific operations on the testclock is needed.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (GstCheck.TestClock) –

a GstCheck.TestClock, or null if the testclock is not present.

Since : 1.6

#### GstCheck.Harness.get_testclock

    def GstCheck.Harness.get_testclock (self):
        #python wrapper for 'gst_harness_get_testclock'

Get the GstCheck.TestClock. Useful if specific operations on the testclock is needed.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (GstCheck.TestClock) –

a GstCheck.TestClock, or None if the testclock is not present.

Since : 1.6

#### gst_harness_play

    gst_harness_play (GstHarness * h)

This will set the harnessed GstElement to GST_STATE_PLAYING. GstElement without a sink-#GstPad and with the GST_ELEMENT_FLAG_SOURCE flag set is considered a src GstElement Non-src GstElement (like sinks and filters) are automatically set to playing by the GstHarness, but src GstElement are not to avoid them starting to produce buffers. Hence, for src GstElement you must call gst_harness_play explicitly.

MT safe.

Parameters:

`h` –

a GstHarness

Since : 1.6

#### GstCheck.Harness.prototype.play

    function GstCheck.Harness.prototype.play(): {
        // javascript wrapper for 'gst_harness_play'
    }

This will set the harnessed Gst.Element to Gst.State.PLAYING. Gst.Element without a sink-#GstPad and with the Gst.ElementFlags.SOURCE flag set is considered a src Gst.Element Non-src Gst.Element (like sinks and filters) are automatically set to playing by the GstCheck.Harness, but src Gst.Element are not to avoid them starting to produce buffers. Hence, for src Gst.Element you must call GstCheck.Harness.prototype.play explicitly.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Since : 1.6

#### GstCheck.Harness.play

    def GstCheck.Harness.play (self):
        #python wrapper for 'gst_harness_play'

This will set the harnessed Gst.Element to Gst.State.PLAYING. Gst.Element without a sink-#GstPad and with the Gst.ElementFlags.SOURCE flag set is considered a src Gst.Element Non-src Gst.Element (like sinks and filters) are automatically set to playing by the GstCheck.Harness, but src Gst.Element are not to avoid them starting to produce buffers. Hence, for src Gst.Element you must call GstCheck.Harness.play explicitly.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Since : 1.6

#### gst_harness_pull

    GstBuffer *
    gst_harness_pull (GstHarness * h)

Pulls a GstBuffer from the GAsyncQueue on the GstHarness sinkpad. The pull will timeout in 60 seconds. This is the standard way of getting a buffer from a harnessed GstElement.

MT safe.

Parameters:

`h` –

a GstHarness

Returns ( [transfer: full][nullable]) –

a GstBuffer or NULL if timed out.

Since : 1.6

#### GstCheck.Harness.prototype.pull

    function GstCheck.Harness.prototype.pull(): {
        // javascript wrapper for 'gst_harness_pull'
    }

Pulls a Gst.Buffer from the GLib.AsyncQueue on the GstCheck.Harness sinkpad. The pull will timeout in 60 seconds. This is the standard way of getting a buffer from a harnessed Gst.Element.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Gst.Buffer) –

a Gst.Buffer or null if timed out.

Since : 1.6

#### GstCheck.Harness.pull

    def GstCheck.Harness.pull (self):
        #python wrapper for 'gst_harness_pull'

Pulls a Gst.Buffer from the GLib.AsyncQueue on the GstCheck.Harness sinkpad. The pull will timeout in 60 seconds. This is the standard way of getting a buffer from a harnessed Gst.Element.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Gst.Buffer) –

a Gst.Buffer or None if timed out.

Since : 1.6

#### gst_harness_pull_event

    GstEvent *
    gst_harness_pull_event (GstHarness * h)

Pulls an GstEvent from the GAsyncQueue on the GstHarness sinkpad. Timeouts after 60 seconds similar to gst_harness_pull.

MT safe.

Parameters:

`h` –

a GstHarness

Returns ( [transfer: full][nullable]) –

a GstEvent or NULL if timed out.

Since : 1.6

#### GstCheck.Harness.prototype.pull_event

    function GstCheck.Harness.prototype.pull_event(): {
        // javascript wrapper for 'gst_harness_pull_event'
    }

Pulls an Gst.Event from the GLib.AsyncQueue on the GstCheck.Harness sinkpad. Timeouts after 60 seconds similar to gst_harness_pull.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Gst.Event) –

a Gst.Event or null if timed out.

Since : 1.6

#### GstCheck.Harness.pull_event

    def GstCheck.Harness.pull_event (self):
        #python wrapper for 'gst_harness_pull_event'

Pulls an Gst.Event from the GLib.AsyncQueue on the GstCheck.Harness sinkpad. Timeouts after 60 seconds similar to gst_harness_pull.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Gst.Event) –

a Gst.Event or None if timed out.

Since : 1.6

#### gst_harness_pull_until_eos

    gboolean
    gst_harness_pull_until_eos (GstHarness * h,
                                GstBuffer ** buf)

Pulls a GstBuffer from the GAsyncQueue on the GstHarness sinkpad. The pull will block until an EOS event is received, or timeout in 60 seconds. MT safe.

Parameters:

`h` –

a GstHarness

`buf` ( [out][nullable][transfer: full]) –

A GstBuffer, or NULL if EOS or timeout occures first.

Returns –

TRUE on success, FALSE on timeout.

Since : 1.18

#### GstCheck.Harness.prototype.pull_until_eos

    function GstCheck.Harness.prototype.pull_until_eos(): {
        // javascript wrapper for 'gst_harness_pull_until_eos'
    }

Pulls a Gst.Buffer from the GLib.AsyncQueue on the GstCheck.Harness sinkpad. The pull will block until an EOS event is received, or timeout in 60 seconds. MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns a tuple made of:

(Number ) –

true on success, false on timeout.

`buf` (Gst.Buffer ) –

true on success, false on timeout.

Since : 1.18

#### GstCheck.Harness.pull_until_eos

    def GstCheck.Harness.pull_until_eos (self):
        #python wrapper for 'gst_harness_pull_until_eos'

Pulls a Gst.Buffer from the GLib.AsyncQueue on the GstCheck.Harness sinkpad. The pull will block until an EOS event is received, or timeout in 60 seconds. MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns a tuple made of:

(bool ) –

True on success, False on timeout.

`buf` (Gst.Buffer ) –

True on success, False on timeout.

Since : 1.18

#### gst_harness_pull_upstream_event

    GstEvent *
    gst_harness_pull_upstream_event (GstHarness * h)

Pulls an GstEvent from the GAsyncQueue on the GstHarness srcpad. Timeouts after 60 seconds similar to gst_harness_pull.

MT safe.

Parameters:

`h` –

a GstHarness

Returns ( [transfer: full][nullable]) –

a GstEvent or NULL if timed out.

Since : 1.6

#### GstCheck.Harness.prototype.pull_upstream_event

    function GstCheck.Harness.prototype.pull_upstream_event(): {
        // javascript wrapper for 'gst_harness_pull_upstream_event'
    }

Pulls an Gst.Event from the GLib.AsyncQueue on the GstCheck.Harness srcpad. Timeouts after 60 seconds similar to gst_harness_pull.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Gst.Event) –

a Gst.Event or null if timed out.

Since : 1.6

#### GstCheck.Harness.pull_upstream_event

    def GstCheck.Harness.pull_upstream_event (self):
        #python wrapper for 'gst_harness_pull_upstream_event'

Pulls an Gst.Event from the GLib.AsyncQueue on the GstCheck.Harness srcpad. Timeouts after 60 seconds similar to gst_harness_pull.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Gst.Event) –

a Gst.Event or None if timed out.

Since : 1.6

#### gst_harness_push

    GstFlowReturn
    gst_harness_push (GstHarness * h,
                      GstBuffer * buffer)

Pushes a GstBuffer on the GstHarness srcpad. The standard way of interacting with an harnessed element.

MT safe.

Parameters:

`h` –

a GstHarness

`buffer` ( [transfer: full]) –

a GstBuffer to push

Returns –

a GstFlowReturn with the result from the push

Since : 1.6

#### GstCheck.Harness.prototype.push

    function GstCheck.Harness.prototype.push(buffer: Gst.Buffer): {
        // javascript wrapper for 'gst_harness_push'
    }

Pushes a Gst.Buffer on the GstCheck.Harness srcpad. The standard way of interacting with an harnessed element.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`buffer` (Gst.Buffer) –

a Gst.Buffer to push

Returns (Gst.FlowReturn) –

a Gst.FlowReturn with the result from the push

Since : 1.6

#### GstCheck.Harness.push

    def GstCheck.Harness.push (self, buffer):
        #python wrapper for 'gst_harness_push'

Pushes a Gst.Buffer on the GstCheck.Harness srcpad. The standard way of interacting with an harnessed element.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`buffer` (Gst.Buffer) –

a Gst.Buffer to push

Returns (Gst.FlowReturn) –

a Gst.FlowReturn with the result from the push

Since : 1.6

#### gst_harness_push_and_pull

    GstBuffer *
    gst_harness_push_and_pull (GstHarness * h,
                               GstBuffer * buffer)

Basically a gst_harness_push and a gst_harness_pull in one line. Reflects the fact that you often want to do exactly this in your test: Push one buffer in, and inspect the outcome.

MT safe.

Parameters:

`h` –

a GstHarness

`buffer` ( [transfer: full]) –

a GstBuffer to push

Returns ( [transfer: full][nullable]) –

a GstBuffer or NULL if timed out.

Since : 1.6

#### GstCheck.Harness.prototype.push_and_pull

    function GstCheck.Harness.prototype.push_and_pull(buffer: Gst.Buffer): {
        // javascript wrapper for 'gst_harness_push_and_pull'
    }

Basically a gst_harness_push and a gst_harness_pull in one line. Reflects the fact that you often want to do exactly this in your test: Push one buffer in, and inspect the outcome.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`buffer` (Gst.Buffer) –

a Gst.Buffer to push

Returns (Gst.Buffer) –

a Gst.Buffer or null if timed out.

Since : 1.6

#### GstCheck.Harness.push_and_pull

    def GstCheck.Harness.push_and_pull (self, buffer):
        #python wrapper for 'gst_harness_push_and_pull'

Basically a gst_harness_push and a gst_harness_pull in one line. Reflects the fact that you often want to do exactly this in your test: Push one buffer in, and inspect the outcome.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`buffer` (Gst.Buffer) –

a Gst.Buffer to push

Returns (Gst.Buffer) –

a Gst.Buffer or None if timed out.

Since : 1.6

#### gst_harness_push_event

    gboolean
    gst_harness_push_event (GstHarness * h,
                            GstEvent * event)

Pushes an GstEvent on the GstHarness srcpad.

MT safe.

Parameters:

`h` –

a GstHarness

`event` ( [transfer: full]) –

a GstEvent to push

Returns –

a gboolean with the result from the push

Since : 1.6

#### GstCheck.Harness.prototype.push_event

    function GstCheck.Harness.prototype.push_event(event: Gst.Event): {
        // javascript wrapper for 'gst_harness_push_event'
    }

Pushes an Gst.Event on the GstCheck.Harness srcpad.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`event` (Gst.Event) –

a Gst.Event to push

Returns (Number) –

a Number with the result from the push

Since : 1.6

#### GstCheck.Harness.push_event

    def GstCheck.Harness.push_event (self, event):
        #python wrapper for 'gst_harness_push_event'

Pushes an Gst.Event on the GstCheck.Harness srcpad.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`event` (Gst.Event) –

a Gst.Event to push

Returns (bool) –

a bool with the result from the push

Since : 1.6

#### gst_harness_push_from_src

    GstFlowReturn
    gst_harness_push_from_src (GstHarness * h)

Transfer data from the src-#GstHarness to the main-#GstHarness. It consists of 4 steps: 1: Make sure the src is started. (see: gst_harness_play) 2: Crank the clock (see: gst_harness_crank_single_clock_wait) 3: Pull a GstBuffer from the src-#GstHarness (see: gst_harness_pull) 4: Push the same GstBuffer into the main-#GstHarness (see: gst_harness_push)

MT safe.

Parameters:

`h` –

a GstHarness

Returns –

a GstFlowReturn with the result of the push

Since : 1.6

#### GstCheck.Harness.prototype.push_from_src

    function GstCheck.Harness.prototype.push_from_src(): {
        // javascript wrapper for 'gst_harness_push_from_src'
    }

Transfer data from the src-#GstHarness to the main-#GstHarness. It consists of 4 steps: 1: Make sure the src is started. (see: gst_harness_play) 2: Crank the clock (see: gst_harness_crank_single_clock_wait) 3: Pull a Gst.Buffer from the src-#GstHarness (see: gst_harness_pull) 4: Push the same Gst.Buffer into the main-#GstHarness (see: gst_harness_push)

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Gst.FlowReturn) –

a Gst.FlowReturn with the result of the push

Since : 1.6

#### GstCheck.Harness.push_from_src

    def GstCheck.Harness.push_from_src (self):
        #python wrapper for 'gst_harness_push_from_src'

Transfer data from the src-#GstHarness to the main-#GstHarness. It consists of 4 steps: 1: Make sure the src is started. (see: gst_harness_play) 2: Crank the clock (see: gst_harness_crank_single_clock_wait) 3: Pull a Gst.Buffer from the src-#GstHarness (see: gst_harness_pull) 4: Push the same Gst.Buffer into the main-#GstHarness (see: gst_harness_push)

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Gst.FlowReturn) –

a Gst.FlowReturn with the result of the push

Since : 1.6

#### gst_harness_push_to_sink

    GstFlowReturn
    gst_harness_push_to_sink (GstHarness * h)

Transfer one GstBuffer from the main-#GstHarness to the sink-#GstHarness. See gst_harness_push_from_src for details.

MT safe.

Parameters:

`h` –

a GstHarness

Returns –

a GstFlowReturn with the result of the push

Since : 1.6

#### GstCheck.Harness.prototype.push_to_sink

    function GstCheck.Harness.prototype.push_to_sink(): {
        // javascript wrapper for 'gst_harness_push_to_sink'
    }

Transfer one Gst.Buffer from the main-#GstHarness to the sink-#GstHarness. See gst_harness_push_from_src for details.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Gst.FlowReturn) –

a Gst.FlowReturn with the result of the push

Since : 1.6

#### GstCheck.Harness.push_to_sink

    def GstCheck.Harness.push_to_sink (self):
        #python wrapper for 'gst_harness_push_to_sink'

Transfer one Gst.Buffer from the main-#GstHarness to the sink-#GstHarness. See gst_harness_push_from_src for details.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Gst.FlowReturn) –

a Gst.FlowReturn with the result of the push

Since : 1.6

#### gst_harness_push_upstream_event

    gboolean
    gst_harness_push_upstream_event (GstHarness * h,
                                     GstEvent * event)

Pushes an GstEvent on the GstHarness sinkpad.

MT safe.

Parameters:

`h` –

a GstHarness

`event` ( [transfer: full]) –

a GstEvent to push

Returns –

a gboolean with the result from the push

Since : 1.6

#### GstCheck.Harness.prototype.push_upstream_event

    function GstCheck.Harness.prototype.push_upstream_event(event: Gst.Event): {
        // javascript wrapper for 'gst_harness_push_upstream_event'
    }

Pushes an Gst.Event on the GstCheck.Harness sinkpad.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`event` (Gst.Event) –

a Gst.Event to push

Returns (Number) –

a Number with the result from the push

Since : 1.6

#### GstCheck.Harness.push_upstream_event

    def GstCheck.Harness.push_upstream_event (self, event):
        #python wrapper for 'gst_harness_push_upstream_event'

Pushes an Gst.Event on the GstCheck.Harness sinkpad.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`event` (Gst.Event) –

a Gst.Event to push

Returns (bool) –

a bool with the result from the push

Since : 1.6

#### gst_harness_query_latency

    GstClockTime
    gst_harness_query_latency (GstHarness * h)

Get the min latency reported by any harnessed GstElement.

MT safe.

Parameters:

`h` –

a GstHarness

Returns –

a GstClockTime with min latency

Since : 1.6

#### GstCheck.Harness.prototype.query_latency

    function GstCheck.Harness.prototype.query_latency(): {
        // javascript wrapper for 'gst_harness_query_latency'
    }

Get the min latency reported by any harnessed Gst.Element.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Number) –

a Number with min latency

Since : 1.6

#### GstCheck.Harness.query_latency

    def GstCheck.Harness.query_latency (self):
        #python wrapper for 'gst_harness_query_latency'

Get the min latency reported by any harnessed Gst.Element.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (int) –

a int with min latency

Since : 1.6

#### gst_harness_set

    gst_harness_set (GstHarness * h,
                     const gchar * element_name,
                     const gchar * first_property_name,
                     ... ...)

A convenience function to allows you to call g_object_set on a GstElement that are residing inside the GstHarness, by using normal g_object_set syntax.

MT safe.

Parameters:

`h` –

a GstHarness

`element_name` –

a gchar with a GstElementFactory name

`first_property_name` –

a gchar with the first property name

`...` –

value for the first property, followed optionally by more name/value pairs, followed by NULL

Since : 1.6

#### gst_harness_set_blocking_push_mode

    gst_harness_set_blocking_push_mode (GstHarness * h)

Setting this will make the harness block in the chain-function, and then release when gst_harness_pull or gst_harness_try_pull is called. Can be useful when wanting to control a src-element that is not implementing gst_clock_id_wait so it can't be controlled by the GstTestClock, since it otherwise would produce buffers as fast as possible.

MT safe.

Parameters:

`h` –

a GstHarness

Since : 1.6

#### GstCheck.Harness.prototype.set_blocking_push_mode

    function GstCheck.Harness.prototype.set_blocking_push_mode(): {
        // javascript wrapper for 'gst_harness_set_blocking_push_mode'
    }

Setting this will make the harness block in the chain-function, and then release when GstCheck.Harness.prototype.pull or GstCheck.Harness.prototype.try_pull is called. Can be useful when wanting to control a src-element that is not implementing Gst.Clock.prototype.id_wait so it can't be controlled by the GstCheck.TestClock, since it otherwise would produce buffers as fast as possible.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Since : 1.6

#### GstCheck.Harness.set_blocking_push_mode

    def GstCheck.Harness.set_blocking_push_mode (self):
        #python wrapper for 'gst_harness_set_blocking_push_mode'

Setting this will make the harness block in the chain-function, and then release when GstCheck.Harness.pull or GstCheck.Harness.try_pull is called. Can be useful when wanting to control a src-element that is not implementing Gst.Clock.id_wait so it can't be controlled by the GstCheck.TestClock, since it otherwise would produce buffers as fast as possible.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Since : 1.6

#### gst_harness_set_caps

    gst_harness_set_caps (GstHarness * h,
                          GstCaps * in,
                          GstCaps * out)

Sets the GstHarness srcpad and sinkpad caps.

MT safe.

Parameters:

`h` –

a GstHarness

`in` ( [transfer: full]) –

a GstCaps to set on the harness srcpad

`out` ( [transfer: full]) –

a GstCaps to set on the harness sinkpad

Since : 1.6

#### GstCheck.Harness.prototype.set_caps

    function GstCheck.Harness.prototype.set_caps(in: Gst.Caps, out: Gst.Caps): {
        // javascript wrapper for 'gst_harness_set_caps'
    }

Sets the GstHarness srcpad and sinkpad caps.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`in` (Gst.Caps) –

a Gst.Caps to set on the harness srcpad

`out` (Gst.Caps) –

a Gst.Caps to set on the harness sinkpad

Since : 1.6

#### GstCheck.Harness.set_caps

    def GstCheck.Harness.set_caps (self, in, out):
        #python wrapper for 'gst_harness_set_caps'

Sets the GstHarness srcpad and sinkpad caps.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`in` (Gst.Caps) –

a Gst.Caps to set on the harness srcpad

`out` (Gst.Caps) –

a Gst.Caps to set on the harness sinkpad

Since : 1.6

#### gst_harness_set_caps_str

    gst_harness_set_caps_str (GstHarness * h,
                              const gchar * in,
                              const gchar * out)

Sets the GstHarness srcpad and sinkpad caps using strings.

MT safe.

Parameters:

`h` –

a GstHarness

`in` –

a gchar describing a GstCaps to set on the harness srcpad

`out` –

a gchar describing a GstCaps to set on the harness sinkpad

Since : 1.6

#### GstCheck.Harness.prototype.set_caps_str

    function GstCheck.Harness.prototype.set_caps_str(in: String, out: String): {
        // javascript wrapper for 'gst_harness_set_caps_str'
    }

Sets the GstHarness srcpad and sinkpad caps using strings.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`in` (String) –

a gchar describing a Gst.Caps to set on the harness srcpad

`out` (String) –

a gchar describing a Gst.Caps to set on the harness sinkpad

Since : 1.6

#### GstCheck.Harness.set_caps_str

    def GstCheck.Harness.set_caps_str (self, in, out):
        #python wrapper for 'gst_harness_set_caps_str'

Sets the GstHarness srcpad and sinkpad caps using strings.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`in` (str) –

a gchar describing a Gst.Caps to set on the harness srcpad

`out` (str) –

a gchar describing a Gst.Caps to set on the harness sinkpad

Since : 1.6

#### gst_harness_set_drop_buffers

    gst_harness_set_drop_buffers (GstHarness * h,
                                  gboolean drop_buffers)

When set to TRUE, instead of placing the buffers arriving from the harnessed GstElement inside the sinkpads GAsyncQueue, they are instead unreffed.

MT safe.

Parameters:

`h` –

a GstHarness

`drop_buffers` –

a gboolean specifying to drop outgoing buffers or not

Since : 1.6

#### GstCheck.Harness.prototype.set_drop_buffers

    function GstCheck.Harness.prototype.set_drop_buffers(drop_buffers: Number): {
        // javascript wrapper for 'gst_harness_set_drop_buffers'
    }

When set to true, instead of placing the buffers arriving from the harnessed Gst.Element inside the sinkpads GLib.AsyncQueue, they are instead unreffed.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`drop_buffers` (Number) –

a Number specifying to drop outgoing buffers or not

Since : 1.6

#### GstCheck.Harness.set_drop_buffers

    def GstCheck.Harness.set_drop_buffers (self, drop_buffers):
        #python wrapper for 'gst_harness_set_drop_buffers'

When set to True, instead of placing the buffers arriving from the harnessed Gst.Element inside the sinkpads GLib.AsyncQueue, they are instead unreffed.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`drop_buffers` (bool) –

a bool specifying to drop outgoing buffers or not

Since : 1.6

#### gst_harness_set_forwarding

    gst_harness_set_forwarding (GstHarness * h,
                                gboolean forwarding)

As a convenience, a src-harness will forward GST_EVENT_STREAM_START, GST_EVENT_CAPS and GST_EVENT_SEGMENT 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 GST_QUERY_ALLOCATION.

If forwarding is disabled, the user will have to either manually push these events from the src-harness using gst_harness_src_push_event, or create and push them manually. While this will allow full control and inspection of these events, for the most cases having forwarding enabled will be sufficient when writing a test where the src-harness' main function is providing data for the main-harness.

Forwarding is enabled by default.

MT safe.

Parameters:

`h` –

a GstHarness

`forwarding` –

a gboolean to enable/disable forwarding

Since : 1.6

#### GstCheck.Harness.prototype.set_forwarding

    function GstCheck.Harness.prototype.set_forwarding(forwarding: Number): {
        // javascript wrapper for 'gst_harness_set_forwarding'
    }

As a convenience, a src-harness will forward Gst.EventType.STREAM_START, Gst.EventType.CAPS and Gst.EventType.SEGMENT 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 Gst.QueryType.ALLOCATION.

If forwarding is disabled, the user will have to either manually push these events from the src-harness using GstCheck.Harness.prototype.src_push_event, or create and push them manually. While this will allow full control and inspection of these events, for the most cases having forwarding enabled will be sufficient when writing a test where the src-harness' main function is providing data for the main-harness.

Forwarding is enabled by default.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`forwarding` (Number) –

a Number to enable/disable forwarding

Since : 1.6

#### GstCheck.Harness.set_forwarding

    def GstCheck.Harness.set_forwarding (self, forwarding):
        #python wrapper for 'gst_harness_set_forwarding'

As a convenience, a src-harness will forward Gst.EventType.STREAM_START, Gst.EventType.CAPS and Gst.EventType.SEGMENT 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 Gst.QueryType.ALLOCATION.

If forwarding is disabled, the user will have to either manually push these events from the src-harness using GstCheck.Harness.src_push_event, or create and push them manually. While this will allow full control and inspection of these events, for the most cases having forwarding enabled will be sufficient when writing a test where the src-harness' main function is providing data for the main-harness.

Forwarding is enabled by default.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`forwarding` (bool) –

a bool to enable/disable forwarding

Since : 1.6

#### gst_harness_set_live

    gst_harness_set_live (GstHarness * h,
                          gboolean is_live)

Sets the liveness reported by GstHarness when receiving a latency-query. The default is TRUE.

Parameters:

`h` –

a GstHarness

`is_live` –

TRUE for live, FALSE for non-live

Since : 1.20

#### GstCheck.Harness.prototype.set_live

    function GstCheck.Harness.prototype.set_live(is_live: Number): {
        // javascript wrapper for 'gst_harness_set_live'
    }

Sets the liveness reported by GstCheck.Harness when receiving a latency-query. The default is true.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`is_live` (Number) –

true for live, false for non-live

Since : 1.20

#### GstCheck.Harness.set_live

    def GstCheck.Harness.set_live (self, is_live):
        #python wrapper for 'gst_harness_set_live'

Sets the liveness reported by GstCheck.Harness when receiving a latency-query. The default is True.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`is_live` (bool) –

True for live, False for non-live

Since : 1.20

#### gst_harness_set_propose_allocator

    gst_harness_set_propose_allocator (GstHarness * h,
                                       GstAllocator * allocator,
                                       const GstAllocationParams * params)

Sets the allocator and params to propose when receiving an allocation query.

MT safe.

Parameters:

`h` –

a GstHarness

`allocator` ( [nullable][transfer: full]) –

a GstAllocator

`params` ( [nullable][transfer: none]) –

a GstAllocationParams

Since : 1.6

#### GstCheck.Harness.prototype.set_propose_allocator

    function GstCheck.Harness.prototype.set_propose_allocator(allocator: Gst.Allocator, params: Gst.AllocationParams): {
        // javascript wrapper for 'gst_harness_set_propose_allocator'
    }

Sets the allocator and params to propose when receiving an allocation query.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`allocator` (Gst.Allocator) –

a Gst.Allocator

`params` (Gst.AllocationParams) –

a Gst.AllocationParams

Since : 1.6

#### GstCheck.Harness.set_propose_allocator

    def GstCheck.Harness.set_propose_allocator (self, allocator, params):
        #python wrapper for 'gst_harness_set_propose_allocator'

Sets the allocator and params to propose when receiving an allocation query.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`allocator` (Gst.Allocator) –

a Gst.Allocator

`params` (Gst.AllocationParams) –

a Gst.AllocationParams

Since : 1.6

#### gst_harness_set_sink_caps

    gst_harness_set_sink_caps (GstHarness * h,
                               GstCaps * caps)

Sets the GstHarness sinkpad caps.

MT safe.

Parameters:

`h` –

a GstHarness

`caps` ( [transfer: full]) –

a GstCaps to set on the harness sinkpad

Since : 1.6

#### GstCheck.Harness.prototype.set_sink_caps

    function GstCheck.Harness.prototype.set_sink_caps(caps: Gst.Caps): {
        // javascript wrapper for 'gst_harness_set_sink_caps'
    }

Sets the GstHarness sinkpad caps.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`caps` (Gst.Caps) –

a Gst.Caps to set on the harness sinkpad

Since : 1.6

#### GstCheck.Harness.set_sink_caps

    def GstCheck.Harness.set_sink_caps (self, caps):
        #python wrapper for 'gst_harness_set_sink_caps'

Sets the GstHarness sinkpad caps.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`caps` (Gst.Caps) –

a Gst.Caps to set on the harness sinkpad

Since : 1.6

#### gst_harness_set_sink_caps_str

    gst_harness_set_sink_caps_str (GstHarness * h,
                                   const gchar * str)

Sets the GstHarness sinkpad caps using a string.

MT safe.

Parameters:

`h` –

a GstHarness

`str` –

a gchar describing a GstCaps to set on the harness sinkpad

Since : 1.6

#### GstCheck.Harness.prototype.set_sink_caps_str

    function GstCheck.Harness.prototype.set_sink_caps_str(str: String): {
        // javascript wrapper for 'gst_harness_set_sink_caps_str'
    }

Sets the GstHarness sinkpad caps using a string.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`str` (String) –

a gchar describing a Gst.Caps to set on the harness sinkpad

Since : 1.6

#### GstCheck.Harness.set_sink_caps_str

    def GstCheck.Harness.set_sink_caps_str (self, str):
        #python wrapper for 'gst_harness_set_sink_caps_str'

Sets the GstHarness sinkpad caps using a string.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`str` (str) –

a gchar describing a Gst.Caps to set on the harness sinkpad

Since : 1.6

#### gst_harness_set_src_caps

    gst_harness_set_src_caps (GstHarness * h,
                              GstCaps * caps)

Sets the GstHarness srcpad caps. This must be done before any buffers can legally be pushed from the harness to the element.

MT safe.

Parameters:

`h` –

a GstHarness

`caps` ( [transfer: full]) –

a GstCaps to set on the harness srcpad

Since : 1.6

#### GstCheck.Harness.prototype.set_src_caps

    function GstCheck.Harness.prototype.set_src_caps(caps: Gst.Caps): {
        // javascript wrapper for 'gst_harness_set_src_caps'
    }

Sets the GstHarness srcpad caps. This must be done before any buffers can legally be pushed from the harness to the element.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`caps` (Gst.Caps) –

a Gst.Caps to set on the harness srcpad

Since : 1.6

#### GstCheck.Harness.set_src_caps

    def GstCheck.Harness.set_src_caps (self, caps):
        #python wrapper for 'gst_harness_set_src_caps'

Sets the GstHarness srcpad caps. This must be done before any buffers can legally be pushed from the harness to the element.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`caps` (Gst.Caps) –

a Gst.Caps to set on the harness srcpad

Since : 1.6

#### gst_harness_set_src_caps_str

    gst_harness_set_src_caps_str (GstHarness * h,
                                  const gchar * str)

Sets the GstHarness srcpad caps using a string. This must be done before any buffers can legally be pushed from the harness to the element.

MT safe.

Parameters:

`h` –

a GstHarness

`str` –

a gchar describing a GstCaps to set on the harness srcpad

Since : 1.6

#### GstCheck.Harness.prototype.set_src_caps_str

    function GstCheck.Harness.prototype.set_src_caps_str(str: String): {
        // javascript wrapper for 'gst_harness_set_src_caps_str'
    }

Sets the GstHarness srcpad caps using a string. This must be done before any buffers can legally be pushed from the harness to the element.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`str` (String) –

a gchar describing a Gst.Caps to set on the harness srcpad

Since : 1.6

#### GstCheck.Harness.set_src_caps_str

    def GstCheck.Harness.set_src_caps_str (self, str):
        #python wrapper for 'gst_harness_set_src_caps_str'

Sets the GstHarness srcpad caps using a string. This must be done before any buffers can legally be pushed from the harness to the element.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`str` (str) –

a gchar describing a Gst.Caps to set on the harness srcpad

Since : 1.6

#### gst_harness_set_time

    gboolean
    gst_harness_set_time (GstHarness * h,
                          GstClockTime time)

Advance the GstTestClock to a specific time.

MT safe.

Parameters:

`h` –

a GstHarness

`time` –

a GstClockTime to advance the clock to

Returns –

a gboolean TRUE if the time could be set. FALSE if not.

Since : 1.6

#### GstCheck.Harness.prototype.set_time

    function GstCheck.Harness.prototype.set_time(time: Number): {
        // javascript wrapper for 'gst_harness_set_time'
    }

Advance the GstCheck.TestClock to a specific time.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`time` (Number) –

a Number to advance the clock to

Returns (Number) –

a gboolean true if the time could be set. false if not.

Since : 1.6

#### GstCheck.Harness.set_time

    def GstCheck.Harness.set_time (self, time):
        #python wrapper for 'gst_harness_set_time'

Advance the GstCheck.TestClock to a specific time.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`time` (int) –

a int to advance the clock to

Returns (bool) –

a gboolean True if the time could be set. False if not.

Since : 1.6

#### gst_harness_set_upstream_latency

    gst_harness_set_upstream_latency (GstHarness * h,
                                      GstClockTime latency)

Sets the min latency reported by GstHarness when receiving a latency-query

Parameters:

`h` –

a GstHarness

`latency` –

a GstClockTime specifying the latency

Since : 1.6

#### GstCheck.Harness.prototype.set_upstream_latency

    function GstCheck.Harness.prototype.set_upstream_latency(latency: Number): {
        // javascript wrapper for 'gst_harness_set_upstream_latency'
    }

Sets the min latency reported by GstCheck.Harness when receiving a latency-query

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`latency` (Number) –

a Number specifying the latency

Since : 1.6

#### GstCheck.Harness.set_upstream_latency

    def GstCheck.Harness.set_upstream_latency (self, latency):
        #python wrapper for 'gst_harness_set_upstream_latency'

Sets the min latency reported by GstCheck.Harness when receiving a latency-query

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`latency` (int) –

a int specifying the latency

Since : 1.6

#### gst_harness_sink_push_many

    GstFlowReturn
    gst_harness_sink_push_many (GstHarness * h,
                                gint pushes)

Convenience that calls gst_harness_push_to_sink pushes number of times. Will abort the pushing if any one push fails.

MT safe.

Parameters:

`h` –

a GstHarness

`pushes` –

a gint with the number of calls to gst_harness_push_to_sink

Returns –

a GstFlowReturn with the result of the push

Since : 1.6

#### GstCheck.Harness.prototype.sink_push_many

    function GstCheck.Harness.prototype.sink_push_many(pushes: Number): {
        // javascript wrapper for 'gst_harness_sink_push_many'
    }

Convenience that calls gst_harness_push_to_sink pushes number of times. Will abort the pushing if any one push fails.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`pushes` (Number) –

a Number with the number of calls to gst_harness_push_to_sink

Returns (Gst.FlowReturn) –

a Gst.FlowReturn with the result of the push

Since : 1.6

#### GstCheck.Harness.sink_push_many

    def GstCheck.Harness.sink_push_many (self, pushes):
        #python wrapper for 'gst_harness_sink_push_many'

Convenience that calls gst_harness_push_to_sink pushes number of times. Will abort the pushing if any one push fails.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`pushes` (int) –

a int with the number of calls to gst_harness_push_to_sink

Returns (Gst.FlowReturn) –

a Gst.FlowReturn with the result of the push

Since : 1.6

#### gst_harness_src_crank_and_push_many

    GstFlowReturn
    gst_harness_src_crank_and_push_many (GstHarness * h,
                                         gint cranks,
                                         gint pushes)

Transfer data from the src-#GstHarness to the main-#GstHarness. Similar to gst_harness_push_from_src, this variant allows you to specify how many cranks and how many pushes to perform. This can be useful for both moving a lot of data at the same time, as well as cases when one crank does not equal one buffer to push and v.v.

MT safe.

Parameters:

`h` –

a GstHarness

`cranks` –

a gint with the number of calls to gst_harness_crank_single_clock_wait

`pushes` –

a gint with the number of calls to gst_harness_push

Returns –

a GstFlowReturn with the result of the push

Since : 1.6

#### GstCheck.Harness.prototype.src_crank_and_push_many

    function GstCheck.Harness.prototype.src_crank_and_push_many(cranks: Number, pushes: Number): {
        // javascript wrapper for 'gst_harness_src_crank_and_push_many'
    }

Transfer data from the src-#GstHarness to the main-#GstHarness. Similar to gst_harness_push_from_src, this variant allows you to specify how many cranks and how many pushes to perform. This can be useful for both moving a lot of data at the same time, as well as cases when one crank does not equal one buffer to push and v.v.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`cranks` (Number) –

a Number with the number of calls to gst_harness_crank_single_clock_wait

`pushes` (Number) –

a Number with the number of calls to gst_harness_push

Returns (Gst.FlowReturn) –

a Gst.FlowReturn with the result of the push

Since : 1.6

#### GstCheck.Harness.src_crank_and_push_many

    def GstCheck.Harness.src_crank_and_push_many (self, cranks, pushes):
        #python wrapper for 'gst_harness_src_crank_and_push_many'

Transfer data from the src-#GstHarness to the main-#GstHarness. Similar to gst_harness_push_from_src, this variant allows you to specify how many cranks and how many pushes to perform. This can be useful for both moving a lot of data at the same time, as well as cases when one crank does not equal one buffer to push and v.v.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`cranks` (int) –

a int with the number of calls to gst_harness_crank_single_clock_wait

`pushes` (int) –

a int with the number of calls to gst_harness_push

Returns (Gst.FlowReturn) –

a Gst.FlowReturn with the result of the push

Since : 1.6

#### gst_harness_src_push_event

    gboolean
    gst_harness_src_push_event (GstHarness * h)

Similar to what gst_harness_src_push does with GstBuffer, this transfers a GstEvent from the src-#GstHarness to the main-#GstHarness. Note that some GstEvent are being transferred automagically. Look at sink_forward_pad for details.

MT safe.

Parameters:

`h` –

a GstHarness

Returns –

a gboolean with the result of the push

Since : 1.6

#### GstCheck.Harness.prototype.src_push_event

    function GstCheck.Harness.prototype.src_push_event(): {
        // javascript wrapper for 'gst_harness_src_push_event'
    }

Similar to what gst_harness_src_push does with Gst.Buffer, this transfers a Gst.Event from the src-#GstHarness to the main-#GstHarness. Note that some Gst.Event are being transferred automagically. Look at sink_forward_pad for details.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Number) –

a Number with the result of the push

Since : 1.6

#### GstCheck.Harness.src_push_event

    def GstCheck.Harness.src_push_event (self):
        #python wrapper for 'gst_harness_src_push_event'

Similar to what gst_harness_src_push does with Gst.Buffer, this transfers a Gst.Event from the src-#GstHarness to the main-#GstHarness. Note that some Gst.Event are being transferred automagically. Look at sink_forward_pad for details.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (bool) –

a bool with the result of the push

Since : 1.6

#### gst_harness_stress_custom_start

    GstHarnessThread *
    gst_harness_stress_custom_start (GstHarness * h,
                                     GFunc init,
                                     GFunc callback,
                                     gpointer data,
                                     gulong sleep)

Start a custom stress-thread that will call your callback for every iteration allowing you to do something nasty.

MT safe.

Parameters:

`h` –

a GstHarness

`init` ( [nullable]) –

a GFunc that is called initially and only once

`callback` –

a GFunc that is called as often as possible

`data` –

a gpointer with custom data to pass to the callback function

`sleep` –

a gulong specifying how long to sleep in (microseconds) for each call to the callback

Returns –

a GstHarnessThread

Since : 1.6

#### gst_harness_stress_property_start_full

    GstHarnessThread *
    gst_harness_stress_property_start_full (GstHarness * h,
                                            const gchar * name,
                                            const GValue * value,
                                            gulong sleep)

Call g_object_set with name and value in intervals of sleep microseconds

MT safe.

Parameters:

`h` –

a GstHarness

`name` –

a gchar specifying a property name

`value` –

a GValue to set the property to

`sleep` –

a gulong specifying how long to sleep in (microseconds) for each g_object_set with name and value

Returns –

a GstHarnessThread

Since : 1.6

#### gst_harness_stress_push_buffer_start_full

    GstHarnessThread *
    gst_harness_stress_push_buffer_start_full (GstHarness * h,
                                               GstCaps * caps,
                                               const GstSegment * segment,
                                               GstBuffer * buf,
                                               gulong sleep)

Push a GstBuffer in intervals of sleep microseconds.

MT safe.

Parameters:

`h` –

a GstHarness

`caps` –

a GstCaps for the GstBuffer

`segment` –

a GstSegment

`buf` –

a GstBuffer to push

`sleep` –

a gulong specifying how long to sleep in (microseconds) for each call to gst_pad_push

Returns –

a GstHarnessThread

Since : 1.6

#### gst_harness_stress_push_buffer_with_cb_start_full

    GstHarnessThread *
    gst_harness_stress_push_buffer_with_cb_start_full (GstHarness * h,
                                                       GstCaps * caps,
                                                       const GstSegment * segment,
                                                       GstHarnessPrepareBufferFunc func,
                                                       gpointer data,
                                                       GDestroyNotify notify,
                                                       gulong sleep)

Push a GstBuffer returned by func in intervals of sleep microseconds.

MT safe.

Parameters:

`h` –

a GstHarness

`caps` –

a GstCaps for the GstBuffer

`segment` –

a GstSegment

`func` –

a GstHarnessPrepareBufferFunc function called before every iteration to prepare / create a GstBuffer for pushing

`data` –

a gpointer with data to the GstHarnessPrepareBufferFunc function

`notify` –

a GDestroyNotify that is called when thread is stopped

`sleep` –

a gulong specifying how long to sleep in (microseconds) for each call to gst_pad_push

Returns –

a GstHarnessThread

Since : 1.6

#### gst_harness_stress_push_event_start_full

    GstHarnessThread *
    gst_harness_stress_push_event_start_full (GstHarness * h,
                                              GstEvent * event,
                                              gulong sleep)

Push the event onto the harnessed GstElement sinkpad in intervals of sleep microseconds

MT safe.

Parameters:

`h` –

a GstHarness

`event` –

a GstEvent to push

`sleep` –

a gulong specifying how long to sleep in (microseconds) for each gst_event_push with event

Returns –

a GstHarnessThread

Since : 1.6

#### gst_harness_stress_push_event_with_cb_start_full

    GstHarnessThread *
    gst_harness_stress_push_event_with_cb_start_full (GstHarness * h,
                                                      GstHarnessPrepareEventFunc func,
                                                      gpointer data,
                                                      GDestroyNotify notify,
                                                      gulong sleep)

Push a GstEvent returned by func onto the harnessed GstElement sinkpad in intervals of sleep microseconds.

MT safe.

Parameters:

`h` –

a GstHarness

`func` –

a GstHarnessPrepareEventFunc function called before every iteration to prepare / create a GstEvent for pushing

`data` –

a gpointer with data to the GstHarnessPrepareEventFunc function

`notify` –

a GDestroyNotify that is called when thread is stopped

`sleep` –

a gulong specifying how long to sleep in (microseconds) for each call to gst_pad_push

Returns –

a GstHarnessThread

Since : 1.8

#### gst_harness_stress_push_upstream_event_start_full

    GstHarnessThread *
    gst_harness_stress_push_upstream_event_start_full (GstHarness * h,
                                                       GstEvent * event,
                                                       gulong sleep)

Push the event onto the harnessed GstElement srcpad in intervals of sleep microseconds.

MT safe.

Parameters:

`h` –

a GstHarness

`event` –

a GstEvent to push

`sleep` –

a gulong specifying how long to sleep in (microseconds) for each gst_event_push with event

Returns –

a GstHarnessThread

Since : 1.6

#### gst_harness_stress_push_upstream_event_with_cb_start_full

    GstHarnessThread *
    gst_harness_stress_push_upstream_event_with_cb_start_full (GstHarness * h,
                                                               GstHarnessPrepareEventFunc func,
                                                               gpointer data,
                                                               GDestroyNotify notify,
                                                               gulong sleep)

Push a GstEvent returned by func onto the harnessed GstElement srcpad in intervals of sleep microseconds.

MT safe.

Parameters:

`h` –

a GstHarness

`func` –

a GstHarnessPrepareEventFunc function called before every iteration to prepare / create a GstEvent for pushing

`data` –

a gpointer with data to the GstHarnessPrepareEventFunc function

`notify` –

a GDestroyNotify that is called when thread is stopped

`sleep` –

a gulong specifying how long to sleep in (microseconds) for each call to gst_pad_push

Returns –

a GstHarnessThread

Since : 1.8

#### gst_harness_stress_requestpad_start_full

    GstHarnessThread *
    gst_harness_stress_requestpad_start_full (GstHarness * h,
                                              GstPadTemplate * templ,
                                              const gchar * name,
                                              GstCaps * caps,
                                              gboolean release,
                                              gulong sleep)

Call gst_element_request_pad in intervals of sleep microseconds

MT safe.

Parameters:

`h` –

a GstHarness

`templ` –

a GstPadTemplate

`name` –

a gchar

`caps` –

a GstCaps

`release` –

a gboolean

`sleep` –

a gulong specifying how long to sleep in (microseconds) for each gst_element_request_pad

Returns –

a GstHarnessThread

Since : 1.6

#### gst_harness_stress_statechange_start_full

    GstHarnessThread *
    gst_harness_stress_statechange_start_full (GstHarness * h,
                                               gulong sleep)

Change the state of your harnessed GstElement from NULL to PLAYING and back again, only pausing for sleep microseconds every time.

MT safe.

Parameters:

`h` –

a GstHarness

`sleep` –

a gulong specifying how long to sleep in (microseconds) for each state-change

Returns –

a GstHarnessThread

Since : 1.6

#### gst_harness_take_all_data

    guint8 *
    gst_harness_take_all_data (GstHarness * h,
                               gsize * size)

Pulls all pending data from the harness and returns it as a single data slice.

Parameters:

`h` –

a GstHarness

`size` ( [out]) –

the size of the data in bytes

Returns ( [transfer: full]) –

a pointer to the data, newly allocated. Free with g_free when no longer needed. Will return NULL if there is no data.

Since : 1.14

#### gst_harness_take_all_data_as_buffer

    GstBuffer *
    gst_harness_take_all_data_as_buffer (GstHarness * h)

Pulls all pending data from the harness and returns it as a single buffer.

Parameters:

`h` –

a GstHarness

Returns ( [transfer: full]) –

the data as a buffer. Unref with gst_buffer_unref when no longer needed.

Since : 1.14

#### GstCheck.Harness.prototype.take_all_data_as_buffer

    function GstCheck.Harness.prototype.take_all_data_as_buffer(): {
        // javascript wrapper for 'gst_harness_take_all_data_as_buffer'
    }

Pulls all pending data from the harness and returns it as a single buffer.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Gst.Buffer) –

the data as a buffer. Unref with gst_buffer_unref (not introspectable) when no longer needed.

Since : 1.14

#### GstCheck.Harness.take_all_data_as_buffer

    def GstCheck.Harness.take_all_data_as_buffer (self):
        #python wrapper for 'gst_harness_take_all_data_as_buffer'

Pulls all pending data from the harness and returns it as a single buffer.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Gst.Buffer) –

the data as a buffer. Unref with gst_buffer_unref (not introspectable) when no longer needed.

Since : 1.14

#### gst_harness_take_all_data_as_bytes

    GBytes *
    gst_harness_take_all_data_as_bytes (GstHarness * h)

Pulls all pending data from the harness and returns it as a single GBytes.

Parameters:

`h` –

a GstHarness

Returns ( [transfer: full]) –

a pointer to the data, newly allocated. Free with g_free when no longer needed.

Since : 1.14

#### GstCheck.Harness.prototype.take_all_data_as_bytes

    function GstCheck.Harness.prototype.take_all_data_as_bytes(): {
        // javascript wrapper for 'gst_harness_take_all_data_as_bytes'
    }

Pulls all pending data from the harness and returns it as a single GBytes (not introspectable).

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (GBytes (not introspectable)) –

a pointer to the data, newly allocated. Free with GLib.prototype.free when no longer needed.

Since : 1.14

#### GstCheck.Harness.take_all_data_as_bytes

    def GstCheck.Harness.take_all_data_as_bytes (self):
        #python wrapper for 'gst_harness_take_all_data_as_bytes'

Pulls all pending data from the harness and returns it as a single GBytes (not introspectable).

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (GBytes (not introspectable)) –

a pointer to the data, newly allocated. Free with GLib.free when no longer needed.

Since : 1.14

#### gst_harness_teardown

    gst_harness_teardown (GstHarness * h)

Tears down a GstHarness, freeing all resources allocated using it.

MT safe.

Parameters:

`h` –

a GstHarness

Since : 1.6

#### GstCheck.Harness.prototype.teardown

    function GstCheck.Harness.prototype.teardown(): {
        // javascript wrapper for 'gst_harness_teardown'
    }

Tears down a GstHarness, freeing all resources allocated using it.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Since : 1.6

#### GstCheck.Harness.teardown

    def GstCheck.Harness.teardown (self):
        #python wrapper for 'gst_harness_teardown'

Tears down a GstHarness, freeing all resources allocated using it.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Since : 1.6

#### gst_harness_try_pull

    GstBuffer *
    gst_harness_try_pull (GstHarness * h)

Pulls a GstBuffer from the GAsyncQueue on the GstHarness sinkpad. Unlike gst_harness_pull this will not wait for any buffers if not any are present, and return NULL straight away.

MT safe.

Parameters:

`h` –

a GstHarness

Returns ( [transfer: full][nullable]) –

a GstBuffer or NULL if no buffers are present in the GAsyncQueue

Since : 1.6

#### GstCheck.Harness.prototype.try_pull

    function GstCheck.Harness.prototype.try_pull(): {
        // javascript wrapper for 'gst_harness_try_pull'
    }

Pulls a Gst.Buffer from the GLib.AsyncQueue on the GstCheck.Harness sinkpad. Unlike gst_harness_pull this will not wait for any buffers if not any are present, and return null straight away.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Gst.Buffer) –

a Gst.Buffer or null if no buffers are present in the GLib.AsyncQueue

Since : 1.6

#### GstCheck.Harness.try_pull

    def GstCheck.Harness.try_pull (self):
        #python wrapper for 'gst_harness_try_pull'

Pulls a Gst.Buffer from the GLib.AsyncQueue on the GstCheck.Harness sinkpad. Unlike gst_harness_pull this will not wait for any buffers if not any are present, and return None straight away.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Gst.Buffer) –

a Gst.Buffer or None if no buffers are present in the GLib.AsyncQueue

Since : 1.6

#### gst_harness_try_pull_event

    GstEvent *
    gst_harness_try_pull_event (GstHarness * h)

Pulls an GstEvent from the GAsyncQueue on the GstHarness sinkpad. See gst_harness_try_pull for details.

MT safe.

Parameters:

`h` –

a GstHarness

Returns ( [transfer: full][nullable]) –

a GstEvent or NULL if no buffers are present in the GAsyncQueue

Since : 1.6

#### GstCheck.Harness.prototype.try_pull_event

    function GstCheck.Harness.prototype.try_pull_event(): {
        // javascript wrapper for 'gst_harness_try_pull_event'
    }

Pulls an Gst.Event from the GLib.AsyncQueue on the GstCheck.Harness sinkpad. See gst_harness_try_pull for details.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Gst.Event) –

a Gst.Event or null if no buffers are present in the GLib.AsyncQueue

Since : 1.6

#### GstCheck.Harness.try_pull_event

    def GstCheck.Harness.try_pull_event (self):
        #python wrapper for 'gst_harness_try_pull_event'

Pulls an Gst.Event from the GLib.AsyncQueue on the GstCheck.Harness sinkpad. See gst_harness_try_pull for details.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Gst.Event) –

a Gst.Event or None if no buffers are present in the GLib.AsyncQueue

Since : 1.6

#### gst_harness_try_pull_upstream_event

    GstEvent *
    gst_harness_try_pull_upstream_event (GstHarness * h)

Pulls an GstEvent from the GAsyncQueue on the GstHarness srcpad. See gst_harness_try_pull for details.

MT safe.

Parameters:

`h` –

a GstHarness

Returns ( [transfer: full][nullable]) –

a GstEvent or NULL if no buffers are present in the GAsyncQueue

Since : 1.6

#### GstCheck.Harness.prototype.try_pull_upstream_event

    function GstCheck.Harness.prototype.try_pull_upstream_event(): {
        // javascript wrapper for 'gst_harness_try_pull_upstream_event'
    }

Pulls an Gst.Event from the GLib.AsyncQueue on the GstCheck.Harness srcpad. See gst_harness_try_pull for details.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Gst.Event) –

a Gst.Event or null if no buffers are present in the GLib.AsyncQueue

Since : 1.6

#### GstCheck.Harness.try_pull_upstream_event

    def GstCheck.Harness.try_pull_upstream_event (self):
        #python wrapper for 'gst_harness_try_pull_upstream_event'

Pulls an Gst.Event from the GLib.AsyncQueue on the GstCheck.Harness srcpad. See gst_harness_try_pull for details.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Gst.Event) –

a Gst.Event or None if no buffers are present in the GLib.AsyncQueue

Since : 1.6

#### gst_harness_upstream_events_in_queue

    guint
    gst_harness_upstream_events_in_queue (GstHarness * h)

The number of GstEvent currently in the GstHarness srcpad GAsyncQueue

MT safe.

Parameters:

`h` –

a GstHarness

Returns –

a guint number of events in the queue

Since : 1.6

#### GstCheck.Harness.prototype.upstream_events_in_queue

    function GstCheck.Harness.prototype.upstream_events_in_queue(): {
        // javascript wrapper for 'gst_harness_upstream_events_in_queue'
    }

The number of Gst.Event currently in the GstCheck.Harness srcpad GLib.AsyncQueue

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Number) –

a Number number of events in the queue

Since : 1.6

#### GstCheck.Harness.upstream_events_in_queue

    def GstCheck.Harness.upstream_events_in_queue (self):
        #python wrapper for 'gst_harness_upstream_events_in_queue'

The number of Gst.Event currently in the GstCheck.Harness srcpad GLib.AsyncQueue

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (int) –

a int number of events in the queue

Since : 1.6

#### gst_harness_upstream_events_received

    guint
    gst_harness_upstream_events_received (GstHarness * h)

The total number of GstEvent that has arrived on the GstHarness srcpad This number includes events handled by the harness as well as events that have already been pulled out.

MT safe.

Parameters:

`h` –

a GstHarness

Returns –

a guint number of events received

Since : 1.6

#### GstCheck.Harness.prototype.upstream_events_received

    function GstCheck.Harness.prototype.upstream_events_received(): {
        // javascript wrapper for 'gst_harness_upstream_events_received'
    }

The total number of Gst.Event that has arrived on the GstCheck.Harness srcpad This number includes events handled by the harness as well as events that have already been pulled out.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (Number) –

a Number number of events received

Since : 1.6

#### GstCheck.Harness.upstream_events_received

    def GstCheck.Harness.upstream_events_received (self):
        #python wrapper for 'gst_harness_upstream_events_received'

The total number of Gst.Event that has arrived on the GstCheck.Harness srcpad This number includes events handled by the harness as well as events that have already been pulled out.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Returns (int) –

a int number of events received

Since : 1.6

#### gst_harness_use_systemclock

    gst_harness_use_systemclock (GstHarness * h)

Sets the system GstClock on the GstHarness GstElement

MT safe.

Parameters:

`h` –

a GstHarness

Since : 1.6

#### GstCheck.Harness.prototype.use_systemclock

    function GstCheck.Harness.prototype.use_systemclock(): {
        // javascript wrapper for 'gst_harness_use_systemclock'
    }

Sets the system Gst.Clock on the GstHarness Gst.Element

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Since : 1.6

#### GstCheck.Harness.use_systemclock

    def GstCheck.Harness.use_systemclock (self):
        #python wrapper for 'gst_harness_use_systemclock'

Sets the system Gst.Clock on the GstHarness Gst.Element

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Since : 1.6

#### gst_harness_use_testclock

    gst_harness_use_testclock (GstHarness * h)

Sets the GstTestClock on the GstHarness GstElement

MT safe.

Parameters:

`h` –

a GstHarness

Since : 1.6

#### GstCheck.Harness.prototype.use_testclock

    function GstCheck.Harness.prototype.use_testclock(): {
        // javascript wrapper for 'gst_harness_use_testclock'
    }

Sets the GstCheck.TestClock on the GstCheck.Harness Gst.Element

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Since : 1.6

#### GstCheck.Harness.use_testclock

    def GstCheck.Harness.use_testclock (self):
        #python wrapper for 'gst_harness_use_testclock'

Sets the GstCheck.TestClock on the GstCheck.Harness Gst.Element

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

Since : 1.6

#### gst_harness_wait_for_clock_id_waits

    gboolean
    gst_harness_wait_for_clock_id_waits (GstHarness * h,
                                         guint waits,
                                         guint timeout)

Waits for timeout seconds until waits number of GstClockID waits is registered with the GstTestClock. Useful for writing deterministic tests, where you want to make sure that an expected number of waits have been reached.

MT safe.

Parameters:

`h` –

a GstHarness

`waits` –

a guint describing the numbers of GstClockID registered with the GstTestClock

`timeout` –

a guint describing how many seconds to wait for waits to be true

Returns –

a gboolean TRUE if the waits have been registered, FALSE if not. (Could be that it timed out waiting or that more waits than waits was found)

Since : 1.6

#### GstCheck.Harness.prototype.wait_for_clock_id_waits

    function GstCheck.Harness.prototype.wait_for_clock_id_waits(waits: Number, timeout: Number): {
        // javascript wrapper for 'gst_harness_wait_for_clock_id_waits'
    }

Waits for timeout seconds until waits number of Object waits is registered with the GstCheck.TestClock. Useful for writing deterministic tests, where you want to make sure that an expected number of waits have been reached.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`waits` (Number) –

a Number describing the numbers of Object registered with the GstCheck.TestClock

`timeout` (Number) –

a Number describing how many seconds to wait for waits to be true

Returns (Number) –

a gboolean true if the waits have been registered, false if not. (Could be that it timed out waiting or that more waits than waits was found)

Since : 1.6

#### GstCheck.Harness.wait_for_clock_id_waits

    def GstCheck.Harness.wait_for_clock_id_waits (self, waits, timeout):
        #python wrapper for 'gst_harness_wait_for_clock_id_waits'

Waits for timeout seconds until waits number of object waits is registered with the GstCheck.TestClock. Useful for writing deterministic tests, where you want to make sure that an expected number of waits have been reached.

MT safe.

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`waits` (int) –

a int describing the numbers of object registered with the GstCheck.TestClock

`timeout` (int) –

a int describing how many seconds to wait for waits to be true

Returns (bool) –

a gboolean True if the waits have been registered, False if not. (Could be that it timed out waiting or that more waits than waits was found)

Since : 1.6

### Functions

#### gst_harness_new

    GstHarness *
    gst_harness_new (const gchar * element_name)

Creates a new harness. Works like gst_harness_new_with_padnames, except it assumes the GstElement sinkpad is named "sink" and srcpad is named "src"

MT safe.

Parameters:

`element_name` –

a gchar describing the GstElement name

Returns ( [transfer: full][nullable]) –

a GstHarness, or NULL if the harness could not be created

Since : 1.6

#### gst_harness_new_empty

    GstHarness *
    gst_harness_new_empty ()

Creates a new empty harness. Use gst_harness_add_element_full to add an GstElement to it.

MT safe.

Returns ( [transfer: full][nullable]) –

a GstHarness, or NULL if the harness could not be created

Since : 1.8

#### gst_harness_new_full

    GstHarness *
    gst_harness_new_full (GstElement * element,
                          GstStaticPadTemplate * hsrc,
                          const gchar * element_sinkpad_name,
                          GstStaticPadTemplate * hsink,
                          const gchar * element_srcpad_name)

Creates a new harness.

MT safe.

Parameters:

`element` –

a GstElement to attach the harness to (transfer none)

`hsrc` ( [nullable]) –

a GstStaticPadTemplate describing the harness srcpad. NULL will not create a harness srcpad.

`element_sinkpad_name` ( [nullable]) –

a gchar 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. NULL will not get/request a sinkpad from the element. (Like if the element is a src.)

`hsink` ( [nullable]) –

a GstStaticPadTemplate describing the harness sinkpad. NULL will not create a harness sinkpad.

`element_srcpad_name` ( [nullable]) –

a gchar with the name of the element srcpad that is then linked to the harness sinkpad, similar to the element_sinkpad_name.

Returns ( [transfer: full][nullable]) –

a GstHarness, or NULL if the harness could not be created

Since : 1.6

#### gst_harness_new_parse

    GstHarness *
    gst_harness_new_parse (const gchar * launchline)

Creates a new harness, parsing the launchline and putting that in a GstBin, and then attches the harness to the bin.

MT safe.

Parameters:

`launchline` –

a gchar describing a gst-launch type line

Returns ( [transfer: full][nullable]) –

a GstHarness, or NULL if the harness could not be created

Since : 1.6

#### gst_harness_new_with_element

    GstHarness *
    gst_harness_new_with_element (GstElement * element,
                                  const gchar * element_sinkpad_name,
                                  const gchar * element_srcpad_name)

Creates a new harness. Works in the same way as gst_harness_new_full, only that generic padtemplates are used for the harness src and sinkpads, which will be sufficient in most usecases.

MT safe.

Parameters:

`element` –

a GstElement to attach the harness to (transfer none)

`element_sinkpad_name` ( [nullable]) –

a gchar with the name of the element sinkpad that is then linked to the harness srcpad. NULL does not attach a sinkpad

`element_srcpad_name` ( [nullable]) –

a gchar with the name of the element srcpad that is then linked to the harness sinkpad. NULL does not attach a srcpad

Returns ( [transfer: full][nullable]) –

a GstHarness, or NULL if the harness could not be created

Since : 1.6

#### gst_harness_new_with_padnames

    GstHarness *
    gst_harness_new_with_padnames (const gchar * element_name,
                                   const gchar * element_sinkpad_name,
                                   const gchar * element_srcpad_name)

Creates a new harness. Works like gst_harness_new_with_element, except you specify the factoryname of the GstElement

MT safe.

Parameters:

`element_name` –

a gchar describing the GstElement name

`element_sinkpad_name` ( [nullable]) –

a gchar with the name of the element sinkpad that is then linked to the harness srcpad. NULL does not attach a sinkpad

`element_srcpad_name` ( [nullable]) –

a gchar with the name of the element srcpad that is then linked to the harness sinkpad. NULL does not attach a srcpad

Returns ( [transfer: full][nullable]) –

a GstHarness, or NULL if the harness could not be created

Since : 1.6

#### gst_harness_new_with_templates

    GstHarness *
    gst_harness_new_with_templates (const gchar * element_name,
                                    GstStaticPadTemplate * hsrc,
                                    GstStaticPadTemplate * hsink)

Creates a new harness, like gst_harness_new_full, except it assumes the GstElement sinkpad is named "sink" and srcpad is named "src"

MT safe.

Parameters:

`element_name` –

a gchar describing the GstElement name

`hsrc` ( [nullable]) –

a GstStaticPadTemplate describing the harness srcpad. NULL will not create a harness srcpad.

`hsink` ( [nullable]) –

a GstStaticPadTemplate describing the harness sinkpad. NULL will not create a harness sinkpad.

Returns ( [transfer: full][nullable]) –

a GstHarness, or NULL if the harness could not be created

Since : 1.6

#### gst_harness_stress_thread_stop

    guint
    gst_harness_stress_thread_stop (GstHarnessThread * t)

Stop the running GstHarnessThread

MT safe.

Parameters:

`t` –

a GstHarnessThread

Returns –
No description available

Since : 1.6

#### GstCheck.Harness.prototype.stress_thread_stop

    function GstCheck.Harness.prototype.stress_thread_stop(t: GstCheck.HarnessThread): {
        // javascript wrapper for 'gst_harness_stress_thread_stop'
    }

Stop the running GstCheck.HarnessThread

MT safe.

Parameters:

`t` (GstCheck.HarnessThread) –

a GstCheck.HarnessThread

Returns (Number) –
No description available

Since : 1.6

#### GstCheck.Harness.stress_thread_stop

    def GstCheck.Harness.stress_thread_stop (t):
        #python wrapper for 'gst_harness_stress_thread_stop'

Stop the running GstCheck.HarnessThread

MT safe.

Parameters:

`t` (GstCheck.HarnessThread) –

a GstCheck.HarnessThread

Returns (int) –
No description available

Since : 1.6

## GstHarnessThread

Opaque handle representing a GstHarness stress testing thread.

Since : 1.6

## GstCheck.HarnessThread

Opaque handle representing a GstHarness stress testing thread.

Since : 1.6

## GstCheck.HarnessThread

Opaque handle representing a GstHarness stress testing thread.

Since : 1.6

## Function Macros

### gst_harness_stress_property_start

    #define gst_harness_stress_property_start(h, n, v)                             \
      gst_harness_stress_property_start_full (h, n, v, G_USEC_PER_SEC / 1000)

### gst_harness_stress_push_buffer_start

    #define gst_harness_stress_push_buffer_start(h, c, s, b)                       \
      gst_harness_stress_push_buffer_start_full (h, c, s, b, 0)

### gst_harness_stress_push_buffer_with_cb_start

    #define gst_harness_stress_push_buffer_with_cb_start(h, c, s, f, d, n)         \
      gst_harness_stress_push_buffer_with_cb_start_full (h, c, s, f, d, n, 0)

### gst_harness_stress_push_event_start

    #define gst_harness_stress_push_event_start(h, e)                              \
      gst_harness_stress_push_event_start_full (h, e, 0)

### gst_harness_stress_push_event_with_cb_start

    #define gst_harness_stress_push_event_with_cb_start(h, f, d, n)                \
      gst_harness_stress_push_event_with_cb_start_full (h, f, d, n, 0)

### gst_harness_stress_requestpad_start

    #define gst_harness_stress_requestpad_start(h, t, n, c, r)                     \
      gst_harness_stress_requestpad_start_full (h, t, n, c, r, G_USEC_PER_SEC / 100)

### gst_harness_stress_send_upstream_event_start

    #define gst_harness_stress_send_upstream_event_start(h, e)                     \
      gst_harness_stress_push_upstream_event_start_full (h, e, 0)

### gst_harness_stress_send_upstream_event_with_cb_start

    #define gst_harness_stress_send_upstream_event_with_cb_start(h, f, d, n)       \
      gst_harness_stress_push_upstream_event_with_cb_start_full (h, f, d, n, 0)

### gst_harness_stress_statechange_start

    #define gst_harness_stress_statechange_start(h)                                \
      gst_harness_stress_statechange_start_full (h, G_USEC_PER_SEC / 100)

## Callbacks

### GstHarnessPrepareBufferFunc

    GstBuffer *
    (*GstHarnessPrepareBufferFunc) (GstHarness * h,
                                    gpointer data)

Parameters:

`h` –

a GstHarness

`data` –

user data

Returns –
No description available

Since : 1.6

### GstCheck.HarnessPrepareBufferFunc

    function GstCheck.HarnessPrepareBufferFunc(h: GstCheck.Harness, data: Object): {
        // javascript wrapper for 'GstHarnessPrepareBufferFunc'
    }

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`data` (Object) –

user data

Returns (Gst.Buffer) –
No description available

Since : 1.6

### GstCheck.HarnessPrepareBufferFunc

    def GstCheck.HarnessPrepareBufferFunc (h, data):
        #python wrapper for 'GstHarnessPrepareBufferFunc'

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`data` (object) –

user data

Returns (Gst.Buffer) –
No description available

Since : 1.6

### GstHarnessPrepareEventFunc

    GstEvent *
    (*GstHarnessPrepareEventFunc) (GstHarness * h,
                                   gpointer data)

Parameters:

`h` –

a GstHarness

`data` –

user data

Returns –
No description available

Since : 1.8

### GstCheck.HarnessPrepareEventFunc

    function GstCheck.HarnessPrepareEventFunc(h: GstCheck.Harness, data: Object): {
        // javascript wrapper for 'GstHarnessPrepareEventFunc'
    }

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`data` (Object) –

user data

Returns (Gst.Event) –
No description available

Since : 1.8

### GstCheck.HarnessPrepareEventFunc

    def GstCheck.HarnessPrepareEventFunc (h, data):
        #python wrapper for 'GstHarnessPrepareEventFunc'

Parameters:

`h` (GstCheck.Harness) –

a GstCheck.Harness

`data` (object) –

user data

Returns (Gst.Event) –
No description available

Since : 1.8

The results of the search are