gboolean allow-segments Read / Write
guint64 drop Read
guint64 duplicate Read
gboolean interpolate Read / Write
gboolean invalidate Read / Write
gchar * last-message Read
guint progress Read / Write
gboolean silent Read / Write
guint sync-interval Read / Write
guint sync-margin Read / Write

Types and Values

typedef GstEntransStamp

Object Hierarchy

    ╰── GInitiallyUnowned
        ╰── GstObject
            ╰── GstElement
                ╰── GstBaseTransform
                    ╰── GstEntransStamp



Re-sequence timestamps on buffers and optionally provide progress info.

The identity element has a similar single-segment functionality which timestamps buffers according to the running time, which should typically then result into a perfect stream of sequential timestamps. It can do this on the basis of segment information or based on bytes per second given by a datarate, provided to it externally. However, this datarate is typically available within the stream itself, by means of caps (e.g. framerate, samplerate), which is extracted by this element and automagically used to perform (re)timestamping. Again, the result is a single-segment time-perfect stream. Since the re-sequencing is performed based on datarate, a/v synchronization might be affected if incoming timestamps are irregular (with respect to datarate). Use e.g. videorate to aid with that.

The silent and progress properties allow also using this element to obtain some intermittent progress updates (re-assuring the pipeline is still carrying on).

If sync-margin is non-zero when part of a video stream, then it performs synchronization w.r.t. clock (typically provided by audio src or sink). Specifically, buffers passing through will either be duplicated or dropped as necessary to ensure that the (calculated) timestamp does not deviate more than sync-margin frames. A check for this is performed either each time or every sync-interval frames (if non-zero). However, if sync-margin is zero, then enabling interpolate will leave existing (pts) timestamps intact and will interpolate others (using proper data rate). If not enabled, any existing timestamps are discarded and 0-based timestamps are generated. The properties duplicate and drop can be read to obtain information about number of dropped frames (i.e. the number of unused input frames) and duplicated frames (i.e. the number of times an input frame was duplicated, beside being used normally). An input stream that needs no adjustments will thus never have dropped or duplicated frames. When the silent property is FALSE, a GObject property notification will be emitted whenever one of the "duplicate" or "drop" values changes. This can potentially cause performance degradation. Note that property notification will happen from the streaming thread, so applications should be prepared for this. If allow-segments is FALSE, all segment updates will be discarded. Otherwise, some moderately intelligent decision will allow crucial ones to pass (e.g. time synchronization for subtitle streams).

It can be noted that the "sync" functionality is somewhat related to videorate element and should probably be merged into the latter element at some point.

  • sync functionality based on transcode's import_v4l2 [Erik Slagter]



Types and Values


typedef GstStamp GstEntransStamp;

Property Details

The “allow-segments” property

  “allow-segments”           gboolean

Allow (intelligent) passing of updating TIME segments (e.g. for stream time synchronization).

Flags: Read / Write

Default value: TRUE

The “drop” property

  “drop”                     guint64

Number of dropped frames.

Flags: Read

Default value: 0

The “duplicate” property

  “duplicate”                guint64

Number of duplicated frames.

Flags: Read

Default value: 0

The “interpolate” property

  “interpolate”              gboolean

Interpolate buffer time [if also sync-margin == 0].

Flags: Read / Write

Default value: FALSE

The “invalidate” property

  “invalidate”               gboolean

Invalidate buffer time and duration.

Flags: Read / Write

Default value: FALSE

The “last-message” property

  “last-message”             gchar *


Flags: Read

Default value: NULL

The “progress” property

  “progress”                 guint

Microseconds between progress status info.

Flags: Read / Write

Default value: 2000000

The “silent” property

  “silent”                   gboolean


Flags: Read / Write

Default value: TRUE

The “sync-interval” property

  “sync-interval”            guint

Interval to check sync.

Flags: Read / Write

Default value: 25

The “sync-margin” property

  “sync-margin”              guint

Margin beyond which to enforce sync [0 = disabled].

Flags: Read / Write

Default value: 0