Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Opening camera with specific format/mode?




On Oct 27, 2005, at 1:05 PM, Alex Majora wrote:


On Oct 27, 2005, at 12:23 PM, Sean Williams wrote:

VDGetCompressionTypes() takes a video digitizer component,
not sequence grabber component.  So after you have properly
configured your sequence grabber video channel, you call
SGGetVideoDigitizerComponent() to get the the underlying digitizer.


Oops, my mistake! Now after setting up the video channel, I feed VDGetCompressionTypes() the video digitizer component, but it returns me an error code of -109, which is a "nilHandleErr". Is it expecting me to somehow initialize/allocate the VDCompressionListHandle structure before invoking the call? I have it declared like this:


VDCompressionListHandle h;

Here is the sequence of calls I'm making:

 OpenDefaultComponent()
 SGInitialize()
 SGSetDataRef()
 SGNewChannel()
 SGSetFrameRate()
 QTNewGWorld()
 SGSetGWorld()
 SGSetChannelBounds()
 SGSetChannelUsage()
 SGGetVideoDigitizerComponent()
 NewSGDataUPP()
 SGPrepare()
   status = VDGetCompressionTypes(theVDIG,h);


It's returning -109 (nilHandleErr) because you're passing it a nil handle. Isn't it great when error codes are actually descriptive and helpful? Before calling VDGetCompressionTypes, you need to NewHandle () your handle:

h = (VDCompressionListHandle)NewHandle(0);

The VDGetCompressionTypes calls will resize your handle. Don't forget to DisposeHandle(h) when you're done with it.

-Brad Ford
QuickTime Engineering

 SGStartRecord()

The code continues on and works as before, with low-res video.

Thanks,
Alex


_______________________________________________ Do not post admin requests to the list. They will be ignored. QuickTime-API mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/quicktime-api/email@hidden

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: http://lists.apple.com/mailman/options/quicktime-api/email@hidden

This email sent to email@hidden
References: 
 >Re: Opening camera with specific format/mode? (From: "Alex Majora" <email@hidden>)



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.