public abstract class Media
extends java.lang.Object
MediaManager
,
MediaPlayer
Modifier and Type | Field and Description |
---|---|
private Locator |
locator |
private java.util.List<Track> |
tracks |
Modifier | Constructor and Description |
---|---|
protected |
Media(Locator locator)
Create a
Media object. |
Modifier and Type | Method and Description |
---|---|
abstract void |
addMarker(java.lang.String markerName,
double presentationTime)
Adds a marker to the media playback.
|
protected void |
addTrack(Track track)
Adds a
Track . |
Locator |
getLocator()
Gets the
Locator which was the source of the media. |
abstract java.util.Map<java.lang.String,java.lang.Double> |
getMarkers()
Get the markers of the media.
|
java.util.List<Track> |
getTracks()
Gets the tracks found in the media.
|
abstract void |
removeAllMarkers()
Removes all markers, added programmatically, from the media playback.
|
abstract double |
removeMarker(java.lang.String markerName)
Removes a marker by name.
|
java.lang.String |
toString() |
protected Media(Locator locator)
Media
object.locator
- Locator
of the Media
IllegalArgumentException
- if locator
is null
.public abstract void addMarker(java.lang.String markerName, double presentationTime)
markerName
- Arbitrary name of the markerpresentationTime
- Presentation time for the markerIllegalArgumentException
- if markerName
is null
or presentationTime
is negative.public abstract double removeMarker(java.lang.String markerName)
markerName
- Name of the markerIllegalArgumentException
- if markerName
is null
.public abstract void removeAllMarkers()
public java.util.List<Track> getTracks()
null
if no tracks have yet been encountered while scanning
the media. The returned List
us unmodifiable.null
if no tracks found.public abstract java.util.Map<java.lang.String,java.lang.Double> getMarkers()
Map
is unmodifiable.null
if no markers found.public Locator getLocator()
Locator
which was the source of the media.Locator
.protected void addTrack(Track track)
Track
.IllegalArgumentException
- if track
is
null
.public java.lang.String toString()
toString
in class java.lang.Object