input-selector

input-selector — N-to-1 input stream selector

Synopsis

struct              GstInputSelector;

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GstObject
               +----GstElement
                     +----GstInputSelector

Properties

  "active-pad"               GstPad*               : Read / Write
  "n-pads"                   guint                 : Read
  "select-all"               gboolean              : Read / Write
  "sync-streams"             gboolean              : Read / Write

Signals

  "block"                                          : Action
  "switch"                                         : Run Last

Description

Direct one out of N input streams to the output pad.

The input pads are from a GstPad subclass and have additional properties, which users may find useful, namely:

  • "running-time": Running time of stream on pad (gint64)
  • "tags": The currently active tags on the pad (GstTagList, boxed type)
  • "active": If the pad is currently active (gboolean)
  • "always-ok" : Make an inactive pads return GST_FLOW_OK instead of GST_FLOW_NOT_LINKED

Synopsis

Element Information

plugin

coreelements

author

Julien Moutte <julien@moutte.net>, Jan Schmidt <thaytan@mad.scientist.com>, Wim Taymans <wim.taymans@gmail.com>

class

Generic

Element Pads

name

sink_%u

direction

sink

presence

request

details

ANY

name

src

direction

source

presence

always

details

ANY

Details

struct GstInputSelector

struct GstInputSelector;

Property Details

The "active-pad" property

  "active-pad"               GstPad*               : Read / Write

The currently active sink pad.


The "n-pads" property

  "n-pads"                   guint                 : Read

The number of sink pads.

Default value: 0


The "select-all" property

  "select-all"               gboolean              : Read / Write

Forwards data from all input pads.

Default value: FALSE


The "sync-streams" property

  "sync-streams"             gboolean              : Read / Write

If set to TRUE all inactive streams will be synced to the running time of the active stream. This makes sure that no buffers are dropped by input-selector that might be needed when switching the active pad.

Default value: TRUE

Since 0.10.36

Signal Details

The "block" signal

gint64              user_function                      (GstInputSelector *inputselector,
                                                        gpointer          user_data)          : Action

Block all sink pads in preparation for a switch. Returns the stop time of the current switch segment, as a running time, or 0 if there is no current active pad or the current active pad never received data.

inputselector :

the GstInputSelector

user_data :

user data set when the signal handler was connected.

The "switch" signal

void                user_function                      (GstInputSelector *gstinputselector,
                                                        GstPad           *arg1,
                                                        gint64            arg2,
                                                        gint64            arg3,
                                                        gpointer          user_data)             : Run Last

gstinputselector :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

See Also

GstOutputSelector