[ Previous | Next | Contents | Glossary | Home | Search ]
Ultimedia Services Version 2 for AIX: Programmer's Guide and Reference

UMSVideoMonitor Object

The UMSVideoMonitor object is an Ultimedia Services Version 2 feature and does not apply to Ultimedia Services Version 1.2.1.

The UMSVideoMonitor object is a base class and is not meant to be instantiated. This class provides an interface for a VideoIn and VideoOut object to maintain live video in a window. A VideoIn object would maintain a video that originates in the capture device. An example would be the live source from a camera. A VideoOut object would maintain a video that is also going to the video out device. An example would be to monitor a sequence that is being written to a VTR device. If a device specific VideoIn device is instantiated as a UMSVideoMonitor object, then only the monitor methods are available to you. This would be useful for an application like TV in a Window, where you do not desire the storage of the digital data. Most of the device specific objects (with the exception of the Ultimedia Video IO adpater), does support a hardware monitor function.

This class inherits from the UMSXWindow class.

To learn more about the UMSVideoMonitor object, see:

For introductory information, see Video, Monitor, and Camera Control Support Objects.

Enumeration Lists

To avoid name collision on defines, integer values have been captured as enumerated lists. The set of valid values from an enumerated list can vary with the application. The method descriptions detail valid or possible values for the specific use. The enumerated lists that are defined for this object are listed below:

enum ReturnCode {
   Success,         Command completed successfully
   Failure,         Command failed.
   NotSupported,      A feature is not supported on this device.
   SettingsChanged,      The requested values were changed.
   NotOpen,         Attempted to do command while device not open
   No_Output_Connectors,   No output connectors on device
   NullPointer,      A null pointer was passed to the object
   DeviceNotFound,      Could not locate requested device
   DeviceNotAvail,      No free ports
   NoSync,         Could not get video sync
   InvalidConnector      An incorrect connector was selected
   };
enum OnOff {
   Off,
   On
   };

Method Descriptions

ReturnCode open (in string path)

Description

This method opens the specified video device. If there is an error this method returns Failure code.

Arguments
in string path This is the device name of a video device to be opened.
Return Values

Success

Failure

ReturnCode close ()

Description

This method closes the video device. If the device is not open or the close command fails then NotOpen or Failure is returned.

Return Values

Success

Failure

NotOpen

ReturnCode recommended_window_size (in long width, in long height, out long width_returned, out long height_returned)

Description

This method returns a window size that makes sense for the particular device being used based on the input size to the method and the device limitations/performance characteristics. A legal size is always recommended. you are not tied to the recommended size, only a legal size.

Arguments
in long width Specifies width of the window.
in long height Specifies height of the window.
out long width_returned Return value of the recommended window width.
out ling height_returned Return value of the recommended window height.
Return Values

Success

Failure

ReturnCode set_update_rate (in float rate, out float rate_returned)

Description

This method allows you to change the rate at which images are captured. This rate can be in frames per second or fields per second depending on the application and the hardware.

Arguments
in float rate Specifies the update rate. This can have a fraction.
out float rate_returned Returns the actual rate that the hardware uses. This can differ from the rate requested if the hardware cannot support it.
Return Values

Success

Failure

ReturnCode set_subimage (in long x_position, in long y_position, in long width, in long height, out long x_pos_returned, out long y_pos_returned, out long width_returned, out long height_returned)

Description

This method allows you to define an image within an image. For example, you do desire to capture a whole image, but only monitor the lower right quarter of that image. The method returns actual values if the hardware cannot support the desired values. If a sub-image is defined bigger than the image, the object attempts to scale the image in hardware, if possible.

Arguments
in long x_position Specifies the x coordinate of subimage window origin.
in long y_position Specifies the y coordinate of subimage window origin.
in long width Specifies the width of subimage window.
in long height Specifies height of subimage window.
out long x_pos_returned x coordinate of the origin that is used.
out long y_pos_returned y coordinate of the origin that is used.
out long width_returned width of subimage that is used.
out long height_returned height of subimage that is used.
Return Values

Success

Failure

ReturnCode get_subimage (out long x_position, out long y_position, out long width, out long height)

Description

This method returns the currently defined subimage size in pixels. If you have not defined one, the default is returned. Defaults can vary depending on hardware.

Arguments
out long x_position The x coordinate of the orgin of the subimage.
out long y_position The y coordinate of the origin of the subimage.
out long width The width of the subimage.
out long height The height of the subimage.
Return Values

Success

Failure

ReturnCode monitor (in OnOff flag)

Description

This method either activates or deactivates the monitor. After setting up all of the options and parameters, this method tells the object to start monitoring the video.

Arguments
in OnOff flag Specifies whether to turn monitor On or Off.
Return Values

Success

Failure

ReturnCode freeze ()

Description

Freezes the frame. New images are not displayed to the screen. The window events are still maintained.

Return Values

Success

Failure

ReturnCode resume ()

Description

Continues with the monitor after a freeze. Has no effect if freeze was not called.

Return Values

Success

Failure

ReturnCode set_input_connector (in string connector)

Description

Change the default video input connector. The default comes from the configuration file. The string names change depending on what the hardware is.

Arguments
in string connector Name of the input connector. The valid names vary depending on the hardware.
Return Values

Success

Failure

ReturnCode get_input_connector (out string connector)

Description

Return the current defined video input connector. If one has not been defined, the default is returned.

Arguments
out string connector pointer to a string that contains the current video input connector. you are responsible for freeing this memory.
Return Values

Success

Failure

ReturnCode set_output_connector (in string connector)

Description

Change the default video output connector. The default, if any, comes from the config file and varys depending on the hardware. If there is no video output connector on the hardware, the call fails.

Arguments
in string connector Name of the video output connector. The valid names vary depending on the hardware.
Return Values

Success

Failure

No_Output_Connectors

ReturnCode get_output_connector (out string connector)

Description

Return the current defined video output connector. If one is not defined, the default is returned. If the default is none, the call fails.

Arguments
out string connector pointer to a string that contains the current video input connector. You are responsible for freeing this memory.
Return Values

Success

Failure

ReturnCode set_signal_format (in string format)

Description

Set the video encoding format of the incoming signal. This is either NTSC, PAL, or SECAM.

Arguments
in string format String which identifies the encoding type.

ReturnCode get_signal_format (out string format)

Description

Get the current video encoding format. This is either the one that was set or the default.

Arguments
out string format String which identifies the encoding type.

ReturnCode set_hue (in long scale)

Description

Set the hue value for devices that support it.

Arguments
in long scale This is a scalar value that is device dependent.

ReturnCode get_hue (out long scale)

Description

Get the hue value for devices that support it.

Arguments
out long scale This is a scalar value that is device dependent.

ReturnCode set_brightness (in long scale)

Description

Set the brightness value for devices that support it.

Arguments
in long scale This is a scalar value that is device dependent.

ReturnCode get_brightness (out long scale)

Description

Get the brightness value for devices that support it.

Arguments
out long scale This is a scalar value that is device dependent.

ReturnCode set_contrast (in long scale)

Description

Set the contrast value for devices that support it.

Arguments
in long scale This is a scalar value that is device dependent.

ReturnCode get_contrast (out long scale)

Description

Get the contrast value for devices that support it.

Arguments
out long scale This is a scalar value that is device dependent.

ReturnCode set_saturation (in long scale)

Description

Set the saturation value for devices that support it.

Arguments
in long scale This is a scalar value that is device dependent.

ReturnCode get_saturation (out long scale)

Description

Get the saturation value for devices that support it.

Arguments
out long scale This is a scalar value that is device dependent.

For introductory information, see Video, Monitor, and Camera Control Support Objects.


[ Previous | Next | Contents | Glossary | Home | Search ]