org.gstreamer.event
Class SeekEvent
java.lang.Object
org.gstreamer.lowlevel.NativeValue
org.gstreamer.lowlevel.Handle
org.gstreamer.lowlevel.NativeObject
org.gstreamer.lowlevel.RefCountedObject
org.gstreamer.MiniObject
org.gstreamer.Event
org.gstreamer.event.SeekEvent
public class SeekEvent
- extends Event
A request for a new playback position and rate.
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.
and stopType specify how to adjust the currently configured
start and stop fields in segment. Adjustments can be made relative or
absolute to the last configured values. A type of SeekType.NONE
means
that the position should not be updated.
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
getPosition
and update the playback segment
current position with a SeekType.SET
to the desired position.
Nested classes/interfaces inherited from class org.gstreamer.lowlevel.NativeObject |
org.gstreamer.lowlevel.NativeObject.Initializer |
Fields inherited from class org.gstreamer.lowlevel.NativeObject |
defaultInit, LIFECYCLE, ownsHandle |
Constructor Summary |
SeekEvent(double rate,
Format format,
int flags,
SeekType startType,
long start,
SeekType stopType,
long stop)
Creates a new seek event. |
SeekEvent(org.gstreamer.lowlevel.NativeObject.Initializer init)
This constructor is for internal use only. |
Methods inherited from class org.gstreamer.lowlevel.NativeObject |
classFor, disown, dispose, equals, finalize, getNativeAddress, handle, hashCode, initializer, initializer, instanceFor, invalidate, isDisposed, nativeValue, objectFor, objectFor, toString |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
SeekEvent
public SeekEvent(org.gstreamer.lowlevel.NativeObject.Initializer init)
- This constructor is for internal use only.
- Parameters:
init
- initialization data.
SeekEvent
public SeekEvent(double rate,
Format format,
int flags,
SeekType startType,
long start,
SeekType stopType,
long stop)
- Creates a new seek event.
- Parameters:
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 position
getRate
public double getRate()
- Gets the playback rate.
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.
- Returns:
- the playback rate.
getFormat
public Format getFormat()
- Gets the
Format
of the start and stop seek values.
- Returns:
- the format.
getFlags
public int getFlags()
- Gets the
SeekFlags
of this seek event.
- Returns:
- the seek flags.
getStartType
public SeekType getStartType()
- Gets the SeekType of the start value.
- Returns:
- the SeekType.
getStart
public long getStart()
- Gets the start of the seek segment.
- Returns:
- the start of the seek.
getStopType
public SeekType getStopType()
- Gets the SeekType of the start value.
- Returns:
- the SeekType.
getStop
public long getStop()
- Gets the stop position of the seek.
- Returns:
- the stop position.