# clocksync

Simple element that passes all buffers and buffer-lists intact, but synchronising them to the clock before passing.

Synchronisation to the clock is on by default, but can be turned off by setting the 'sync' property to FALSE

<refsect2> Example launch line |[ gst-launch -v -m videotestsrc ! clocksync ! fakesink silent=TRUE ]| </refsect2>

## Hierarchy

    GObject
        ╰──GInitiallyUnowned
            ╰──GstObject
                ╰──GstElement
                    ╰──clocksync

## Factory details

Authors: – Jan Schmidt <jan></jan>

Classification: – `Generic`

Rank – none

Plugin – coreelements

Package – GStreamer

## Pad Templates

### `sink`

    ANY

Presence – always

Direction – sink

Object type – GstPad

### `src`

    ANY

Presence – always

Direction – src

Object type – GstPad

## Action Signals

### resync

    g_signal_emit_by_name (clocksync, "resync");

    ret = clocksync.emit ("resync")

    let ret = clocksync.emit ("resync");

Request recalculation of the "ts-offset" for the next incoming buffer without changing the state of clocksync.

This is useful when "sync-to-first=true" has already established an initial `ts-offset` but running-time of buffer flow is no longer linear (e.g., data flow was temporarily blocked by pad probe). In such cases, a new "ts-offset" may be required so that buffer flow can be throttled correctly again.

Parameters:

`clocksync` (GstElement *) –

the clocksync

Flags: Run Last / Action

Since : 1.28

## Properties

### qos

    “qos” gboolean

Generate Quality-of-Service events upstream.

Flags : Read / Write

Default value : false

Since : 1.22

### rate

    “rate” gdouble

Factor of buffer output speed

Flags : Read / Write

Default value : 1

Since : 1.28

### sync

    “sync” gboolean

Synchronize to pipeline clock

Flags : Read / Write

Default value : true

### sync-to-first

    “sync-to-first” gboolean

When enabled, clocksync elemenet will adjust "ts-offset" value automatically by using given timestamp of the first buffer and running time of pipeline, so that clocksync element can output the first buffer immediately without clock waiting.

Flags : Read / Write

Default value : false

Since : 1.20

### ts-offset

    “ts-offset” gint64

Timestamp offset in nanoseconds for synchronisation, negative for earlier sync

Flags : Read / Write

Default value : 0

The results of the search are