public class SeekEvent extends Event
See upstream documentation at https://gstreamer.freedesktop.org/data/doc/gstreamer/stable/gstreamer/html/GstEvent.html#gst-event-new-seek
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.
startType 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.
Event.TypesMiniObject.HandleNativeObject.Initializer, NativeObject.TypeProvider, NativeObject.TypeRegistration<T extends NativeObject>GTYPE_NAME| Constructor and Description |
|---|
SeekEvent(double rate,
Format format,
EnumSet<SeekFlags> flags,
SeekType startType,
long start,
SeekType stopType,
long stop)
Creates a new seek event.
|
| Modifier and Type | Method and Description |
|---|---|
EnumSet<SeekFlags> |
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.
|
getStructurecopy, getRefCount, isWritable, makeWritableclose, disown, dispose, equals, getPointer, getRawPointer, hashCode, invalidate, toStringpublic SeekEvent(double rate,
Format format,
EnumSet<SeekFlags> 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 EnumSet<SeekFlags> getFlags()
SeekFlags of this seek event.public SeekType getStartType()
public long getStart()
public SeekType getStopType()
public long getStop()
Copyright © 2021 gstreamer-java. All rights reserved.