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

UMSTVTuner Object

The UMSTVTuner object is a device specific object that controls the TV tuner. After instantiation, the object must be opened to activate the tuner. The object does not actually display the image or capture the video. The VideoMonitor or VideoIn objects must be used in conjunction with the UMSTVTuner object to see or capture the video being tuned. You can use the TV Tuner graphical user interface along with the Video Monitor interface to capture the video you are tuning.

To hear audio, you must connect the tuner card to the system with the two audio cables provided with the card. The audio is connected to AUX1, which is where the CD-ROM goes. The CD-ROM audio is mixed with the TV audio on the tuner hardware. You must use master_settings to enable AUX1 and control the audio volume as they cannot be controlled via the object.

To learn more about the UMSTVTuner object, see:

For introductory information, see Tuner Objects.

Method Descriptions

ReturnCode open( in string path)

Description

This method opens the TV Tuner interface on the tuner device driver. You must call this method before other methods will work. After the TV Tuner interface is opened, the object attempts to tune the default channel (channel 2).

Arguments
in string path The path to the driver (for example, /dev/svc0). Because there may be multiple cards or the card might have been moved, the object relies on the caller to pass this information. The radio channel is appended to the path by the open method.
Return Values
Success Call completed successfully.
InvalidArgument Path was incorrect.
DeviceError Call to driver failed. errno is set.

ReturnCode close()

Description

This method closes the device driver.

Return Values
Success Call completed successfully.
DeviceError Call to driver failed. errno is set.

ReturnCode set_tuner_mode (in UMSTuner_TunerMode mode)

Description

This method allows you to select between air and cable, which alters the set of valid channels.

Arguments
in UMSTuner_TunerMode mode The enumerated type for Air or Cable.
Return Values
Success Call completed successfully.
InvalidArgument Call to driver failed. errno is set.

ReturnCode get_tuner_mode(out UMSTuner_TunerMode mode0

Description

This method returns the current setting (or default) tuner mode, which is either Air or Cable.

Arguments
out UMSTuner_TunerMode mode The enumerated type for Air or Cable.
Return Values
Success Call completed successfully.
NullPointer The out parameter was not allocated properly.

ReturnCode select_channel(in long channel, out long status)

Description

This method sets the current TV channel. If the channel is tuned, it will display if video monitoring is being used at the same time. The call returns the status of the operation as an out argument.

Valid channels include:

NTSC Air channels 2-69
NTSC Cable channels 1-125
PAL Air channels 2-12 and 21-69
Arguments
in long channel The integer channel to tune.
out long status The enumerated type for tuner_status and an indication of whether the channel is tuned. The status is undefined after a device error occurs. Possible status states are Tuned, NotTuned, and Undefined.
Return Values
Success Call completed successfully.
DeviceNotOpen Call to open was never made (or failed).
DeviceError Call to driver failed. errno is set.
NullPointer The status out parameter was not allocated properly.
InvalidArgument The channel was not in the correct range.

ReturnCode get_current_channel(out long channel, out boolean Tuned)

Description

This method returns the current channel and indicates whether it is tuned.

Arguments
out long channel The current channel. The default channel is 2.
out boolean Tuned The state of True is returned if the current channel is in tune.
Return Values
Success Call completed successfully.
NullPointer The out parameters were not allocated properly.

ReturnCode next_channel(in UMSTuner_Direction direction, out long status)

Description

This method increments or decrements the channel by one.

Arguments
in UMSTuner_Direction direction The direction incremented or decremented, either Up or Down.
out long status The enumerated type tuner_status.
Return Values
Success Call completed successfully.
DeviceNotOpen Call to open was never made (or failed).
InvalidArgument Parameter was not correct.
DeviceError Call to driver failed. errno is set.
NullPointer The status parameter was not allocated properly.

ReturnCode seek_to_next_avail_channel(in long locking_strength, in UMSTuner_Direction direction, in boolean block)

Description

This method searches for the next available channel. It continues to increment or decrement the channel according to the direction argument until a channel is tuned according to the device driver. TV does not use the locking_strength and block arguments, so they can be set to any value.

Arguments
in long locking_strength UMSTVTuner does not use this argument.
in UMSTuner_Direction direction The direction incremented or decremented, either Up or Down.
in boolean block UMSTVTuner does not use this argument.
Return Values
Success Call completed successfully.
DeviceNotOpen Call to open was never made (or failed).
DeviceError Call to driver failed. errno is set.

ReturnCode set_mute(in UMSTuner_OnOff mute)

Description

This method sets or resets the TV audio mute.

Arguments
in UMSTuner_OnOff mute Turns the mute On or Off.
Return Values
Success Call completed successfully.
DeviceNotOpen Call to open was never made (or failed).
DeviceError Call to driver failed. errno is set.

ReturnCode get_mute(out UMSTuner_OnOff mute)

Description

This method returns the current mute state.

Arguments
out UMSTuner_OnOff mute The current mute state. The default value is Off.
Return Values
Success Call completed successfully.
NullPointer The out parameter mute was not allocated properly.

ReturnCode set_video_format(in UMSTuner_VideoFormat format)

Description

This method sets the format of the video to PAL or NTSC.

Arguments
in UMSTuner_VideoFormat format The enumerated type for PAL or NTSC.
Return Values
Success Call completed successfully.
UnsupportedFormat A format was set that was not recognized by the object.

ReturnCode get_video_format(out UMSTuner_VideoFormat format)

Description

This method returns the current (or default) video format, which is either PAL or NTSC.

Arguments
out UMSTuner_VideoFormat format The enumerated type for PAL or NTSC.
Return Values
Success Call completed successfully.
NullPointer The out parameter was not allocated properly.

For introductory information, see Tuner Objects.


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