org.gstreamer.query
Class DurationQuery
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.DurationQuery
public class DurationQuery
- extends Query
Used to query the total duration of a stream.
Method Summary |
long |
getDuration()
Gets the duration answer for this duration query. |
Format |
getFormat()
Gets the format of this duration query. |
void |
setDuration(Format format,
long duration)
Answers a duration query by setting the requested value in the given format. |
java.lang.String |
toString()
Gets the duration 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, objectFor, objectFor |
Methods inherited from class java.lang.Object |
clone, getClass, notify, notifyAll, wait, wait, wait |
DurationQuery
public DurationQuery(NativeObject.Initializer init)
DurationQuery
public DurationQuery(Format format)
- Constructs a new stream duration query object to query in the given format.
A duration query will give the total length of the stream.
- Parameters:
format
- the Format
for this duration query.
setDuration
public void setDuration(Format format,
long duration)
- Answers a duration query by setting the requested value in the given format.
- Parameters:
format
- the Format
for the durationduration
- the duration of the stream
getFormat
public Format getFormat()
- Gets the format of this duration query.
- Returns:
- The
Format
of the duration value.
getDuration
public long getDuration()
- Gets the duration answer for this duration query.
- Returns:
- The total duration.
toString
public java.lang.String toString()
- Gets the duration as a user-readable string.
- Overrides:
toString
in class NativeObject
- Returns:
- A string representing the duration.