javax.media
Interface Duration

All Known Subinterfaces:
Controller, Demultiplexer, Player, Processor, Track
All Known Implementing Classes:
DataSource

public interface Duration

The Duration interface provides a way to determine the duration of the media being played by a media object. Media objects that expose a media duration implement this interface.

This is the JMF 1.0 Duration interface.


Field Summary
static Time DURATION_UNBOUNDED
          Returned by getDuration.
static Time DURATION_UNKNOWN
          Returned by getDuration.
 
Method Summary
 Time getDuration()
          Get the duration of the media represented by this object.
 

Field Detail

DURATION_UNBOUNDED

public static final Time DURATION_UNBOUNDED
Returned by getDuration.

DURATION_UNKNOWN

public static final Time DURATION_UNKNOWN
Returned by getDuration.
Method Detail

getDuration

public Time getDuration()
Get the duration of the media represented by this object. The value returned is the media's duration when played at the default rate. If the duration can't be determined (for example, the media object is presenting live video) getDuration returns DURATION_UNKNOWN.
Returns:
A Time object representing the duration or DURATION_UNKNOWN.


Submit a bug or feature
Copyright 1999-2000 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved. See the Specification License for more details.
Sun, Sun Microsystems, and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.