capability  3CHI28 

The capability command requests information about a particular capability of a device. All MCI devices recognize this command.

wsprintf(lpstrCommand, "capability %s %s %s", lpszDeviceID, lpszRequest,
    lpszFlags);

 

Parameters

lpszDeviceID

Identifier of an MCI device. This identifier or alias is assigned when the device is opened.

lpszRequest

Flag that identifies a device capability. The following table lists device types that recognize the capability command and the flags used by each type:

cdaudio

can eject
can play
can record
can save
compound device

device type
has audio
has video
uses files

digitalvideo

can eject
can freeze
can lock
can play
can record
can reverse
can save
can stretch
can stretch input
can test

compound device
device type
has audio
has still
has video
maximum play rate
minimum play rate
uses files
uses palettes
windows

overlay

can eject
can freeze
can play
can record
can save
can stretch

compound device
device type
has audio
has video
uses files
windows

sequencer

can eject
can play
can record
can save
compound device

device type
has audio
has video
uses files

vcr

can detect length
can eject
can freeze
can monitor sources
can play
can preroll
can preview
can record
can reverse
can save
can test

clock increment rate
compound device
device type
has audio
has clock
has timecode
has video
number of marks
seek accuracy
uses files

videodisc

can eject
can play
can record
can reverse
can save
CAV
CLV
compound device

device type
fast play rate
has audio
has video
normal play rate
slow play rate
uses files

waveaudio

can eject
can play
can record
can save
compound device
device type

has audio
has video
inputs
outputs
uses files

 

The following table lists the flags that can be specified in the lpszRequest parameter and their meanings:

can detect length

Returns TRUE if the device can detect the length of the media.

can eject

Returns TRUE if the device can eject the media.

can freeze

Returns TRUE if the device can freeze data in the frame buffer.

can lock

Returns TRUE if the device can lock data.

can monitor sources

Returns TRUE if the device can pass an input (source) to the monitored output, independent of the current input selection.

can play

Returns TRUE if the device can play.

can preroll

Returns TRUE if the device supports the  preroll  flag with the cue.B61PO command.

can preview

Returns TRUE if the device supports previews.

can record

Returns TRUE if the device supports recording.

can reverse

Returns TRUE if the device can play in reverse.

can save

Returns TRUE if the device can save data.

can stretch

Returns TRUE if the device can stretch frames to fill a given display rectangle.

can stretch input

Returns TRUE if the device can resize an image in the process of digitizing it into the frame buffer.

can test

Returns TRUE if the device recognizes the test keyword.

cav

When combined with other items, this flag specifies that the return information applies to CAV format videodiscs. This is the default if no videodisc is inserted.

clock increment rate

Returns the number of subdivisions the external clock supports per second. If the external clock is a millisecond clock, the return value is 1000. If the return value is 0, no clock is supported.

clv

When combined with other items, this flag specifies that the return information applies to CLV format videodiscs.

compound device

Returns TRUE if the device supports an element name (filename).

device type

Returns a device type name, which can be one of the following:

cdaudio
dat
digitalvideo
other
overlay
scanner
sequencer
vcr
videodisc
waveaudio

fast play rate

Returns the fast play rate in frames per second, or zero if the device cannot play fast.

has audio

Returns TRUE if the device supports audio playback.

has clock

Returns TRUE if the device has a clock.

has still

Returns TRUE if the device treats files with a single image more efficiently than motion video files.

has timecode

Returns TRUE if the device is capable of supporting timecode, or if it is unknown.

has video

Returns TRUE if the device supports video.

inputs

Returns the total number of input devices.

maximum play rate

Returns the maximum play rate, in frames per second, for the device.

minimum play rate

Returns the minimum play rate, in frames per second, for the device.

normal play rate

Returns the normal play rate, in frames per second, for the device.

number of marks

Returns the maximum number of marks that can be used; zero indicates that marks are unsupported.

outputs

Returns the total number of output devices.

seek accuracy

Returns the expected accuracy of a search in frames; 0 indicates that the device is frame accurate, 1 indicates that the device expects to be within one frame of the indicated seek position, and so on.

slow play rate

Returns the slow play rate in frames per second, or zero if the device cannot play slowly.

uses files

Returns TRUE if the data storage used by a compound device is a file.

uses palettes

Returns TRUE if the device uses palettes.

windows

Returns the number of simultaneous display windows the device can support.

 

lpszFlags

Can be  wait ,  notify , or both. For digital-video and VCR devices,  test  can also be specified. For more information about these flags, see The Wait, Notify, and Test Flags4FW.04J.

 

Return Values

Returns information in the lpstrReturnString parameter of the mciSendString1PGC_K2 function. The information is dependent on the request type.

Remarks

The following command returns the device type of the  mysound  device:

capability mysound device type
 

See Also

cue, mciSendString