A also contains a data structure known as a media.
This is a low–level data structure that describes the location, duration, and natural time scale of the media sample data.
This can be confusing, because in casual use the sample data itself is sometimes referred to as the track’s media.
When a QTPlugin class or method or property specifies a media as a parameter or value, it always refers to the
media data structure inside a movie, not to actual data samples.
At the lowest level, a QuickTime track contains a set of sample tables. Each entry in a sample table specifies the
location and duration of a chunk of sample data, such as a still image, a video frame, a sequence of PCM audio samples, or a text string.
There is at least one
for each table of samples. The sample description provides the details necessary to
translate a stored sample into a format that the media handler can work with. For example, a sample description
might specify the
,
or the
of a group of PCM audio samples.
For some media types, such as sound, all data samples in a given track share a single sample description. If you have audio
samples that use different sample rates or sample sizes, for example, they must be in separate sound tracks.
Other media types can have multiple sample descriptions, so a series of images could have varying heights and widths,
with different sample descriptions used whenever the dimensions change.
The QTPlgMedia class along with its derived classes, provides you with properties, methods and constants that
let you manipulate QuickTime media.
→
The
QTPlgMedia class constructors are called when you create a new instance of the class, while
the
˜QTPlgMedia 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.
You can not create a
QTPlgMedia object by yourself; instead, you will use class instances obtained from
objects.
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:
This is the copy constructor. The properties of the object to be copied will be used to initialize the
new class instance properties
changes to this property have the same effect as changes to the
property of the
class
determines the sound balance setting. In this case, values range from –128 to
127. Negative values emphasize the left sound channel, while positive values emphasize the right
sound channel. A value of –128 forces all output through the left channel.
Similarly, a value of 127 forces all output through the right channel.
Passing a positive balance value causes the left channel to get quieter. Passing a negative balance value causes the right channel to get
quieter. The amount it gets quieter can be seen in the following examples:
a balance value of 32 would lower the left volume by one quarter of its current value
(since 32 is ¼ of 127, the full volume setting).
A balance value of –96 would lower the right volume by ¾ of its current value
(since 96 is ¾ of 128)
the four char string code identifying the type of the media data
specifies the type of the media data
specifies the color for use in blending and transparent operations and the graphics mode to associate with the
current drawing operation
specifies the relative quality of the media. This property is set with one of the
defined by this class.
The relative quality of media is useful when dealing with alternate groups for
and
identifies the number of samples in the media
specifies the number of data references in the media
[Deprecated]: since version 6.0 of the plugin this property is deprecated
and will be removed from a future plugin version; use the
class property instead
specifies the number of sample descriptions in the media
[Deprecated]: since version 6.0 of the plugin this property is deprecated
and will be removed from a future plugin version; use the
class property instead
a zero–based array of media
objects
(that is
i ranges from
0 to
–1)
[Deprecated]: since version 6.0 of the plugin this property is deprecated
and will be removed from a future plugin version; use the
class property instead
a zero–based array of media data sample descriptors objects
(that is
i ranges from
0 to
–1); the
type of returned depends on
the type of samples data; in case that the description of a given type of data is not provided by the QTPlugin, the object
returned is a generic class
instance
[Deprecated]: since version 6.0 of the plugin this property is deprecated
and will be removed from a future plugin version; use the
class property instead
specifies the list of media objects
specifies the list of media data sample descriptors objects; the
type of instances contained into the list depends on
the type of samples data; in case that the description of a given type of data is not provided by the QTPlugin, the object
returned is a generic class instance. You can use the
isA operator to find about the type of object you are dealing with
specifies the list of all of the
contained within the media; this property has to be used with care cause, if the media contains thousands of samples or more,
the creation of the list of samples can be a very slow task. You can use the
class property to retrieve the total number of media samples.
Also, you can use the class method to
retrieve the list of samples relative to a specified amount of media time
converts a time value of the track that uses the media to a time value that is appropriate to the media,
using the track’s edit list. This method maps the track time through the track’s edit list
to come up with the media time. This time value contains the track’s
time value according to the media’s time coordinate system.
If the time you specified lies outside of the movie’s active segment or corresponds to
empty space in the track, this function returns a value of –1.
Hence you can use it to determine whether a specified track edit is empty.
converts an interval of time relative to the track or movie the media belongs to an interval of time (if any) that is appropriate to the media,
using the track’s edit list. This method maps the time range through the track’s edit list
to come up with the media times. The resulting interval of time contains the track’s
time values according to the media’s time coordinate system.
If the time you specified lies outside of the movie’s active segment or corresponds to
empty space in the track, this function returns nil.
Hence you can use it to determine whether a specified track edit is empty
a list of all of the objects that lie within the
time range specified. The time values are to not be expressed in media coordinate time; this method performs an internal
check of the time values specified by the
timeRange object before collecting media samples. If the time values
do not specify a valid range respect to the media’s time coordinate system or the
timeRange parameter is
set to
nil, the method will retrieve all of the media samples references such as the
class property. To retrieve a single sample reference, just
set the property of the
class to
0
the relative quality of the media cannot be retrieved
specifies the lowest quality level
specifies an acceptable quality level
specifies a better quality level
specifies the best quality level