Contents
Navigation
Home User Reference Other Resources


A media sample reference is a reference to some existing media data. The idea is that once we’ve got some media data stored in some location (a file, an object addressed by a URL, a block of memory, and so forth), we can reuse that media data by simply referring to it. That is, we don’t need to copy the data in order to get access to it.

This is the mechanism, for example, used by QuickTime to import some types of files without having to make a copy of the file data. We say that these kinds of files are imported in place – meaning that the associated movie importer constructs a movie that directly references the data in the file being imported. A movie importer does this by inserting media sample references into the new movie. Those references point to the data in the imported file. Importing in place, by using media sample references, allows the new movie to be created more quickly and uses less storage space (since the media data does not need to be copied).

The QTPlgNewWrapperDataTrack class lets you create tracks that refer to external data by sample refrences added to their media structure.







The QTPlgNewWrapperDataTrack class constructors are called when you create a new instance of the class, while the ˜QTPlgNewWrapperDataTrack class destructor, is called automatically when the class is no more in use. Also, you can invoke the class destructor by setting the instance of the class to nil.
Once a new class instance is returned, it is good practice to check the class property to be sure that the new object can be used. See the validity conditions for more details.

The class provides you with the following initializer methods:
(m as , params as , [timeScale as integer])
use this constructor to create a wrapper track appropriate for the data you are going to insert and add it to the movie specified by the m; if the movie specified has been created in memory (see the of the class), the sample added to the track resides in memory as well. You describe the data to be added to the track by setting the of the params object as appropriate. At time, the class constructor accepts only or class instances. Also, you can specify the preferred time scale by using the optional timeScale parameter; if you omit this parameter a default time scale of 600 will be used

(dataReference as )
by this method you provide the specification of the location of the data for which you will create and add to the media a sample reference. Currently, only that refer to local files are accepted
returns nothing. Check the class property for errors
(sample as )
use this method to add to the media one or more sample references to some existing data. Such a data are intended to reside in the location identified by the you have specified previously by the class method described above
returns nothing. Check the class property for errors