tee

tee

Synopsis

struct              GstTee;
enum                GstTeePullMode;

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GstObject
               +----GstElement
                     +----GstTee

Properties

  "alloc-pad"                GstPad*               : Read / Write
  "has-chain"                gboolean              : Read / Write / Construct
  "last-message"             gchar*                : Read
  "num-src-pads"             gint                  : Read
  "pull-mode"                GstTeePullMode        : Read / Write / Construct
  "silent"                   gboolean              : Read / Write / Construct
  "allow-not-linked"         gboolean              : Read / Write / Construct

Description

Split data to multiple pads. Branching the data flow is useful when e.g. capturing a video where the video is shown on the screen and also encoded and written to a file. Another example is playing music and hooking up a visualisation module.

One needs to use separate queue elements (or a multiqueue) in each branch to provide separate threads for each branch. Otherwise a blocked dataflow in one branch would stall the other branches.

Example launch line

1
gst-launch-1.0 filesrc location=song.ogg ! decodebin ! tee name=t ! queue ! audioconvert ! audioresample ! autoaudiosink t. ! queue ! audioconvert ! goom ! videoconvert ! autovideosink
Play song.ogg audio file which must be in the current working directory and render visualisations using the goom element (this can be easier done using the playbin element, this is just an example pipeline).

Synopsis

Element Information

plugin

coreelements

author

Erik Walthinsen <omega@cse.ogi.edu>, Wim Taymans <wim@fluendo.com>

class

Generic

Element Pads

name

sink

direction

sink

presence

always

details

ANY

name

src_%u

direction

source

presence

request

details

ANY

Details

struct GstTee

struct GstTee;

Opaque GstTee data structure.


enum GstTeePullMode

typedef enum {
  GST_TEE_PULL_MODE_NEVER,
  GST_TEE_PULL_MODE_SINGLE,
} GstTeePullMode;

The different ways that tee can behave in pull mode. TEE_PULL_MODE_NEVER disables pull mode.

GST_TEE_PULL_MODE_NEVER

Never activate in pull mode.

GST_TEE_PULL_MODE_SINGLE

Only one src pad can be active in pull mode.

Property Details

The "alloc-pad" property

  "alloc-pad"                GstPad*               : Read / Write

The pad ALLOCATION queries will be proxied to (unused).


The "has-chain" property

  "has-chain"                gboolean              : Read / Write / Construct

If the element can operate in push mode.

Default value: TRUE


The "last-message" property

  "last-message"             gchar*                : Read

The message describing current status.

Default value: NULL


The "num-src-pads" property

  "num-src-pads"             gint                  : Read

The number of source pads.

Allowed values: >= 0

Default value: 0


The "pull-mode" property

  "pull-mode"                GstTeePullMode        : Read / Write / Construct

Behavior of tee in pull mode.

Default value: Never activate in pull mode


The "silent" property

  "silent"                   gboolean              : Read / Write / Construct

Don't produce last_message events.

Default value: TRUE


The "allow-not-linked" property

  "allow-not-linked"         gboolean              : Read / Write / Construct

This property makes sink pad return GST_FLOW_OK even if there are no source pads or any of them is linked.

This is useful to avoid errors when you have a dynamic pipeline and during a reconnection you can have all the pads unlinked or removed.

Default value: FALSE

Since 1.6

See Also

GstIdentity