org.gstreamer.elements
Interface InputSelector.SWITCH
- Enclosing class:
- InputSelector
public static interface InputSelector.SWITCH
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.
Method Summary |
void |
Switch(InputSelector inputselector,
Pad pad,
long stop_time,
long start_time)
The reason to call this function Switch in stead of switch is that "switch" is a keyword
in Java and a Java function can't be called switch (so it's not a typo). |
Switch
void Switch(InputSelector inputselector,
Pad pad,
long stop_time,
long start_time)
- The reason to call this function Switch in stead of switch is that "switch" is a keyword
in Java and a Java function can't be called switch (so it's not a typo).
- Parameters:
inputselector
- pad
- the pad to switch tostop_time
- running time at which to close the previous segment, or -1 to use
the running time of the previously active sink padstart_time
- running time at which to start the new segment, or -1 to use the
running time of the newly active sink pad