Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Get SeqGrabComponent from iSight camera
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get SeqGrabComponent from iSight camera



I see, is there another way to change these settings?

Jonathan


3 feb 2009 kl. 20.11 skrev David Underwood:

QTCaptureDeviceLegacySequenceGrabberAttribute only returns a value for devices that do not use the new QTKit capture device system. iSight cameras, USB and Firewire webcams, and DV/HDV cameras all use the new device system and therefore don't have a Sequence Grabber component behind them.

Currently, there is no QTKit capture API for accessing or changing these device settings.

David Underwood
QuickTime Engineering

On Feb 3, 2009, at 8:22 AM, Jonathan Selander wrote:

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


_______________________________________________ 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
References: 
 >Get SeqGrabComponent from iSight camera (From: Jonathan Selander <email@hidden>)
 >Re: Get SeqGrabComponent from iSight camera (From: David Underwood <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.