org.gstreamer.query
Class PositionQuery

java.lang.Object
  extended by org.gstreamer.lowlevel.NativeValue
      extended by org.gstreamer.lowlevel.Handle
          extended by org.gstreamer.lowlevel.NativeObject
              extended by org.gstreamer.lowlevel.RefCountedObject
                  extended by org.gstreamer.MiniObject
                      extended by org.gstreamer.Query
                          extended by org.gstreamer.query.PositionQuery

public class PositionQuery
extends Query

Used to query an element for the current position in the stream.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.gstreamer.lowlevel.NativeObject
NativeObject.Initializer
 
Field Summary
 
Fields inherited from class org.gstreamer.lowlevel.NativeObject
defaultInit, LIFECYCLE, ownsHandle
 
Constructor Summary
PositionQuery(Format format)
          Constructs a new query stream position query object.
PositionQuery(NativeObject.Initializer init)
           
 
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.Query
getStructure, makeWritable
 
Methods inherited from class org.gstreamer.MiniObject
disposeNativeHandle, isWritable, makeWritable, ref, unref
 
Methods inherited from class org.gstreamer.lowlevel.NativeObject
classFor, disown, dispose, equals, finalize, getNativeAddress, handle, hashCode, initializer, initializer, instanceFor, invalidate, isDisposed, nativeValue, objectFor, objectFor, objectFor, objectFor
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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
Method Detail

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.