Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
Clippings/CreateEffectDescription.txt
ImageDescriptionHandle myDesc = NULL; |
#if USES_MAKE_IMAGE_DESC_FOR_EFFECT |
OSErr myErr = noErr; |
// create a new sample description for the effect - we use |
// the MakeImageDescriptionForEffect function if we want to |
// create stacked effects, where one effect track acts as a |
// source for another effect |
myErr = MakeImageDescriptionForEffect(myEffectCode, &myDesc); |
if (myErr != noErr) |
BailError(myErr); |
#else |
// create a new sample description - in this case, we'll construct |
// the image description ourselves using the NewHandleClear function, |
// since we're not going to create a stacked effect (in which case |
// you'd need to use MakeImageDescriptionForEffect as described above) |
myDesc = (ImageDescriptionHandle)NewHandleClear(sizeof(ImageDescription)); |
BailNil(myDesc); |
(**myDesc).idSize = sizeof(ImageDescription); |
(**myDesc).cType = myEffectCode; |
(**myDesc).hRes = 72L << 16; |
(**myDesc).vRes = 72L << 16; |
(**myDesc).dataSize = 0L; |
(**myDesc).frameCount = 1; |
(**myDesc).depth = 0; |
(**myDesc).clutID = -1; |
#endif |
// fill in the fields of the sample description |
(**myDesc).vendor = kAppleManufacturer; |
(**myDesc).temporalQuality = codecNormalQuality; |
(**myDesc).spatialQuality = codecNormalQuality; |
(**myDesc).width = videoTrackFXWidth >> 16; |
(**myDesc).height = videoTrackFXHeight >> 16; |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-01-14