org.gstreamer.query
Class SegmentQuery

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.SegmentQuery

public class SegmentQuery
extends Query

Used to discover information about the currently configured segment for playback.


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
SegmentQuery(Format format)
          Constructs a new segment query object.
SegmentQuery(NativeObject.Initializer init)
           
 
Method Summary
 long getEnd()
          Gets the end of the playback range.
 Format getFormat()
          Gets the format of the start and stop values in the segment query.
 double getRate()
          Gets the rate of the segment Query.
 long getStart()
          Gets the start of the playback range.
 void setSegment(double rate, Format format, long startValue, long stopValue)
          Answers a segment query by setting the requested values.
 
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, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SegmentQuery

public SegmentQuery(NativeObject.Initializer init)

SegmentQuery

public SegmentQuery(Format format)
Constructs a new segment query object.

Parameters:
format - the Format for the new query.
Method Detail

setSegment

public void setSegment(double rate,
                       Format format,
                       long startValue,
                       long stopValue)
Answers a segment query by setting the requested values.

The normal playback segment of a pipeline is 0 to duration at the default rate of 1.0. If a seek was performed on the pipeline to play a different segment, this query will return the range specified in the last seek. startValue and stopValue will respectively contain the configured playback range start and stop values expressed in format. The values are always between 0 and the duration of the media and startValue <= stopValue. rate will contain the playback rate. For negative rates, playback will actually happen from stopValue to startValue.

Parameters:
rate - the rate of the segment.
format - the Format of the segment values.
startValue - the start value.
stopValue - the stop value.

getRate

public double getRate()
Gets the rate of the segment Query.

Returns:
the rate of the segment.

getFormat

public Format getFormat()
Gets the format of the start and stop values in the segment query.

Returns:
The format for the start and stop values.

getStart

public long getStart()
Gets the start of the playback range.

Returns:
the start of the playback range.

getEnd

public long getEnd()
Gets the end of the playback range.

Returns:
the end of the playback range.