PsychGetCamIdForSpec - aleslab/Psychtoolbox-3-aleslab-fork GitHub Wiki
Return deviceIndex of a specified camera, one that matches given criteria.
[deviceIndex, dev] = PsychGetCamIdForSpec([className][, inputNameOrPort][, instance][, engineId]);
Searches for video sources which match given criteria. A handle to the
first source that satisfies the criteria is returned in argument
'deviceIndex' - You can open a connection to the source via
Screen('OpenVideoCapture', windowPtr, deviceIndex, ...);
The 2nd optional return argument contains the complete 'dev'ice
description struct, as returned by Screen().
Returns empty variables if no match can be made.
'className' Index or name of video input device class: Default is to
accept any class. This matches against the 'ClassName' property of the
list returned by Screen('VideoCaptureDevices').
'inputNameOrPort' selects the i'th input device of a matching class if an
index is given (zero-based), or a specific named device, e.g., 'iSight'
for the builtin iSight camera of Apple hardware.
'instance' If multiple devices match, take the i'th device where i ==
instance. By default, the first device (instance == 0) is assigned.
'engineId' Enumerate for video capture engine 'engineId'. By default, the
default videocapture engine is used.
Psychtoolbox/PsychVideoCapture/PsychGetCamIdForSpec.m