org.gstreamer.query
Class PositionQuery
java.lang.Object
org.gstreamer.lowlevel.NativeValue
org.gstreamer.lowlevel.Handle
org.gstreamer.lowlevel.NativeObject
org.gstreamer.lowlevel.RefCountedObject
org.gstreamer.MiniObject
org.gstreamer.Query
org.gstreamer.query.PositionQuery
public class PositionQuery
- extends Query
Used to query an element for the current position in the stream.
Method Summary |
Format |
getFormat()
Gets the Format of this position query. |
long |
getPosition()
Gets the position in terms of the Format of the query. |
void |
setPosition(Format format,
long position)
Answers a position query by setting the requested value in the given format. |
java.lang.String |
toString()
Gets the position as a user-readable string. |
Methods inherited from class org.gstreamer.lowlevel.NativeObject |
classFor, disown, dispose, equals, finalize, getNativeAddress, handle, hashCode, initializer, initializer, instanceFor, invalidate, isDisposed, nativeValue, objectFor, objectFor |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
PositionQuery
public PositionQuery(NativeObject.Initializer init)
PositionQuery
public PositionQuery(Format format)
- Constructs a new query stream position query object. A position query is
used to query the current position of playback in the streams, in some format.
- Parameters:
format
- the default Format
for the new query
setPosition
public void setPosition(Format format,
long position)
- Answers a position query by setting the requested value in the given format.
- Parameters:
format
- the requested Format
position
- the position to set in the answer
getFormat
public Format getFormat()
- Gets the
Format
of this position query.
- Returns:
- The format of the query.
getPosition
public long getPosition()
- Gets the position in terms of the
Format
of the query.
- Returns:
- the position.
toString
public java.lang.String toString()
- Gets the position as a user-readable string.
- Overrides:
toString
in class NativeObject
- Returns:
- A string representation of the position.