public class SeekEvent extends Event
The seek event configures playback of the pipeline between start to stop at the speed given in rate, also called a playback segment.
The start and stop values are expressed in format.
A rate of 1.0 means normal playback rate, 2.0 means double speed. Negative values means backwards playback. A value of 0.0 for the rate is not allowed and should be accomplished instead by PAUSING the pipeline.
A pipeline has a default playback segment configured with a start position of 0, a stop position of -1 and a rate of 1.0. The currently configured playback segment can be queried with #GST_QUERY_SEGMENT.
When the rate is positive and start has been updated, playback will start
from the newly configured start position.
For negative rates, playback will start from the newly configured stop
position (if any). If the stop position if updated, it must be different from
-1 for negative rates.
It is not possible to seek relative to the current playback position, to do
this, PAUSE the pipeline, query the current playback position with
SeekType.NONE
means
that the position should not be updated.
getPosition
and update the playback segment
current position with a SeekType.SET
to the desired position.
NativeObject.Initializer
defaultInit, LIFECYCLE, ownsHandle
Constructor and Description |
---|
SeekEvent(double rate,
Format format,
int flags,
SeekType startType,
long start,
SeekType stopType,
long stop)
Creates a new seek event.
|
SeekEvent(NativeObject.Initializer init)
This constructor is for internal use only.
|
Modifier and Type | Method and Description |
---|---|
int |
getFlags()
Gets the
SeekFlags of this seek event. |
Format |
getFormat()
Gets the
Format of the start and stop seek values. |
double |
getRate()
Gets the playback rate.
|
long |
getStart()
Gets the start of the seek segment.
|
SeekType |
getStartType()
Gets the SeekType of the start value.
|
long |
getStop()
Gets the stop position of the seek.
|
SeekType |
getStopType()
Gets the SeekType of the start value.
|
getStructure
disposeNativeHandle, isWritable, makeWritable, ref, unref
classFor, disown, dispose, equals, finalize, getNativeAddress, handle, hashCode, initializer, initializer, instanceFor, invalidate, isDisposed, nativeValue, objectFor, objectFor, objectFor, objectFor, toString
public SeekEvent(NativeObject.Initializer init)
init
- initialization data.public SeekEvent(double rate, Format format, int flags, SeekType startType, long start, SeekType stopType, long stop)
rate
- the new playback rateformat
- the format of the seek valuesflags
- the optional seek flagsstartType
- the type and flags for the new start positionstart
- the value of the new start positionstopType
- the type and flags for the new stop positionstop
- the value of the new stop positionpublic double getRate()
public Format getFormat()
Format
of the start and stop seek values.public int getFlags()
SeekFlags
of this seek event.public SeekType getStartType()
public long getStart()
public SeekType getStopType()
public long getStop()