* Controllers that this Player may be managing. If any of
* the Controllers returns DURATION_UNKNOWN or
* DURATION_UNBOUNDED, then the duration is set to this value.
*/
private synchronized final void updateDuration() {
Time duration = getPlayerDuration();
if( duration != DURATION_UNKNOWN )
{
for(int i = 0, n = controllers.size(); i < n; i++) {
Controller c =
(Controller)controllers.elementAt(i);
Time d = c.getDuration();
if( d == DURATION_UNKNOWN ) {
duration = d;
break;
}
if( duration != DURATION_UNBOUNDED &&
( d == DURATION_UNBOUNDED ||
d.getNanoseconds() >
duration.getNanoseconds() ) )
{
duration = d;
}
}