The QTPlugin provides you with support for playback of data coming out from several types of source by using an unique interface represented by the hierarchy of classes whose, at the very top, stands the QTPlgDataPresentation class on. Using this set of classes you can:
- playback data without using any Realbasic built–in control (such as a movieplayer control)
- put the presentation into full–screen mode, if applicable
- apply real–time graphics transformations and effects to the data being presented
- saving the data, exactly like displayed, to movie files
The QTPlgDataPresentation class is an abstract class that defines properties and methods useful to deal with data coming from different type of sources and to present them in an appropriate way. The specialized classes derived from it will take an interest in to implement the better mechanism to playback such a data.
The class has not constructor at all (you can always use the Realbasic common constructor syntax, of course, but you will obtain an usless object). Its destructor, will be implicitly invoked every time one of its derived classes will be destroyed.
Anyway, once a new instance of a class derived from QTPlgDataPresentation is returned, it is good practice to check the class property to be sure that the new object can be used. The conditions that determine if a QTPlgDataPresentation object is valid vary from class to class (and will not be discussed further), but, the gold rule is the following: if an instance of this class is not valid you can not use it, so dispose of it as soon as possible.
When a class instance is not valid, you can get some clue about what is happened by checking the class property.
determines if the presentation has completely finished playing its data
indicates the current presentation’s state
enables or disables the loop status. Changes to the loop status have effect for sequence of samples data only
enables or disables the palindrome status. Changes to the palindrome status have effect for sequence of
samples data only
enables or disables the evaluation of playback statistics. If this property is set to true, then both
the and
class properties will be updated at intervals
of one second
enables or disables the automatic idling of data during playback. If this property is set to true, then you do not need anymore to use a Timer control to
call repeatedly the method
while playing data. The internal timer interval is set up to the value that best fits the characteristics of the data to play (see the
property below)
specifies the natural frequency (in milliseconds) at which the data being played. The value returned is determined by the
characteristics of the data (i.e. for a are considered the
and the properties)
specifies the current playback data rate
specifies the current playback sample rate
specifies the total duration of the presentation; the value of this property is expressed in presentation’s
determines the time scale used by the presentation; the value of this property is expressed in units per second
specifies the current point in the presentation timeline; the value of this property is expressed in presentation’s
and ranges
from 0 to the presentation’s
specifies the duration, expresses in presentation’s
, of a single sample data
specifies the total number of samples data the presentation has to playback
specifies the index of the current sample being displayed; this value ranges from 1 to
specifies your custom progress callback. If this property is set to a
instance of the
class, it will be invoked
anytime the presentation performs a task that takes a long time to execute
[Deprecated]: since version 6.6 of the plugin this property is deprecated
and will be removed from a future plugin version; use the
class instead
([rate as double=1.0])
starts to playback data at the rate specified by the rate parameter. By default this parameter is set to 1.0 meaning that the
data have to be played at their normal rate
()
stops the playback of the data
()
gives idle time to the data player to playback data appropriately (i.e. if the data to playback is constituted of video frames
calling this method will draw the appropriate image data onto the selected display). If the
property is true, you do not need to call this method
()
stops the data playback, then rewinds the presentation to the begin. This is equivalent to set to 0
the current presentation time by using the
class method
()
stops the data playback, then plays the last sample data. This is equivalent to set the current presentation time
to the presentation’s by using the
class method
()
stops the data playback, then plays the sample data just after the current sample
()
stops the data playback, then plays the sample data just before the current sample