The QTPlgSampleReference class is used when you need to obtain information about samples– such as their size, location, and sample descriptions – or to set this kind of information (for example, when adding samples or blocks of samples to a directly, without using the services of an importer or sequence grabber).
This class transparently supports the new SampleTable APIs introduced in QuickTime 7.0
The QTPlgSampleReference class constructors are called when you create a new instance of the class, while the ˜QTPlgSampleReference 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. A QTPlgSampleReference object is valid if it refers to one sample at least (that is if its property is greater than 0) See the validity requirements for more details.
The class provides you with the following initializer methods:
()
This is the default constructor. All of the object properties are initialized to 0 but the
property that is initialized to 1
(other as QTPlgSampleReference)
This is the copy constructor. The properties of the object to be copied will be used to initialize the
new class instance properties
specifies the offset into the file of the sample data
specifies the total number of bytes of sample data identified by the reference. All samples referenced by a single
QTPlgSampleReference object must be the same size
specifies the number of samples contained in the reference
specifies the number of bytes of a single data chunk referenced by the reference
specifies the duration of each sample in the reference. You must specify this parameter in the media’s time scale.
All samples referenced by a single QTPlgSampleReference object must be the same duration
specifies the index value of the sample descriptions that correspond to the returned sample data. This index is 0–based, that is the
index to the first sample description is 0, the second 1 and so on. You can use this index to
retrieve the media sample descriptions from the sample descriptions list obtained by the
property of the
class
specifies if the samples are key frames
specifies the span, expressed in media’s time scale, of the sample data identified by the reference. For media samples whose decode time is not the
same as display time (i.e video samples created with some frame–reordering capable codec), the times always refer to display times while the
samples are ordered by a decode time basis