Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |

New Anchor Data Reference

To resolve relative data references, a method was needed to determine the original location from which a movie was opened or imported.

To address this, the concept of a movie's anchor data reference is introduced in QuickTime 4.1. This data reference indicates from where the movie was originally opened or imported but still allows the movie's default data reference to remain nil in the import-in-place case.

Two new QuickTime Movie Toolbox routines are introduced:

pascal OSErr SetMovieAnchorDataRef ( Movie theMovie, Handle dataRef, 
                                        OSType dataRefType);

This routine sets the movie's anchor data reference. Pass nil to reset the anchor data reference to nothing. The routine copies the data reference.

pascal OSErr GetMovieAnchorDataRef ( Movie theMovie, Handle *dataRef,
                                        OSType *dataRefType, long 
                                            *flags);

This routine retrieves a movie's anchor data reference and type.

If the movie has SetMovieAnchorDataRef called on it, the routine will return a copy of the data reference and type. If there is no anchor data reference associated with the movie, then this routine will return a copy of the default data reference and type along with setting the following bit of the long integer referenced through the flags parameter.

kMovieAnchorDataRefIsDefault = 1 << 0

If there is neither an anchor nor a default data reference, nil will be returned for the data reference and 0 for the type.

Note:   The caller should dispose of the data reference returned.


© 2000 Apple Computer, Inc.

Inside Macintosh: QuickTime Reference

| Previous | Chapter Contents | Chapter Top | Next |