Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
More SUCCESS getting and setting parameters (focus, hue) for IIDC VideoDigitizer instances.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

More SUCCESS getting and setting parameters (focus, hue) for IIDC VideoDigitizer instances.



Here's the code to set the focus on an IIDC camera, continued from the previous message.

Note that, in terms of correctness, I should REALLY be checking to see if the VideoDigitizer has a subtype that says it's IIDC before I do any of this, but, frankly, since I just started programming Carbon 5 days ago, I don't know how to get the subtype from a ComponentInstance.

Also, I don't actually know how much of the VDIIDCFeatureAtomTypeAndID structure actually has to be filled out for this to work, since it's, uh, not really documented very well. So I fill in the English name for "Focus" even though it's probably overkill.

-Wil Shipley
Delicious Monster Software


// SET the focus to be manual (at 10 out of 100)
QTAtomContainer iidcFeaturesAtomContainer = NULL;
QTNewAtomContainer(&iidcFeaturesAtomContainer);

// 'feat'
QTAtom featureAtom = NULL;
err = QTInsertChild(iidcFeaturesAtomContainer, kParentAtomIsContainer, vdIIDCAtomTypeFeature, 1, 0, 0, NULL, &featureAtom);
NoteErr(err);
// 't&id'
QTAtom typeAndIDAtom = NULL;
VDIIDCFeatureAtomTypeAndID featureAtomTypeAndID = {vdIIDCFeatureFocus, vdIIDCGroupMechanics, {5, 'F', 'o', 'c', 'u', 's'}, vdIIDCAtomTypeFeatureSettings, vdIIDCAtomIDFeatureSettings};
err = QTInsertChild(iidcFeaturesAtomContainer, featureAtom, vdIIDCAtomTypeFeatureAtomTypeAndID, vdIIDCAtomIDFeatureAtomTypeAndID, 0, sizeof(featureAtomTypeAndID), &featureAtomTypeAndID, &typeAndIDAtom);
NoteErr(err);
// 'fstg'
QTAtom featureSettingsAtom = NULL;
VDIIDCFeatureSettings featureSettings = {{0, 0, 0, 0.0, 0.0}, {vdIIDCFeatureFlagOn | vdIIDCFeatureFlagManual | vdIIDCFeatureFlagRawControl, 0.1}};
err = QTInsertChild(iidcFeaturesAtomContainer, featureAtom, vdIIDCAtomTypeFeatureSettings, vdIIDCAtomIDFeatureSettings, 0, sizeof(featureSettings), &featureSettings, &featureSettingsAtom);
NoteErr(err);

err = VDIIDCSetFeatures(SGGetVideoDigitizerComponent(sequenceGrabberChannel), iidcFeaturesAtomContainer);
NoteErr(err);
_______________________________________________
quicktime-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/quicktime-api
Do not post admin requests to the list. They will be ignored.




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.