QTGrab
current version 0.9q
Copyright Geoff Smith 1999-2002
page last updated: 16th Feburary 2002
| |
| To purchase email sales@physicalbits.com |
Description
This is a Macintosh only Xtra for Macromedia Director(TM) to allows capturing, display and saving to disk vieo and audio images.
For updates on this and my other XObjects/Xtras check out my web page:physicalbits
Compatibility
OS Version Yes No UntestedApple Macintosh Classic (OS9) OSX
Installation
There are two methods to install and use this Xtra for Macromedia Director.
Copy the QTGrab.xtr into the Xtras folder inside the folder with the Director main program. When you start Director it looks inside, and makes available, any xtras inside the Xtras folder.
The other method is to place the xtra in some folder, and use Directors openxlib command before trying to use it. I use this method in my demo movies. If you put the xtra in the Xtras folder you do not need to use the openxlib command. Refer to the Director documentation for further information.To check that the xtra is loaded enter lingo "showxlib" command into Directors message window, this lists all the available xtras. If the xtra is not named in the list some error has occured. Check the location of the file or use the openxlib command (see above). The figure below shows the presence of the xtra, "-- Xtra: RecSndXtra", and because openxlib was used the name of the file that it was read from is shown.
Is the xtra is on the list use "put interface(xtra "QTGrab")" to list all the messages available in the xtra. It also shows the version of the xtra and if it can be used in a projector.
Commands
| General | |
| Video | |
| mSetRect |
|
| Audio | |
| mConfigureAudioDialog mSetAudioInputType FindAllAudioDeviceNames mSetAudioSampleSize mSetAudioInputGain mGetAudioSettings/mSetAudioSettings mGetAudioDeviceList |
|
| Capture | |
| mStartRecording mPauseRecording mStopRecording mUpdate mGrabCurrentFrameAsPicture mGrabCurrentFrameAsPictureWithDither |
|
| Information | |
| mGetLastMessage | |
| No longer suppported | |
| mGetNumberOfVideoDigitiserInputs
object me |
| Command format | new |
| Description | Standard command to create a new instance of an object. It requires one parameter that indicates the audio input device to use |
| Parameters | deviceName:
the name of the device to use. |
| Return value | instance value or error number. Test with Lingo objectP command |
| Example | set gAudio to new( xtra "RecSndXtra", "" ) |
| Command format | mOpenVideoChannel object me , string deviceName |
| Description | Open a video device for viewing of capturing |
| Parameters | deviceName: |
| Return value | "ok" else an error message where the first word is "Error" |
| Example | put mOpenVideoChannel( theXtra "") |
| Command format | mOpenAudioChannel object me , string deviceName |
| Description | Open an audio device for viewing of capturing |
| Parameters | deviceName: |
| Return value | "ok" else an error message where the first word is "Error" |
| Example | put mOpenAudioChannel( theXtra "") |
| Command format | FindAllAudioDeviceNames |
| Description | Find the names of all the audio devices presently installed on the machine - GLOBAL HANDLER (Does not need the instance created) |
| Parameters | None |
| Return value | List of the devices or "" |
| Example | put FindAllAudioDevices |
| Command format | mPreview object me , integer trueOrFalse |
| Description | Once a video channel has been opened, the preview has to be enabled |
| Parameters | trueOrFalse |
| Return value | "ok" else an error message where the first word is "Error" |
| Example | put mPreview( theXtra, true) |
| Command format | mStartRecording object me , string fileAndPathname |
| Description | Start recording the video/audio data to the specified file |
| Parameters | fileAndPathname |
| Return value | "ok" else an error message where the first word is "Error" |
| Example | put mStartRecodring( theXtra, the pathname && "hello") |
| Command format | mPauseRecording object me , integer trueOrFalse |
| Description | Pauses or unpauses the current recording |
| Parameters | trueOrFalse: |
| Return value | "ok" else an error message where the first word is "Error" |
| Example | put mPauseRecording( theXtra, false). |
| Command format | mStopRecording object me |
| Description | Stop a recording |
| Parameters | None: |
| Return value | "ok" else an error message where the first word is "Error" |
| Example | put mStopRecording( theXtra). |
mGrabCurrentFrameAsPicture and mGrabCurrentFrameAsPictureWithDither
| Command format | mGrabCurrentFrameAsPicture
object me , string castNameToSaveInto mGrabCurrentFrameAsPictureWithDither object me , string castNameToSaveInto |
| Description | Take the current video image and capture it into the named cast member, also with dither |
| Parameters | castNameToSaveInto: |
| Return value | "ok" else an error message where the first word is "Error" |
| Example | put mGrabCurrentFrameAsPicture( theXtra, "BigPicture" ) |
| Command format | mUpdate object me |
| Description | This updates the image sent to either the stage or file. Call regularly to keep image refreshed. |
| Parameters | None: |
| Return value | "ok" else an error message where the first word is "Error" |
| Example | put mUpdate( theXtra ) |
| Command format | mSetRect object me, integer left , integer top , integer right , integer bottom |
| Description | Set the capture size rect (need to check this).The camera may not support the new size |
| Parameters | left,
top, right and bottom : |
| Return value | "ok" else an error message where the first word is "Error" |
| Example | put mSetRect( theXtra,10,15,100,200 ) |
| Command format | mSetCameraSubRect object me, integer left , integer top , integer right , integer bottom |
| Description | Some video capture devices have the ability to return only a portion o the image the are seeing, the sub rect. This command allows control over the segment that is returned. The camera may not support this feature. |
| Parameters | left,
top, right and bottom : |
| Return value | "ok" else an error message where the first word is "Error" |
| Example | put mSetCameraSubRect( theXtra,10,15,100,200 ) |
| Command format | mSetKeyColour object me, integer theColourIndex |
| Description | So I have never got this one to work, I leave it in because it might wotk with some camera I do not have. As I understand it this is kind of like an alpha/keying channel. IF you get it to work please email me. |
| Parameters | theColourIndex: |
| Return value | "ok" else an error message where the first word is "Error" |
| Example | put mSetKetColour( theXtra,10 ) |
mConfigureVideoDialog and mConfigureAudioDialog
| Command format | mConfigureVideoDialog
object me mConfigureAudioDialog object me |
| Description | Display the settings dialog for the video or audio |
| Parameters | None: |
| Return value | "ok" or "Error" if user cancels the dialog |
| Example | put mConfigureVideoDialog( theXtra) |
| Command format | mSetAudioInputType object me, string type -- |
| Description | Allows the setting of the audio input from lingo (see also mSetAudioSettings) |
| Parameters | type: |
| Return value | "ok" else an error message where the first word is "Error" |
| Example | put mSetAudioInputType( theXtra,"rca") |
| Command format | mGetVideoSettings
object me |
| Description | Most of the current video settings can be "saved" and "restored" using these commands. mGetVideoSettings returns a string you store, which you later give to mSetVideoSettings. This will most propably break if you try to get on one mac and set on another. |
| Parameters | theData: |
| Return value | mGetVideoSettings:The
string, or "" on error mSetVideoSettings:"ok" else an error message where the first word is "Error" |
| Example | put
mGetVideoSettings( theXtra) into currentState |
| Command format | mGetAudioSettings
object me |
| Description | Most of the current audio settings can be "saved" and "restored" using these commands. mGetAudioSettings returns a string you store, which you later give to mSetAudioSettings. This will most propably break if you try to get on one mac and set on another. |
| Parameters | theData: |
| Return value | mGetAudioSettings:The
string, or "" on error mSetAudioSettings:"ok" else an error message where the first word is "Error" |
| Example | put
mGetAudioSettings( theXtra) into currentState |
| Command format | mSetAudioSampleSize object me , integer newSize |
| Description | Allows the setting of the audio sample size, only 8 or 16 are valid |
| Parameters | newSize: |
| Return value | "ok" else an error message where the first word is "Error" |
| Example | put mSetAudioSampleSize( theXtra,16) |
| Command format | mSetAudioInputGain object me , integer value |
| Description | Allows the setting of the audio input gain level |
| Parameters | value: |
| Return value | "ok" else an error message where the first word is "Error" |
| Example | put mSetAudioInputGain( theXtra,50) |
| Command format | mGetVideoDigitiserInfo object me |
| Description | Returns a, usefull, description of the capabilities of the current device. |
| Parameters | None: |
| Return value | A string describing the capabilites of the current vieo input device |
| Example | put mGetVideoDigitizerInfo( theXtra) |
mGetCurrentVideoDigitiserIndex
| Command format | mGetCurrentVideoDigitiserIndex
object me |
| Description | When a system has multiple video input devices you can query the current one being used, then restore this later. |
| Parameters | index: |
| Return value | mGetCurrentVideoDigitiserIndex:
the current index value or -1 on error |
| Example | put
mGetCurrentVideoDigitiserIndex(
theXtra) into thisOne |
mGetCurrentVideoDigitiserInputFormat
| Command format | mGetCurrentVideoDigitiserInputFormat object me |
| Description | get the current input connector being used for input |
| Parameters | None: |
| Return value | One of "composite", "S-video" or "RGB" else an error message where the first word is "Error" |
| Example | put mGetCurrentVideoDigitiserInputFormat( theXtra) |
| Command format | mIsDigitiserRecievingVideo object me |
| Description | Checks if the video digitiser is currently receiving a video signel, eg is camera connected |
| Parameters | None: |
| Return value | "yes", "no" or "Error"..." |
| Example | put mIsDigitiserRecievingVideo( theXtra) |
| Command format | mGetVideoDeviceList
object me -- Video channel must be opened first |
| Description | Returns the names of all the video/audio devices connected. |
| Parameters | None: |
| Return value | Comma seperated string of all the available devices |
| Example | put mGetVideoDeviceList( theXtra) |
| Command format | mGetLastMessage object me |
| Description | Gets the result message from the last call |
| Parameters | None: |
| Return value | "ok" else an error message where the first word is "Error" |
| Example | put mGetLastMessage( theXtra) |
| Version | Date | Bug fix |
Notes |
| 0.9q | 4/02 | Aded mSetClip | |
| 0.9p | 4/02 | Added FindAllDeviceNames | |
| 0.9o | 4/02 | |
Stop not being called when record expires |
| 0.9n | 2/16 | |
Added commands to play and stop playing a sound that has been recorded. The sound does not need to be saved to cast or file. |
| 0.9m | 1/02 | Added protection to prevent saving a recording sound | |
| 0.9l | 1/02 | |
Changed FindAllAudioDecives to return full new form list |
| 0.9k | 11/01 | Added SaveAsFile for the Windows platform | |
| 0.9d | 11/01 | |
Slight bug fix |
| 0.9c | 10/01 | SaveAsFile for the Macintosh platform | |
| 0.9b | 5/01 | Added GetSoundInLevel to allow finding the volume level whilst recording | |
| 0.9a | 7/00 | Initial Xtra - conversion from XObject |
Contact details
Email: supportQtGrab@physicalbits.com
Conditions of use
| In this document Xtra refers to this Xtra, and me
refers to Geoff Smith. All rights to the XObject/Xtra are retained by
me. The XObject may be used in any MacroMedia Director document for personal
use and given to your friends. All documentation must be included when
passing on the XObject/Xtra. Unless licensed you may NOT do the following ·distribute
for profit without prior permission. ·distribute for profit within
a Director presentation without prior permission ·distribute by
CD-ROM without prior permission. ·distribute as part of a collection
without prior permission ·be used in a public presentation without
prior permission.Financial liabilty for this product is limited to the
purchase price or $1, whichever is greater. |