Commit 520089f8 authored by oposso's avatar oposso

new DSEXT code from Ken for release 092309

parent 92e0443d
package org.ocap.hardware.device;
/**
* Thrown when an application attempts to query/set/get a feature
* not supported on the device.
*/
public class FeatureNotSupportedException extends java.lang.Exception
{
/**
* Creates an FeatureNotSupportedException object. See the class
* description for details of constructor parameters and default
* values.
*/
public FeatureNotSupportedException()
{
throw new RuntimeException("Not implemented");
}
/**
* Creates an FeatureNotSupportedException object with a specified
* reason string.
*
* @param message the reason why the exception was raised
*/
public FeatureNotSupportedException(String message)
{
throw new RuntimeException("Not implemented");
}
}
package org.ocap.hardware.device;
/**
* Thrown when an application attempts to query/set/get a feature
* not supported on the device.
*/
public class FeatureNotSupportedException extends java.lang.Exception
{
/**
* Creates an FeatureNotSupportedException object. See the class
* description for details of constructor parameters and default
* values.
*/
public FeatureNotSupportedException()
{
throw new RuntimeException("Not implemented");
}
/**
* Creates an FeatureNotSupportedException object with a specified
* reason string.
*
* @param message the reason why the exception was raised
*/
public FeatureNotSupportedException(String message)
{
throw new RuntimeException("Not implemented");
}
}
/*
* Created on Mar 20, 2007
*/
package org.ocap.hardware.device;
import org.havi.ui.event.HScreenConfigurationEvent;
/**
* An instance of this class represents a video output configuration defined by
* a fixed set of attributes.
* <p>
* When such a configuration is successfully applied to a <code>VideoOutputPort</code>,
* the output resolution SHALL be suitably adjusted.
* This MAY in turn adjust the aspect ratio and resolution of the associated
* <code>HScreen</code> and its component <code>HScreenDevice</code>s.
* Any such changes will be announced via the dispatch of
* {@link HScreenConfigurationEvent}s.
*
* @see VideoOutputSettings#getSupportedConfigurations()
* @see VideoOutputSettings#setOutputConfiguration
*/
public interface FixedVideoOutputConfiguration
extends VideoOutputConfiguration
{
/**
* Get the fixed video resolution represented by this <code>VideoOuputConfiguration</code>.
*
* @return the fixed video resolution represent by this configuration
*/
public VideoResolution getVideoResolution();
}
/*
* Created on Mar 20, 2007
*/
package org.ocap.hardware.device;
import org.havi.ui.event.HScreenConfigurationEvent;
/**
* An instance of this class represents a video output configuration defined by
* a fixed set of attributes.
* <p>
* When such a configuration is successfully applied to a <code>VideoOutputPort</code>,
* the output resolution SHALL be suitably adjusted.
* This MAY in turn adjust the aspect ratio and resolution of the associated
* <code>HScreen</code> and its component <code>HScreenDevice</code>s.
* Any such changes will be announced via the dispatch of
* {@link HScreenConfigurationEvent}s.
*
* @see VideoOutputSettings#getSupportedConfigurations()
* @see VideoOutputSettings#setOutputConfiguration
*/
public interface FixedVideoOutputConfiguration
extends VideoOutputConfiguration
{
/**
* Get the fixed video resolution represented by this <code>VideoOuputConfiguration</code>.
*
* @return the fixed video resolution represent by this configuration
*/
public VideoResolution getVideoResolution();
}
package org.ocap.hardware.device;
import org.havi.ui.HSound;
/**
* Extends the HAVi <code>HSound</code> class, adding additional configuration options.
* Instances of this class provide control over audio gain level, muting, and
* output ports.
*
* @see AudioOutputPort
*/
public class OCSound extends HSound
{
/**
* Creates an <code>OCSound</code> object.
* The following defaults apply upon construction:
* <table border>
* <tr> <th>Attribute</th> <th>Method</th> <th>Default</th> </tr>
* <tr> <td>Level</td>
* <td>{@link #getLevel()}</td>
* <td><code>1.0</code></td> </tr>
* <tr> <td>Mute</td>
* <td>{@link #isMuted()}</td>
* <td><code>false</code></td> </tr>
* <tr> <td>Outputs</td>
* <td>{@link #getAudioOutputs}</td>
* <td>the default audio output for the application constructing the
* <code>OCSound</code> instance</td>
* </table>
*/
public OCSound()
{
// to be implemented
}
/**
* Set the gain using a floating point scale with values between 0.0 and 1.0.
* 0.0 is silence; 1.0 is the loudest level for associated audio output ports.
*
* @param level The new gain value specified in the level scale.
* @return The level that was actually set.
*
* @see #getLevel
* @see AudioOutputPort#setLevel
* @see AudioOutputPort#getLevel
*/
public float setLevel(float level)
{
return 0F;
}
/**
* Get the current gain set for this <code>OCSound</code>
* as a value between 0.0 and 1.0.
*
* @return The gain in the level scale (0.0-1.0).
* @see #setLevel
*/
public float getLevel()
{
return 0F;
}
/**
* Get the mute state of the audio signal associated with this audio clip.
*
* @return The current mute state:
* <code>true</code> if muted and <code>false</code> otherwise.
* @see #setMuted
*/
public boolean isMuted()
{
return true;
}
/**
* Mute or unmute the signal associated with this <code>OCSound</code>.
* Redundant invocations of this method are ignored.
* The mute state does not effect the gain (as represented by {@link #getLevel()}.
*
* @param mute The new mute state:
* <code>true</code> mutes the signal and <code>false</code> unmutes the signal.
*
* @see #isMuted()
*/
public void setMuted(boolean mute)
{
// to be implemented
}
/**
* Get the audio output ports on which this audio clip would be played.
* By default, audio-clips will be played on the default audio output port
* for the application that created this <code>OCSound</code>.
* Unless <code>AudioOutputPort</code>s have been removed by calling
* <code>removeAudioOutput</code>, this method SHALL return the
* at least the default <code>AudioOutputPort</code> for the application.
* Unless <code>AudioOutputPort</code>s have been added by calling
* <code>addAudioOutput</code>, this method SHALL return at most
* the default <code>AudioOutputPort</code> for the application.
*
* @return The set of target <code>AudioOutputPort</code>s as an array.
* If all ports have been removed, then an empty array SHALL be returned.
*
* @see #addAudioOutput
* @see #removeAudioOutput
*/
public AudioOutputPort[] getAudioOutputs()
{
return new AudioOutputPort[0];
}
/**
* Add an <code>AudioOutputPort</code> to the set of audio output ports where
* this clip will be played.
* <p>
* Redundant additions SHALL have no effect.
*
* @param au The <code>AudioOutputPort</code> to add.
*/
public void addAudioOutput(AudioOutputPort au)
{
// to be implemented
}
/**
* Remove an <code>AudioOutputPort</code> from the set of audio ouput ports where
* this clip will be played.
* <p>
* Attempting to remove an <code>AudioOutputPort</code> that is not currently
* in the set of audio output ports for this <code>OCSound</code> SHALL have
* no effect.
*
* @param au The <code>AudioOutputPort</code> to remove.
*/
public void removeAudioOutput(AudioOutputPort au)
{
// to be implemented
}
}
package org.ocap.hardware.device;
import org.havi.ui.HSound;
/**
* Extends the HAVi <code>HSound</code> class, adding additional configuration options.
* Instances of this class provide control over audio gain level, muting, and
* output ports.
*
* @see AudioOutputPort
*/
public class OCSound extends HSound
{
/**
* Creates an <code>OCSound</code> object.
* The following defaults apply upon construction:
* <table border>
* <tr> <th>Attribute</th> <th>Method</th> <th>Default</th> </tr>
* <tr> <td>Level</td>
* <td>{@link #getLevel()}</td>
* <td><code>1.0</code></td> </tr>
* <tr> <td>Mute</td>
* <td>{@link #isMuted()}</td>
* <td><code>false</code></td> </tr>
* <tr> <td>Outputs</td>
* <td>{@link #getAudioOutputs}</td>
* <td>the default audio output for the application constructing the
* <code>OCSound</code> instance</td>
* </table>
*/
public OCSound()
{
// to be implemented
}
/**
* Set the gain using a floating point scale with values between 0.0 and 1.0.
* 0.0 is silence; 1.0 is the loudest level for associated audio output ports.
*
* @param level The new gain value specified in the level scale.
* @return The level that was actually set.
*
* @see #getLevel
* @see AudioOutputPort#setLevel
* @see AudioOutputPort#getLevel
*/
public float setLevel(float level)
{
return 0F;
}
/**
* Get the current gain set for this <code>OCSound</code>
* as a value between 0.0 and 1.0.
*
* @return The gain in the level scale (0.0-1.0).
* @see #setLevel
*/
public float getLevel()
{
return 0F;
}
/**
* Get the mute state of the audio signal associated with this audio clip.
*
* @return The current mute state:
* <code>true</code> if muted and <code>false</code> otherwise.
* @see #setMuted
*/
public boolean isMuted()
{
return true;
}
/**
* Mute or unmute the signal associated with this <code>OCSound</code>.
* Redundant invocations of this method are ignored.
* The mute state does not effect the gain (as represented by {@link #getLevel()}.
*
* @param mute The new mute state:
* <code>true</code> mutes the signal and <code>false</code> unmutes the signal.
*
* @see #isMuted()
*/
public void setMuted(boolean mute)
{
// to be implemented
}
/**
* Get the audio output ports on which this audio clip would be played.
* By default, audio-clips will be played on the default audio output port
* for the application that created this <code>OCSound</code>.
* Unless <code>AudioOutputPort</code>s have been removed by calling
* <code>removeAudioOutput</code>, this method SHALL return the
* at least the default <code>AudioOutputPort</code> for the application.
* Unless <code>AudioOutputPort</code>s have been added by calling
* <code>addAudioOutput</code>, this method SHALL return at most
* the default <code>AudioOutputPort</code> for the application.
*
* @return The set of target <code>AudioOutputPort</code>s as an array.
* If all ports have been removed, then an empty array SHALL be returned.
*
* @see #addAudioOutput
* @see #removeAudioOutput
*/
public AudioOutputPort[] getAudioOutputs()
{
return new AudioOutputPort[0];
}
/**
* Add an <code>AudioOutputPort</code> to the set of audio output ports where
* this clip will be played.
* <p>
* Redundant additions SHALL have no effect.
*
* @param au The <code>AudioOutputPort</code> to add.
*/
public void addAudioOutput(AudioOutputPort au)
{
// to be implemented
}
/**
* Remove an <code>AudioOutputPort</code> from the set of audio ouput ports where
* this clip will be played.
* <p>
* Attempting to remove an <code>AudioOutputPort</code> that is not currently
* in the set of audio output ports for this <code>OCSound</code> SHALL have
* no effect.
*
* @param au The <code>AudioOutputPort</code> to remove.
*/
public void removeAudioOutput(AudioOutputPort au)
{
// to be implemented
}
}
/*
* Created on Mar 20, 2007
*/
package org.ocap.hardware.device;
/**
* Describes a <code>VideoOutputConfiguration</code> supported by a
* <code>VideoOutputPort</code>.
*
* @see VideoOutputSettings
*
* @author Aaron Kamienski
*/
public interface VideoOutputConfiguration
{
/**
* Get the <code>String</code> representation of this <code>VideoOutputConfiguration</code>,
* suitable for display to the user.
*
* @return <code>String</code> representation of this object
*/
public String getName();
}
/*
* Created on Mar 20, 2007
*/
package org.ocap.hardware.device;
/**
* Describes a <code>VideoOutputConfiguration</code> supported by a
* <code>VideoOutputPort</code>.
*
* @see VideoOutputSettings
*
* @author Aaron Kamienski
*/
public interface VideoOutputConfiguration
{
/**
* Get the <code>String</code> representation of this <code>VideoOutputConfiguration</code>,
* suitable for display to the user.
*
* @return <code>String</code> representation of this object
*/
public String getName();
}
/*
* Created on Mar 28, 2007
*/
package org.ocap.hardware.device;
import org.ocap.hardware.VideoOutputPort;
/**
* The callback interface to be implemented by application classes that wish
* to receive notification of changes to the status of a <code>VideoOutputPort</code>.
*
* @author Aaron Kamienski
*/
public interface VideoOutputPortListener extends java.util.EventListener
{
/**
* Method to be invoked when a display device is connected or disconnected.
* <p>
* Note that this method will not be invoked where such information cannot
* be known by the Host device.
*
* @param source the <code>VideoOutputPort</code> whose status has changed
* @param status <code>true</code> when a display device is connected;
* <code>false</code> when a display device is disconnected
*
* @see VideoOutputSettings#isDisplayConnected
*/
public void connectionStatusChanged(VideoOutputPort source, boolean status);
/**
* Method to be invoked when the <code>VideoOutputPort</code> is enabled or
* disabled.
*
* @param source the <code>VideoOutputPort</code> whose status has changed
* @param status <code>true</code> when the video output port is enabled;
* <code>false</code> when the video output port is disabled
*
* @see VideoOutputPort#enable()
* @see VideoOutputPort#disable()
* @see VideoOutputPort#status()
*/
public void enabledStatusChanged(VideoOutputPort source, boolean status);
/**
* Method to be invoked when the configuration of a <code>VideoOutputPort</code> changes.
*
* @param source the <code>VideoOutputPort</code> whose status has changed
* @param oldConfig the previous configuration
* @param newConfig the new configuration
*/
public void configurationChanged(VideoOutputPort source,
VideoOutputConfiguration oldConfig, VideoOutputConfiguration newConfig);
}
/*
* Created on Mar 28, 2007
*/
package org.ocap.hardware.device;
import org.ocap.hardware.VideoOutputPort;
/**
* The callback interface to be implemented by application classes that wish
* to receive notification of changes to the status of a <code>VideoOutputPort</code>.
*
* @author Aaron Kamienski
*/
public interface VideoOutputPortListener extends java.util.EventListener
{
/**
* Method to be invoked when a display device is connected or disconnected.
* <p>
* Note that this method will not be invoked where such information cannot
* be known by the Host device.
*
* @param source the <code>VideoOutputPort</code> whose status has changed
* @param status <code>true</code> when a display device is connected;
* <code>false</code> when a display device is disconnected
*
* @see VideoOutputSettings#isDisplayConnected
*/
public void connectionStatusChanged(VideoOutputPort source, boolean status);
/**
* Method to be invoked when the <code>VideoOutputPort</code> is enabled or
* disabled.
*
* @param source the <code>VideoOutputPort</code> whose status has changed
* @param status <code>true</code> when the video output port is enabled;
* <code>false</code> when the video output port is disabled
*
* @see VideoOutputPort#enable()
* @see VideoOutputPort#disable()
* @see VideoOutputPort#status()
*/
public void enabledStatusChanged(VideoOutputPort source, boolean status);
/**
* Method to be invoked when the configuration of a <code>VideoOutputPort</code> changes.
*
* @param source the <code>VideoOutputPort</code> whose status has changed
* @param oldConfig the previous configuration
* @param newConfig the new configuration
*/
public void configurationChanged(VideoOutputPort source,
VideoOutputConfiguration oldConfig, VideoOutputConfiguration newConfig);
}
/*
* Created on Mar 19, 2007
*/
package org.ocap.hardware.device;
import java.awt.Dimension;
import org.dvb.media.VideoFormatControl;
/**
* Specifies the attributes of a video stream.
* Instances of <code>VideoResolution</code> may be used to describe attributes
* of input or output video.
*
* @see FixedVideoOutputConfiguration#getVideoResolution()
* @see DynamicVideoOutputConfiguration#getInputResolutions()
* @see DynamicVideoOutputConfiguration#addOutputResolution(VideoResolution, FixedVideoOutputConfiguration)
*
* @author Aaron Kamienski
*/
public class VideoResolution
{
/**
* Constant indicating an unknown or unspecified line scan mode.
*/
public static final int SCANMODE_UNKNOWN = 0;
/**
* Constant indicating interlaced line scan mode.
*/
public static final int SCANMODE_INTERLACED = 1;
/**
* Constant indicating progressive line scan mode.
*/
public static final int SCANMODE_PROGRESSIVE = 2;
/**
* Creates an instance of <code>VideoResolution</code> based upon
* the given attributes.
*
* @param rez The desired pixel resolution;
* <code>null</code> MAY be specified to indicate a <i>wildcard</i> value.
* @param ar The desired aspect ratio.
* {@link VideoFormatControl#ASPECT_RATIO_UNKNOWN} MAY be specified
* to indicate a <i>wildcard</i> value.
* @param rate The desired field or frame rate.
* Values less than or equal to 0.0F may be specified to indicate
* a <i>wildcard</i> value.
* @param scan The desired scan mode.
* {@link #SCANMODE_UNKNOWN} MAY be specified to indicate a <i>wildcard</i> value.
*/
public VideoResolution(Dimension rez, int ar, float rate, int scan)
{
// To be implemented
}
/**
* Return the pixel resolution of the video.
* <p>
* A value of <code>null</code> MAY be returned, indicating that the resolution is
* unknown or unspecified.