MediaTimeFactoryControl

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ocap.shared.media
Interface MediaTimeFactoryControl

All Superinterfaces:
  Control

    public interface MediaTimeFactoryControl

extends Control

Provides the ability to obtain media times with various special characteristics when applied to the content being played by this JMF player. The behaviour of these media times is implementation dependent if used with any other JMF player.

Methods returning instances of Time shall not check whether that Time references a point outside the content being played by this JMF player. Checking for this condition shall happen when the instance of Time is used - in the same way as for instances of Time created using the constructor of that class.

Method Summary
`Time` | `getRelativeTime(long offset)` Obtain a media time relative to the current location
`Time` | `setTimeApproximations(Time original, boolean beforeOrAfter)` Enables applications to precisely control the position where playback starts following a call to Player.setMediaTime.

Methods inherited from interface javax.media.Control
`getControlComponent`

Method Detail

### getRelativeTime

    Time getRelativeTime(long offset)

  Obtain a media time relative to the current location

  Parameters:
    `offset` - the offset relative to the current location measured in nanoseconds
  Returns:
    a media time

### setTimeApproximations

    Time setTimeApproximations(Time original,
                               boolean beforeOrAfter)

  Enables applications to precisely control the position where playback starts following a call to Player.setMediaTime. This method takes an original media time as input and returns a new media time which encapsulates the original media time and an indication of how that original media time is to be interpreted when used in a call to Player.setMediaTime.

  The present document does not define the return values from calling getSeconds and getNanoseconds on the new media time instance. They may be copies of the return values from the original time. They may be new values accurately reflecting where playback would start if the new media time was passed to Player.setMediaTime.

  Parameters:
    `original` - the original media time
    `beforeOrAfter` - if true, the media time where playback starts will be on or before the original one (i.e. content at the original media time is guaranteed to be presented in playback). If false, the media time where playback starts will be after the original one (i.e. neither content at the original media time nor any content before that original time will be presented in playback).
  Returns:
    a new media time

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD