Top Description Fields Constructors Methods
com.sun.media.jfxmedia.track

public Class VideoTrack

extends Track
Class Inheritance
Imports
java.util.Locale

A class representing a video track in a media.
See Also
com.sun.media.jfxmedia.Media

Field Summary

Modifier and TypeField and Description
private float
private VideoResolution
private boolean

Constructor Summary

AccessConstructor and Description
public
VideoTrack(boolean
Whether this track is enabled by default or not (if the container supports it)
enabled
,
long
A unique identifier for this track.
trackID
,
String
The name of the track.
name
,
Locale
The language information for this track, can be null.
locale
,
Track.Encoding
The encoding of the track.
encoding
,
VideoResolution
The dimensions of the video frames in the track.
frameSize
,
float
The encoded frame rate of the track.
encodedFrameRate
,
boolean
Whether the video frames contain an alpha channel.
hasAlphaChannel
)

Constructor.

Method Summary

Modifier and TypeMethod and Description
public float

Returns:

The frame rate at which the video was encoded.
getEncodedFrameRate
()

Retrieve the encoded video frame rate.

public VideoResolution

Returns:

The video frame size.
getFrameSize
()

Retrieve the dimensions of the video frames in the track.

public boolean

Returns:

Whether video has alpha channel.
hasAlphaChannel
()

Retrieve whether the video frames contain an alpha channel.

public final String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from com.sun.media.jfxmedia.track.Track:
getEncodingTypegetLocalegetNamegetTrackIDisEnabled

Field Detail

encodedFrameRateback to summary
private float encodedFrameRate
frameSizeback to summary
private VideoResolution frameSize
hasAlphaChannelback to summary
private boolean hasAlphaChannel

Constructor Detail

VideoTrackback to summary
public VideoTrack(boolean enabled, long trackID, String name, Locale locale, Track.Encoding encoding, VideoResolution frameSize, float encodedFrameRate, boolean hasAlphaChannel)

Constructor.

Parameters
enabled:boolean

Whether this track is enabled by default or not (if the container supports it)

trackID:long

A unique identifier for this track.

name:String

The name of the track.

locale:Locale

The language information for this track, can be null.

encoding:Track.Encoding

The encoding of the track.

frameSize:VideoResolution

The dimensions of the video frames in the track.

encodedFrameRate:float

The encoded frame rate of the track.

hasAlphaChannel:boolean

Whether the video frames contain an alpha channel.

Exceptions
IllegalArgumentException:
  • if name, encoding, or frameSize is null.
  • if encodedFrameRate is negative.
  • if either frame dimension is non-positive.

Method Detail

getEncodedFrameRateback to summary
public float getEncodedFrameRate()

Retrieve the encoded video frame rate. Note that this may differ from the frame rate at which the track may be played. *

Returns:float

The frame rate at which the video was encoded.

getFrameSizeback to summary
public VideoResolution getFrameSize()

Retrieve the dimensions of the video frames in the track.

Returns:VideoResolution

The video frame size.

hasAlphaChannelback to summary
public boolean hasAlphaChannel()

Retrieve whether the video frames contain an alpha channel.

Returns:boolean

Whether video has alpha channel.

toStringback to summary
public final String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override