com.sun.media
接口 ModuleListener

所有已知实现类:
PlaybackEngine, ProcessEngine

public interface ModuleListener

ModuleListener is an interface for handling asynchronous events generated by Modules.

Java Beans Support

If implementations of this interface are going to be used with Java Beans they need to also implement either java.util.EventListener or sunw.util.EventListener.

另请参见:
Module

方法摘要
 void bufferPrefetched(Module from)
          This method is called when the module has prefetched all the data.
 void dataBlocked(Module from, boolean blocked)
          This method is called when the module detected a data blockage.
 void formatChanged(Module from, Format oldFormat, Format newFormat)
          This method is called when a format change has occurred and the module has successfully coped with it.
 void formatChangedFailure(Module from, Format oldFormat, Format newFormat)
          This method is called when a format change has occurred and the Module has failed to deal with it.
 void framesBehind(Module from, float framesBehind, InputConnector ic)
          This method is called when a module detects frame delay.
 void internalErrorOccurred(Module from)
          This method is called when an irrecoverable internal error has occurred either on the plugin or on the controlling module.
 void markedDataArrived(Module from, Buffer buffer)
          This method is called when a buffer with the marker bit set arrives.
 void mediaEnded(Module from)
          This method is called when the module has reached the end of media.
 void pluginTerminated(Module from)
          This method is called when the plugin controlled by the module has been closed.
 void resetted(Module from)
          This method is called when the module has been resetted.
 void stopAtTime(Module from)
          This method is called when the module has reached the scheduled stop time.
 

方法详细信息

bufferPrefetched

void bufferPrefetched(Module from)
This method is called when the module has prefetched all the data.


stopAtTime

void stopAtTime(Module from)
This method is called when the module has reached the scheduled stop time.


mediaEnded

void mediaEnded(Module from)
This method is called when the module has reached the end of media.


resetted

void resetted(Module from)
This method is called when the module has been resetted.


dataBlocked

void dataBlocked(Module from,
                 boolean blocked)
This method is called when the module detected a data blockage.

参数:
blocked - is set to true if the data is blocked, false if the data has been blocked but have now be released.

framesBehind

void framesBehind(Module from,
                  float framesBehind,
                  InputConnector ic)
This method is called when a module detects frame delay. The number returned is the # of frames behind detected.


markedDataArrived

void markedDataArrived(Module from,
                       Buffer buffer)
This method is called when a buffer with the marker bit set arrives.


formatChanged

void formatChanged(Module from,
                   Format oldFormat,
                   Format newFormat)
This method is called when a format change has occurred and the module has successfully coped with it.


formatChangedFailure

void formatChangedFailure(Module from,
                          Format oldFormat,
                          Format newFormat)
This method is called when a format change has occurred and the Module has failed to deal with it.


pluginTerminated

void pluginTerminated(Module from)
This method is called when the plugin controlled by the module has been closed.


internalErrorOccurred

void internalErrorOccurred(Module from)
This method is called when an irrecoverable internal error has occurred either on the plugin or on the controlling module.