org.iso.mpeg.mpegj.resource
Interface DynamicCapabilityObserver

All Known Implementing Classes:
CapabilityManager

public interface DynamicCapabilityObserver

[Adaptive Audio-Visual Session Format ISO/IEC JTC1/SC29/WG11 - MPEG97/2566]

In order for the audio-visual session to respond gracefully to these situations, AAVS provides mechanisms for an AVSession object to catch dynamic changes to terminal information and modify its behavior. Upon initialization, an AVSession object may subscribe with the Terminal object to receive notification of changes to dynamic terminal information that is important to that particular audio-visual session. If such information does change during an audio-visual session, the Terminal will notify the AVSession of the change through standardized interfaces. Then the AVSession may respond in the manner prescribed by the content creator. For example, consider an AAVS scene representing an MPEG-4 video sequence of a newscaster and a background news clip coded as separate video objects. The content creator might desire to freeze the news clip whenever the actual display frame rate is too slow, rather than sacrificing the quality of the newscaster in the foreground. The content creator can specify this behavior programmatically within the media by subscribing to notifications of frame-rate changes from the terminal. Then, when frame rate drops significantly due, for example, to limited CPU capacity, the media object can dynamically adapt and not continually decode the news clip and further degrade the presentation performance.


Method Summary
 void deleteObserver(java.util.Observer objToDeregister)
          This method is used to deregister an observer previously registered using any of the notifyXXX methods.
 void notifyApplicationFreeMemory(long freeApplicationMemory, java.util.Observer objToNotify)
          This method is used by AVSession objects that want to be notified when the application free memory goes below a certain threshold.
 void notifyTerminalFreeMemory(long freeTerminalMemory, java.util.Observer objToNotify)
          This method is used by AVSession objects that want to be notified when the total terminal free memory goes below a certain threshold.
 void notifyTerminalLoad(long cpuLoadPercentage, java.util.Observer objToNotify)
          This method is used by AVSession objects that want to be notified when the terminal CPU load goes above a certain percentage.
 void notifyTerminalNetworkLoad(long nwLoadPercentage, java.util.Observer objToNotify)
          This method is used by AVSession objects that want to be notified when the terminal network load goes above a certain percentage.
 

Method Detail

notifyApplicationFreeMemory

public void notifyApplicationFreeMemory(long freeApplicationMemory,
                                        java.util.Observer objToNotify)
                                 throws java.lang.IllegalArgumentException
This method is used by AVSession objects that want to be notified when the application free memory goes below a certain threshold.
Parameters:
freeApplicationMemory - the free application memory threshold (bytes).
objToNotify - the object to be notified.
Throws:
java.lang.IllegalArgumentException - the threshold is out of range.

notifyTerminalFreeMemory

public void notifyTerminalFreeMemory(long freeTerminalMemory,
                                     java.util.Observer objToNotify)
                              throws java.lang.IllegalArgumentException
This method is used by AVSession objects that want to be notified when the total terminal free memory goes below a certain threshold.
Parameters:
freeTerminalMemory - the free application memory threshold (bytes).
objToNotify - the object to be notified.
Throws:
java.lang.IllegalArgumentException - the threshold is out of range.

notifyTerminalLoad

public void notifyTerminalLoad(long cpuLoadPercentage,
                               java.util.Observer objToNotify)
                        throws java.lang.IllegalArgumentException
This method is used by AVSession objects that want to be notified when the terminal CPU load goes above a certain percentage.
Parameters:
cpuLoadPercentage - the cpu load (percentage) threshold.
objToNotify - the object to be notified.
Throws:
java.lang.IllegalArgumentException - the threshold out of range [0...100].

notifyTerminalNetworkLoad

public void notifyTerminalNetworkLoad(long nwLoadPercentage,
                                      java.util.Observer objToNotify)
                               throws java.lang.IllegalArgumentException
This method is used by AVSession objects that want to be notified when the terminal network load goes above a certain percentage.
Parameters:
nwLoadPercentage - the network load (percentage) threshold.
objToNotify - the object to be notified.
Throws:
java.lang.IllegalArgumentException - the threshold out of range [0...100].

deleteObserver

public void deleteObserver(java.util.Observer objToDeregister)
This method is used to deregister an observer previously registered using any of the notifyXXX methods.
Parameters:
objToDeregister - the object to be deregistered.