Hi,
I need to edit some settings the iSight camera that's built- in
imacs to turn off auto-exposure and set levels manually. I found
some code via http://developer.apple.com/qa/qa2005/qa1421.html that
showed me how to get an SGSettingsDialog, which i can't manage to
get working, because I don't know how toget teh SegGrabComponent
from the iSight. This is the snippet:
- (IBAction) showCameraSettings:(id)sender
{
QTCaptureDevice *videoDevice = [QTCaptureDevice
defaultInputDeviceWithMediaType:QTMediaTypeVideo];
NSDictionary* attr = [videoDevice deviceAttributes];
if (attr)
{
NSLog(@"Fetched attributes");
NSLog(@"attr: %@", attr);
NSValue* sgnum = [attr
objectForKey:QTCaptureDeviceLegacySequenceGrabberAttribute];
NSLog(@"sgnum: %@", sgnum);
if (sgnum)
{
// IT NEVER ENTERS HERE
NSLog(@"Fetched component number");
SeqGrabComponent sg = (SeqGrabComponent)[sgnum
pointerValue];
SGChannel chan;
OSType type;
OSErr err = SGGetIndChannel (sg,1, &chan, &type );
if (err == noErr)
err = SGSettingsDialog(sg, chan,
0, NULL, 0,0, 0 );
}
}
}
The NSLog attr line logs this:
attr: {
linkedDevices = (
iSight
);
suspended = 0;
}
So I'm not suprised sgnum doesn't get set correctly.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden