This class allows Realbasic developers to preview and/or record data from external devices.
→
The QTPlgGrabber class constructors are called when you create a new instance of the class, while the ˜QTPlgGrabber 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 super class to information about the validity of a QTPlgGrabber class instance.
The class provides you with the following initializer methods:
()
the default constructor. The instance class will try to open a connection to the first sequence grabbber component found, if any;
if no sequence grabber
component can be found the
class property is
set to false and you should dispose of the class instance; otherwise the object will be initialized in the following way:
- =
kstatus_stopped - =0
- =the default sequence grabber component record settings
(fSettings as folderitem)
using this class constructor version, the class will be instantiated with the settings previously stored in the file specified by the
fSettings parameter; these settings comprise both the sequence grabbber component
,
and its channels, if any. If you set this parameter is nil, the
cosntructor behaviour is the same as the default constructor
(component as as
)
using this version of the class constructor, you can instruct the class instance to open a connection to the sequence grabber
component specified by the component parameter; if you set this parameter is nil, the
cosntructor behaviour is the same as the default constructor
determines if the acquisition of sound streams will be performed by using the newest sound channel component; this
component allows capture of high–resolution audio, supporting multi–channel, high sample rate, high accuracy sound
this property is effective only with QuickTime 7 or later and MacOS X; otherwise it will be ignored and the grabber
instance will create an old style sound channel component instance
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
to provide processing time to the grabber and the channels associated to it. If possible, the internal timer interval is set up to a value that best fits the characteristics of the data to
play (based on time scale and sample duration values); otherwise the interval is set up to a default value of 40 milliseconds
returns information about the current status of the grabber. The value returned can be one of
the constant values defined in to the
section
returns the number of channels associated to the grabber
a 0–based list of channels allocated by the grabber (that is you can use values for
i ranging from 0 to
–1). You can use this list
to retrieve and configure as appropriate for you any channel associated to the grabber
specifies the set of parameters to be used in the next record session. This property should be set to any valid object
instance before starting a new record session
lets your application obtain an image from a sequence grabber component and display it using a
data presentation context
specifies the list of channels currently allocated by the grabber. You can use this list
to retrieve and configure as appropriate for you any
associated to the grabber
(channelType as )
use this function to instantiate a new
object and associate it to the grabber; you determines the
type of the channel to be allocated by specifying its type into the channelType parameter. Using the
, you can retrieve later a
reference to this channel and inspect and modify its configuration using the properties and methods of the
class
()
use this function to instantiate a new
object and associate it to the grabber. Using the
, you can retrieve later a
reference to this channel and inspect and modify its configuration using the properties and methods of the
class
()
use this function to instantiate a new
object and associate it to the grabber. If the
property is set to true, this
method will instantiate a object instead. Using the
, you can retrieve later a
reference to this channel and inspect and modify its configuration using the properties and methods of the
class
()
use this function to instantiate a new
object and associate it to the grabber. Using the
, you can retrieve later a
reference to this channel and inspect and modify its configuration using the properties and methods of the
class
(i as integer)
use this function to remove a object
from the . You specify the
channel to remove by providing its index i in the list
(w as window, r as
)
You establish where the grabber will display visual data in preview mode using the w and r parameters.
The destination rectangle r is defined into the graphics world specified by the w parameter
and specifies the maximum display area in wich any visual channel set for preview mode will be displayed; its coordinates are intended to be relatives to
the destination graphics world. If a visual channel’s display boundary does not fit into the destination rectangle, it
will be scaled and centered as apropriate.
If you do not call this function before previewing data, the current graphics world will be used as destination of previewed data.
If you have not allocated any channel that display visual data you can ignore this function
If you do not call this function before previewing data, the current graphics world will be used as destination of previewed data.
If you have not allocated any channel that display visual data you can ignore this function
(context as canvas, [r as
])
You establish where the grabber will display visual data in preview mode using the context and r parameters.
The destination rectangle r is defined into the graphics world associated to the context parameter
and specifies the maximum display area in wich any visual channel set for preview mode will be displayed; its coordinates are intended to be local to
the destination canvas control. If you do not specify a destination rectangle, the display boundary of the canvas control will be used for display.
If a visual channel’s display boundary does not fit into the destination rectangle, it
will be scaled and centered as apropriate.
If you do not call this function before previewing data, the current graphics world will be used as destination of previewed data.
If you have not allocated any channel that display visual data you can ignore this function
If you do not call this function before previewing data, the current graphics world will be used as destination of previewed data.
If you have not allocated any channel that display visual data you can ignore this function
(r as
) as picture
if some visual data is available, this function allows you to obtain an image from the grabber. You can specify the resulting image dimensions by setting
the and
properties of the
r parameter as appropriate. If the original image dimensions do not fit into the
destination rectangle defined by r , the image wil be scaled and centered into this rectangle as appropriate
() as boolean
instructs the grabber to begin processing data from its channels, if any.
The grabber immediately presents the data to the user in the appropriate format according to the channel configuration parameters you have specified
by using the appropriate methods and properties of the
and its derived classes (
,
and
).
Video data is displayed in the destination display region (as specified by the class method; sound data is played at the specified volume settings.
Video data is displayed in the destination display region (as specified by the class method; sound data is played at the specified volume settings.
() as boolean
instructs the grabber to begin collecting data from its channels.
The grabber stores the collected data according to the recording parameters you specified with
the class property
() as boolean
this function provides processing time to the grabber and the channels associated to it. After starting a preview or record operation, you should call
this function as often as possible, until you stop the operation by calling
class method. If this function encounter some error during its execution, it will
the current operation automatically and set the
class property to the returned error code.
This is true even if you have established a limit of some type to a record operation providing the appropriate parameters to the
class property
() as boolean
this function allows you to tell the grabber that it must refresh its display.
You should call this function whenever you receive an update event for a window that contains a sequence grabber display.
() as boolean
instructs the grabber to suspend the current operation. This function does not release any
system resources or temporary memory associated with the current operation. Consequently, it is generally much faster than using
the
class method to suspend an operation.
When you restart the operation, the sequence grabber component may be unable to satisfy your request. This can occur, for example,
if the user has moved the display window to a location that the digitizing hardware cannot support.
() as boolean
instructs the grabber to restart the current operation.
() as boolean
use this function to stop a preview or record operation. The grabber releases any system resources it used
during the operation, such as temporary memory. In the case of a record operation, the grabber stores the collected movie data
as specified by the class property
the grabber is in idle status
the grabber is previewing data
the grabber is recording data
the grabber is paused