org.davic.media
Interface MediaTimeEventControl

All Superinterfaces:
javax.media.Control

public interface MediaTimeEventControl
extends javax.media.Control

This interface describes methods for the application to associate events with the media time of the current stream.

It is an implementation’s responsibility to deregister any registered instances of MediaTimeEventListener at an appropriate time, e.g. when the Xlet is destroyed.


Method Summary
 void notifyWhen(MediaTimeEventListener i, long mediaTime)
          This method allows the application to associate an event with the specified media time.
 void notifyWhen(MediaTimeEventListener i, long mediaTime, int id)
          This method allows the application to associate an event with the specified media time.
 
Methods inherited from interface javax.media.Control
getControlComponent
 

Method Detail

notifyWhen

void notifyWhen(MediaTimeEventListener i,
                long mediaTime,
                int id)
This method allows the application to associate an event with the specified media time. The application can supply an identification that will be associated with this event.

When this method is called with a listener, an id and a negative mediaTime as arguments, the listener is deregistered for the negated value of the corresponding mediaTime parameter and matching id. The availability of this deregistration feature on the platform may be indicated via the existence of the system property.

Calling this method with a value that does not match a previously registered positive media time shall have no effect.

NOTE: When this method is called with a mediaTime value of 0 the result is implementation dependent.

NOTE: When an application calls notifyWhen more than once with the same mediaTime and id, it is implementation dependent if more than one event is generated and whether multiple deregistrations will be required.

Parameters:
i - the listener to notify when the event happens
mediaTime - the media time which will be associated with the event
id - an identification for application use

notifyWhen

void notifyWhen(MediaTimeEventListener i,
                long mediaTime)
This method allows the application to associate an event with the specified media time.

The identification that will be associated with this event always equals 0. When this method is called with a listener and a negative mediaTime as arguments, the listener is deregistered for the negated value of the corresponding mediaTime parameter. The availability of this deregistration feature on the platform may be indicated via the existence of a system property.

NOTE: A deregistration via this method is equivalent to calling notifyWhen(org.davic.media.MediaTimeEventListener i, long mediaTime, int id) with an id value of 0.

NOTE: Although this class isn't required by MHP or by any profile of GEM, GEM terminal specifications may include it as a mandatory or optional element. For example, BD-J is known to require this class.

Parameters:
i - the listener to notify when the event happens
mediaTime - the media time which will be associated with the event