![]() |
![]() |
![]() |
GStreamer Core Plugins 0.10 Plugins Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
"active-pad" GstPad* : Read / Write "n-pads" guint : Read "select-all" gboolean : Read / Write
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:
plugin |
coreelements |
author |
Julien Moutte <julien@moutte.net>, Jan Schmidt <thaytan@mad.scientist.com>, Wim Taymans <wim.taymans@gmail.com> |
class |
Generic |
"select-all"
property"select-all" gboolean : Read / Write
Forwards data from all input pads.
Default value: FALSE
"block"
signalgint64 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.
|
the GstInputSelector |
|
user data set when the signal handler was connected. |
"switch"
signalvoid user_function (GstInputSelector *inputselector,
GstPad *pad,
gint64 stop_time,
gint64 start_time,
gpointer user_data) : Run Last
Switch to a new feed. The segment opened by the previously active pad, if any, will be closed, and a new segment opened before data flows again.
This signal must be emitted when the element has been blocked via the block signal.
If you have a stream with only one switch element, such as an audio-only stream, a stream switch should be performed by first emitting the block signal, and then emitting the switch signal with -1 for the stop and start time values.
The intention of the stop_time
and start_time
arguments is to allow
multiple switch elements to switch and maintain stream synchronization.
When switching a stream with multiple feeds, you will need as many switch
elements as you have feeds. For example, a feed with audio and video will
have one switch element between the audio feeds and one for video.
A switch over multiple switch elements should be performed as follows: First, emit the block signal, collecting the returned values. The maximum running time returned by block should then be used as the time at which to close the previous segment.
Then, query the running times of the new audio and video pads that you will switch to. Naturally, these pads are on separate switch elements. Take the minimum running time for those streams and use it for the time at which to open the new segment.
If pad
is the same as the current active pad, the element will cancel any
previous block without adjusting segments.
the signal changed from accepting the pad name to the pad object.
|
the GstInputSelector |
|
the pad to switch to |
|
running time at which to close the previous segment, or -1 to use the running time of the previously active sink pad |
|
running time at which to start the new segment, or -1 to use the running time of the newly active sink pad |
|
user data set when the signal handler was connected. |
Since 0.10.7