Many IEEE-1394-based digital cameras and webcams now support Instrumentation and Industrial Control (IIDC) features that can be accessed by software.
QuickTime 6.4 includes six new functions to communicate with
video digitizers that have a subtype of vdSubtypeIIDC ('iidc'):
VDIIDCGetFeatures places
atoms in a QuickTime atom container that specify the current capabilities
of a camera and the state of its IIDC features.
VDIIDCGetFeaturesForSpecifier places
atoms in a QuickTime atom container that specify the current state
of a single camera IIDC feature or group of features.
VDIIDCSetFeatures changes
the state of a camera’s IIDC features.
VDIIDCGetDefaultFeatures places
atoms in a QuickTime atom container that specify the default capabilities
and default state of a camera’s IIDC features.
VDIIDCGetCSRData reads
a camera’s CSR registers directly.
VDIIDCSetCSRData writes
to a camera’s CSR registers directly.
Several data structures that support these functions are new in QuickTime 6.4:
VDIIDCFeatureAtomTypeAndID provides
content for the vdIIDCAtomTypeFeatureAtomTypeAndID atom
type, discussed in “Type And ID Atoms”. It contains general information about an
IIDC feature and specifies the atom that holds that feature’s
current settings.
The VDIIDCFeatureSettings structure
provides content for the vdIIDCAtomTypeFeatureSettings atom
type, discussed in “IIDC Settings Atoms”. It contains the VDIIDCFeatureCapabilities and VDIIDCFeatureState structures,
which are used to describe various IIDC camera features.
VDIIDCFeatureCapabilities provides
IIDC feature capabilities information for the VDIIDCFeatureSettings structure.
VDIIDCFeatureState provides
IIDC feature state information for the VDIIDCFeatureSettings structure.
VDIIDCTriggerSettings provides
content for the vdIIDCAtomTypeTriggerSettings atom type.
It contains the VDIIDCTriggerCapabilities and VDIIDCTriggerState structures, which
contain information about a camera’s trigger capabilities and
state.
VDIIDCTriggerCapabilities provides
trigger capabilities information for the VDIIDCTriggerSettings structure.
VDIIDCTriggerState provides
trigger state information for the VDIIDCTriggerSettings structure.
VDIIDCFocusPointSettings provides
content for the vdIIDCAtomTypeFocusPointSettings atom
type. It contains focus point data.
VDIIDCLightingHintSettings provides
content for the vdIIDCAtomTypeLightingHintSettings atom
type. It contains lighting hint data.
The information about IIDC features that a camera might support is contained in a hierarchy of new big-endian QuickTime atom types:
At the top level, the QuickTime atom container
passed into VDIIDCSetFeatures or returned
by VDIIDCGetFeatures, VDIIDCGetDefaultFeatures,
or VDIIDCGetFeaturesForSpecifier contains
a set of atoms of type vdIIDCAtomTypeFeature, one
for each feature of the camera being interrogated.
Each atom of type vdIIDCAtomTypeFeature contains
one atom of type vdIIDCAtomTypeFeatureAtomTypeAndID.
This atom contains a data structure of type VDIIDCFeatureAtomTypeAndID, which conveys
general information about the feature and specifies the type and
ID of the atom that conveys that feature’s current settings.
Each atom of type vdIIDCAtomTypeFeature also
contains a Settings atom. This may be an atom of type vdIIDCAtomTypeFeatureSettings, vdIIDCAtomTypeTriggerSettings, vdIIDCAtomTypeFocusPointSettings,
or vdIIDCAtomTypeLightingHintSettings,
each of which stores a particular class of camera settings.
Details of the new atom types are given in the next sections. To determine the number of features in a particular atom container, you can use this code:
SInt16 featureCount = QTCountChildrenOfType(container, |
kParentAtomIsContainer, vdIIDCAtomTypeFeature); |
The top-level atoms in the IIDC atom hierarchy are Feature
atoms, of type vdIIDCAtomTypeFeature,
the value of which is 'feat'.
Zero or more of these atoms are present in the atom container that
is passed to the VDIIDCSetFeatures function
and returned by the VDIIDCGetFeatures, VDIIDCGetDefaultFeatures,
and VDIIDCGetFeaturesForSpecifier functions.
Each Feature atom is a container for atoms that convey information about one IIDC feature of the camera being interrogated or set.
Each Feature atom has two child atoms. The first is a Type
and ID atom, of type vdIIDCAtomTypeFeatureAtomTypeAndID,
described in the next section. The Type and ID atom identifies a
second child atom of the vdIIDCAtomTypeFeature atom,
which contains the feature’s current or default setting information.
These atoms are described in “IIDC Settings Atoms”below.
Each feature atom contains one Type and ID atom, of type vdIIDCAtomTypeFeatureAtomTypeAndID ('t&id').
Its ID is 1. The contents of this atom is a VDIIDCFeatureAtomTypeAndID data structure.
This structure contains the type of the feature, a type that identifies
the general category of the feature (image control, color control, mechanics,
or triggering), the feature’s human-readable name, and the type
and ID of the Settings atom that contains the feature’s settings.
Most IIDC features can be expressed by VDIIDCFeatureSettings data structures.
Three, however, require VDIIDCTriggerSettings, VDIIDCFocusPointSettings,
or VDIIDCLightingHintSettings data
structures, as shown in the following listing:
vdIIDCFeatureHue = 'hue ', // Uses VDIIDCFeatureSettings |
vdIIDCFeatureSaturation = 'satu', // Uses VDIIDCFeatureSettings |
vdIIDCFeatureSharpness = 'shrp', // Uses VDIIDCFeatureSettings |
vdIIDCFeatureBrightness = 'brit', // Uses VDIIDCFeatureSettings |
vdIIDCFeatureGain = 'gain', // Uses VDIIDCFeatureSettings |
vdIIDCFeatureIris = 'iris', // Uses VDIIDCFeatureSettings |
vdIIDCFeatureShutter = 'shtr', // Uses VDIIDCFeatureSettings |
vdIIDCFeatureExposure = 'xpsr', // Uses VDIIDCFeatureSettings |
vdIIDCFeatureWhiteBalanceU = 'whbu', // Uses VDIIDCFeatureSettings |
vdIIDCFeatureWhiteBalanceV = 'whbv', // Uses VDIIDCFeatureSettings |
vdIIDCFeatureGamma = 'gmma', // Uses VDIIDCFeatureSettings |
vdIIDCFeatureTemperature = 'temp', // Uses VDIIDCFeatureSettings |
vdIIDCFeatureZoom = 'zoom', // Uses VDIIDCFeatureSettings |
vdIIDCFeatureFocus = 'fcus', // Uses VDIIDCFeatureSettings |
vdIIDCFeaturePan = 'pan ', // Uses VDIIDCFeatureSettings |
vdIIDCFeatureTilt = 'tilt', // Uses VDIIDCFeatureSettings |
vdIIDCFeatureOpticalFilter = 'opft', // Uses VDIIDCFeatureSettings |
vdIIDCFeatureTrigger = 'trgr', // Uses VDIIDCTriggerSettings |
vdIIDCFeatureCaptureSize = 'cpsz', // Undefined settings |
vdIIDCFeatureCaptureQuality = 'cpql', // Undefined settings |
vdIIDCFeatureFocusPoint = 'fpnt', // Uses VDIIDCFocusPointSettings |
vdIIDCFeatureEdgeEnhancement = 'eden' // Uses VDIIDCFeatureSettings |
vdIIDCFeatureLightingHint = 'lhnt' // Uses VDIIDCLightingHintSetting |
The types and IDs of the Settings atoms that contain these data structures are the following:
// Atom type and ID that contains the VDIIDCFeatureSettings struct |
vdIIDCAtomTypeFeatureSettings = 'fstg', |
vdIIDCAtomIDFeatureSettings = 1 |
// Atom type and ID that contains the VDIIDCTriggerSettings struct |
vdIIDCAtomTypeTriggerSettings = 'tstg', |
vdIIDCAtomIDTriggerSettings = 1 |
// Atom type and ID that contains the VDIIDCFocusPointSettings struct |
vdIIDCAtomTypeFocusPointSettings = 'fpst', |
vdIIDCAtomIDFocusPointSettings = 1 |
// Atom type and ID that contains the VDIIDCLightingHintSetting struct |
vdIIDCAtomTypeLightingHintSettings = 'lhst', |
vdIIDCAtomIDLightingHintSettings = 1 |
To take a specific example, suppose you called VDIIDCGetFeatures,
passing an instance of a video digitizer of subtype vdSubTypeIIDC.
You might receive back a QuickTime atom container in which you find
the following atoms:
vdIIDCAtomTypeFeature = 'feat' |
vdIIDCAtomTypeFeatureAtomTypeAndID = 't&id' |
vdIIDCAtomIDFeatureAtomTypeAndID = 1 |
feature = vdIIDCFeatureShutter // shutter feature |
atomType = vdIIDCAtomTypeFeatureSettings |
atomID = 1 |
vdIIDCAtomTypeFeatureSettings = 'fstg' |
vdIIDCAtomIDFeatureSettings = 1 |
vdIIDCAtomTypeFeature = 'feat' |
vdIIDCAtomTypeFeatureAtomTypeAndID = 't&id' |
vdIIDCAtomIDFeatureAtomTypeAndID = 1 |
feature = vdIIDCFeatureFocus // focus feature |
atomType = vdIIDCAtomTypeFeatureSettings |
atomID = 1 |
vdIIDCAtomTypeFeatureSettings = 'fstg' |
vdIIDCAtomIDFeatureSettings = 1 |
vdIIDCAtomTypeFeature = 'feat' |
vdIIDCAtomTypeFeatureAtomTypeAndID = 't&id' |
vdIIDCAtomIDFeatureAtomTypeAndID = 1 |
feature = vdIIDCFeatureTrigger // trigger feature |
atomType = vdIIDCAtomTypeTriggerSettings |
atomID = 1 |
vdIIDCAtomTypeTriggerSettings = 'tstg' |
vdIIDCAtomIDFTriggerSettings = 1 |
In this example, the VDIIDCGetFeatures function
tells you that the camera served by the video digitizer component
passed to it reports on three IIDC functions: shutter, focus, and trigger.
Data on the shutter and focus features can be retrieved from VDIIDCFeatureSettings structures
in vdIIDCAtomTypeFeatureSettings atoms.
Data on the trigger feature can be retrieved from a VDIIDCTriggerSettings structure
in a vdIIDCAtomTypeTriggerSettings atom.
Last updated: 2003-09-01