org.dvb.media.monitoring
Interface MonitoringControl

All Superinterfaces:
javax.media.Control

public interface MonitoringControl
extends javax.media.Control

A MonitoringControl allows application to get information associated with the Streamed CoD being presented to the user.

Additionally it allows application to control quality of CoD by setting bitrate of downloaded CoD.


Method Summary
 void addMonitoringListener(MonitoringListener l)
          Add a listener for MonitoringEvent.
 java.lang.String getAudioFormat()
          Get the audio format of the associated CoD.
 StreamQualityInfo[] getAvailableStreamQualities()
          Get all available qualities of streams in associated CoD.
 long getCurrentLineRate()
          Get the current speed (in bits per second) with which the bits are sent onto the wire.
 StreamQualityInfo getStreamQuality()
          Get the current quality of associated CoD.
 java.lang.String getVideoFormat()
          Get the video format of associated CoD.
 void removeMonitoringListener(MonitoringListener l)
          Remove a listener for MonitoringEvent.
 void setFixedStreamQuality(StreamQualityInfo streamQuality)
          Set fixed quality of associated CoD.
 void setInitialStreamQuality(StreamQualityInfo streamQuality)
          Set initial quality of associated CoD.
 
Methods inherited from interface javax.media.Control
getControlComponent
 

Method Detail

addMonitoringListener

void addMonitoringListener(MonitoringListener l)
Add a listener for MonitoringEvent.

Parameters:
l - the listener to add

removeMonitoringListener

void removeMonitoringListener(MonitoringListener l)
Remove a listener for MonitoringEvent.

Parameters:
l - the listener to remove

getAvailableStreamQualities

StreamQualityInfo[] getAvailableStreamQualities()
                                                throws java.lang.IllegalStateException
Get all available qualities of streams in associated CoD. In case of video CoD an array of VideoStreamQualityInfos shall be returned. Precognitions: Information is available after prefetching

Returns:
all available qualities of associated CoD
Throws:
java.lang.IllegalStateException - if Player is neither in Prefetched nor Started state

getStreamQuality

StreamQualityInfo getStreamQuality()
                                   throws java.lang.IllegalStateException
Get the current quality of associated CoD. It is the quality at which associated CoD is being downloaded and presented to the user. In case of video CoD an instance of VideoStreamQualityInfo shall be returned. Precognitions: Information is available after prefetching

Returns:
quality of stream at which associated CoD is being downloaded and presented to the user
Throws:
java.lang.IllegalStateException - if Player is neither in Prefetched nor Started state

setInitialStreamQuality

void setInitialStreamQuality(StreamQualityInfo streamQuality)
                             throws java.lang.IllegalArgumentException,
                                    java.lang.IllegalStateException
Set initial quality of associated CoD. After Player starts, a quality could be changed by Adaptive Streaming.

Application can check CoD's available qualities using getAvailableStreamQualities() method.

Parameters:
streamQuality - the stream quality of CoD
Throws:
java.lang.IllegalArgumentException - thrown if CoD does not support given quality
java.lang.IllegalStateException - if Player is not in the Prefetched state

setFixedStreamQuality

void setFixedStreamQuality(StreamQualityInfo streamQuality)
                           throws java.lang.IllegalArgumentException,
                                  java.lang.IllegalStateException
Set fixed quality of associated CoD. It allows application to force downloading CoD with a given video resolution and stream bitrate, and thus disable adaptive streaming support for associated CoD.

Application can check CoD's available qualities using getAvailableStreamQualities() method.

Parameters:
streamQuality - the stream quality of CoD
Throws:
java.lang.IllegalArgumentException - thrown if CoD does not support given quality
java.lang.IllegalStateException - if Player is not in the Prefetched state

getCurrentLineRate

long getCurrentLineRate()
Get the current speed (in bits per second) with which the bits are sent onto the wire.

Returns:
current speed with which the bits are sent onto the wire

getVideoFormat

java.lang.String getVideoFormat()
                                throws java.lang.IllegalStateException
Get the video format of associated CoD.

Formats are encoded as MPEG-7 term IDs as extended by the DVB IPI handbook, e.g. MPEG-2 video, main profile, main level is encoded as "2.2.2". Precognitions: Information is available after prefetching

Returns:
video format of the associated CoD or null if CoD does not have video stream
Throws:
java.lang.IllegalStateException - thrown if Player is neither in Prefetched nor Started state

getAudioFormat

java.lang.String getAudioFormat()
                                throws java.lang.IllegalStateException
Get the audio format of the associated CoD.

Formats are encoded as MPEG-7 term IDs as extended by the DVB IPI handbook, e.g. MPEG-1 layer 3 audio is encoded as "3.3". Precognitions: Information is available after prefetching

Returns:
audio format of the associated CoD
Throws:
java.lang.IllegalStateException - thrown if Player is neither in Prefetched nor Started state