Tutorial: persistent camera settings

Chris French cfrench at rvsi.net
Mon Apr 11 14:33:11 GMT 2005


On Apr 11, 2005, at 8:00 AM, Julien Letessier wrote:

> On 22 Mar 2005, at 15:08, Chris French wrote:
>
>> There is an Apple Q & A note on this subject that might help too. You
>> could combine this with reading the GUID from the camera to allow
>> saving of multiple camera preferences to an xml file. It certainly
>> works for the Sony industrial cameras and Pyro webcams, I haven't
>> tried any others yet.
>>
>> http://developer.apple.com/qa/qa2001/qa1286.html
>
> Wow, thanks.
> I might have samed some time if I had read the Q&A *before* finding out
> the very same way to do it :'(
>
> Do you have pointers on how to read the camera GUID using QuickTime ?
>

This is all covered in the Apple sample code

http://developer.apple.com/samplecode/SGDevices/SGDevices.html

but here's how to get GUID and model name

			myVDig = SGGetVideoDigitizerComponent(videoChannel);
			if (myVDig != NULL)
			{
				vdErr = VDGetNumberOfInputs(myVDig, &nVDInputs);
				if (vdErr == noErr)
				{
					printf("We Found %d devices\n",nVDInputs + 1);
					cameraCount = nVDInputs + 1;
					for (vdLoop = 0;vdLoop<=nVDInputs;)
					{
						vdErr = VDSetInput(myVDig,vdLoop);
						if (vdErr != noErr)
							break;
						vdErr = VDGetUniqueIDs (myVDig,&outID,&inID);
						if (vdErr != noErr)
							break;
						vdErr = VDGetInputName( myVDig,
												vdLoop,
												outInputName);


outID is UInt64
outInputName is Str255


Hope this helps,

Chris

Chris French
Acuity CIMatrix
486 Amherst Street
Nashua, NH 03063



More information about the Video-Developers mailing list