MMAPG - Videodisc Device
Reprint Courtesy of International Business Machines Corporation, © International Business Machines Corporation
The physical videodisc device is an external hardware device that plays videodiscs, producing an analog video and audio signal. The analog video output can be connected to an analog video digitizer component that produces output on the display, or it can simply be connected to a an external video monitor. The audio output can be connected to amplified speakers, headphones, or other audio media drivers.
Device Specifics
The videodisc media device supports Pioneer models 4200, 4300D, 4400, and 8000. The 4300D supports both the American (NTSC) and European (PAL) TV standards for storing analog video signals. Default communications settings for the players are: 8 data bits, no parity, 1 stop bit with a baud rate of 4800. The first communications port is also selected by default. These settings may be changed using the Multimedia Setup application if they do not match the current settings of the actual videodisc device. It is highly recommended that communication speeds at or above 4800 bits per second (bps) be utilized to ensure reliable and optimized performance.
Because the physical connections on the back of each videodisc device varies, the driver updates the connector and product information when the device is first opened. Applications can retrieve connector information, using MCI_CONNECTORINFO, and product information, using MCI_INFO.
Videodisc Formats
A videodisc has one of two formats: CAV or CLV.
CAV (constant angular velocity) is the interactive format of videodiscs, which allows freeze frame and slow motion. The CAV videodisc can be addressed by chapter or by frame. A CAV videodisc can contain up to 30 minutes of video on each side of the disc. One disc holds up to 54,000 frames.
With a CAV format videodisc, the angular velocity of the disc is always the same (1800 RPM), no matter what track is being read, which is similar to the way a phonograph record is played.
CLV (constant linear velocity) is the format for extended-play videodiscs. The CLV videodisc can be addressed by chapter or by time. A CLV videodisc can contain up to 60 minutes of video on each side of the disc.
With a CLV format videodisc, the linear velocity of the disc is constant under the laser head; the disc spins slower when the outside tracks are read.
Note: The number of chapters on CAV and CLV discs varies, depending on the manufacturer of the disc.
Using the Videodisc Device
Using the videodisc device consists of opening, configuring, seeking/stepping, playing, and setting cue points.
Opening the Device
The videodisc player is a dynamic single context device and therefore is serially shareable. When you open the videodisc player, it takes about 60 seconds for the disc to load and spin up to a playing position. Specifying a notify flag on the open request allows your application window procedure to remain available to process PM messages.
open videodisc alias video1 notify shareable
If you set the shareable flag, you should not start a playback operation until the system posts the asynchronous MM_MCIPASSDEVICE message with an event of MCI_GAINING_USE to your application.
When the system posts the asynchronous MM_MCINOTIFY message with a return code of MCI_NOTIFY_SUCCESSFUL message to your application, this indicates a device context is created. Although you may not have received the MCI_GAINING_USE event in a MM_MCIPASSDEVICE message, you can still make inquiries about the device and the media. The status, capability, info, and close commands can be sent to an inactive device context.
You may want to ensure that the disc in the player is not changed by the user. Some devices allow you to disable the manual eject. Other devices allow you to check the label on the disc:
info video1 label wait
Specify the wait flag with commands that return information. A string for the label is returned in the user-supplied buffer specified with mciSendString.
Use the status command to determine the current state of the videodisc player:
Query Response
ready TRUE or FALSE
mode not ready, open, pause, park, play, scan, seek, or stop.
forward TRUE, if player is set to play in forward direction.
time format milliseconds, MMTIME, frames, chapters, HMS, HMSF.
position Position in current format.
speed format % or FPS.
speed Speed in current format.
The status command also returns a lot of information about the disc:
status video1 media present wait
Query Response
media present TRUE or FALSE
media type CAV, CLV, other
disc size 8 or 12
disc side 1 or 2
number of tracks Number of tracks on the disc.
current track Chapter number, if applicable.
length Length of the current segment.
Start Starting position of the media.
Use the capability command to query device capabilities for a particular format. You can request either CAV or CLV information. If no format is indicated, the default is CAV.
capability video1 clv can reverse wait
Configuring the Device
Before you begin playing the disc, you may want to set the audio channels. Most videodisc players have two channels for audio. On some videodisc players, the channels are used to produce a stereo effect. Other videodisc players allow you to turn one of the channels off, based on a selection by the user. This feature is useful for offering the user a choice of language, a level of instruction, and so forth.
Most videodisc players allow you to set the volume off (zero) or on (greater than zero) but do not offer a range of values for volume.
set video1 audio left off
You can set the speed format to frames-per-second or a percentage of the normal rate. The default for the speed format is frames-per-second, and the default for the time format is frames.
Most videodisc players have an on-screen display that you can set on or off. The display is a counter that keeps track of your position. The on-screen display is useful for debugging an application-for example, an interactive course. The display shows you where you are in relation to where you may want to be.
Seeking and Stepping
You can seek and step to a location on the disc using any of the videodisc time formats. Seeking is a fast-forward or fast-reverse to an absolute position. Stepping is done, backward and forward, in time units relative to the current position. The default for a step is one time unit forward.
seek video1 to start step video1 by 1
Some videodisc players do not display a picture when you do a step. You get a ‘squelch’ color, which is the color of the screen when a frame is not yet displayed. Some devices, particularly for CLV, cannot be frame accurate.
Playing a Videodisc
Some videodisc players can vary the playback speed of the CAV disc and also play the disc in reverse. Some players also can perform these operations on a CLV disc. Following are capability queries and the responses generated by a Pioneer 8000 device for CAV and CLV discs:
Query Response
can reverse TRUE
normal play rate 30 fps or 100%
fast play rate 90 fps or 300%
slow play rate 10 fps or 33.33%
maximum play rate 127 fps or 423.33%
minimum play rate 1 fps or 3.33%
Specifying a seek command before a play command can reduce the delay associated with a PLAY command.
A play command can specify a to and from position. If from is omitted, playing begins at the current position. If to is omitted, playing stops at the end of the disc, or at the beginning of the disc, if playing in reverse.
play video1 speed 30 fps
Note: Some videodisc players that cannot vary the playback speed return the same playback rate in response to these queries.
Setting Cue Points and Position Advises
A cue point is a location in the media that issues an MM_MCICUEPOINT notification message whenever it is encountered. The message is returned to the window specified when the cue point was set. Although a cue point is specified in the current time format with setcuepoint, the MM_MCICUEPOINT message is always returned in MMTIME units. MMTIME units are used because the time format set when the cue point is set and the time format set when the cue point is reached may be different. An application specific value can also be associated with a particular cue point for return in the MM_MCICUEPOINT message. The value can be anything which has meaning to the application. Generally, up to 20 cue points can be set.
set video1 time format frames setcuepoint video1 on at 1500 return 1 setcuepoint video1 on at 4000 return 2
An MM_MCIPOSITIONCHANGE notification message is issued at periodic intervals as time elapses in the media for a particular device context. The message is returned to the window specified when the position advise was set with setpositionadvise. Only one position advise can be set for a device context. As with setcuepoint, the position specified is assumed to be in the currently selected time format while the position reported in the MM_MCIPOSITIONCHANGE notification is in MMTIME units.
For more information on cue points and position advises, see Cue Points and Position Advises.
setpositionadvise video1 on every 100
Because videodisc players are external devices and not part of the computer system, the IBM videodisc media driver can guarantee the accuracy of setcuepoint and setpositionadvise functions only within 10 frames, rather than the desired 100 milliseconds (3 frames) of the specified value.
Videodisc Player Error Return Values
The following table contains a list of error messages specific to videodisc players.
| Return Code | Cause of the Error Message |
|---|---|
| MCIERR_VDP_COMMANDFAILURE | Videodisc players are external RS-232 devices; therefore, it is possible for a command to fail because of a device failure. |
| MCIERR_VDP_COMMANDCANCELLED | A command with the MCI_WAIT flag specified is either aborted or superseded. |
| MCIERR_VDP_NOSIDE | The videodisc player is unable to determine the side of the videodisc. This message can be returned by an MCI_STATUS MCI_VD_STATUS_SIDE request. |
| MCIERR_VDP_NOSIZE | The videodisc player is unable to determine the size of the videodisc. This message can be returned by an MCI_STATUS MCI_VD_STATUS_DISC_SIZE request. |
| MCIERR_VDP_INVALID_TIMEFORMAT | This message can be returned by any command specifying a chapter-specific parameter for a device that does not have chapters. It also can be returned if MCI_SET_SYNC_OFFSET is issued when the device is set to the chapter time format. |
| MCIERR_VDP_NOCHAPTER | Chapter information is not present on the disc. The following commands require chapter information to be present on the disc: MCI_SET_TIME_FORMAT MCI_FORMAT CHAPTERS, MCI_STATUS MCI_STATUS_CURRENT_TRACK, MCI_STATUS MCI_STATUS_NUMBER_OF_TRACKS. |
| MCIERR_VDP_NOTSPUNUP | The following commands require the videodisc to be spun up: MCI_INFO MCI_VD_INFO_LABEL and MCI_STATUS with the following parameters specified: MCI_STATUS_POSITION, MCI_STATUS_CURRENT_TRACK, MCI_STATUS_NUMBER_OF_TRACKS, MCI_STATUS_LENGTH, MCI_VD_MEDIA_TYPE, MCI_VD_STATUS_SIDE, MCI_VD_STATUS_SPEED, MCI_VD_STATUS_DISC_SIZE. |
Videodisc Command Messages
| Message | Description |
|---|---|
| MCI_OPEN | Initializes the videodisc device. |
| MCI_GETDEVCAPS | Gets device capabilities. |
| MCI_ESCAPE | Sends custom information to the media driver. |
| MCI_CUE | Cues the device for minimum delay in playback. |
| MCI_PLAY | Starts playing the videodisc. The following optional actions modify MCI_PLAY: Specify start and stop positions, Play faster than normal, Play slower than normal, Play in reverse. |
| MCI_PAUSE | Suspends the current playback action for CLV and CAV discs. Some players may also freeze the video frame. |
| MCI_RESUME | Resumes playing from a paused state, keeping previously specified parameters in effect. |
| MCI_SEEK | Searches, using fast forward or fast reverse, with video and audio off. The following optional actions modify MCI_SEEK: Seek in reverse, Seek to the start or the end of the disc. |
| MCI_SET | Sets audio attributes: Identify the channels to be used, Set the volume, Enable or disable the audio output. Retracts the tray and closes the door, if possible. Opens the door and ejects the tray, if possible. Sets position format in frames, HMS, HMSF, milliseconds, MMTIME, or chapters. Sets speed format in frames-per-second or as a percentage. Disables or enables video output. |
| MCI_STATUS | Receives status on items such as the following: Disc size, Which side of the disc is loaded, Whether current play direction is forward or backward, Length of the segment, Whether the media is present in the device, What the media type is: CAV, CLV, or other, What the current speed format is, Current mode of the device; for example, ‘stopped’, Current position in the media. |
| MCI_INFO | Fills a user-supplied buffer with the following information: Product name of the device the peripheral is controlling. |
| MCI_STOP | Stops playing the videodisc device. |
| MCI_SET_CUEPOINT | Sets a cue point. |
| MCI_SET_POSITION_ADVISE | Sets a position change notification request. |
| MCI_SPIN | Starts or stop the disc from spinning. |
| MCI_STEP | Steps the play one or more time units forward or backward. |
| MCI_CLOSE | Closes the videodisc device. |
| MCI_CONNECTOR | Enables or disables a connector, query its state or identify its type. |