|
||||||
Index
General
General component properties.Capture Parameters
These properties set the parameters for capturing video.Audio Parameters
These properties set the parameters for audio.Colors
Sets the colors that will be used.
Active
Value
Boolean
Purpose
Turns the video capture window on and off. Setting this property to True will cause VideoLib OCX™ to load the AVI drivers into memory and connect to the video capture card. A False value will unload all of the video drivers.
Example
{ Turn on video window }
videolib.Active := True;AVIAllocate
Value
Long
Purpose
This property will pre-allocate the size of the file specified in AVIFileName before beginning a video capture Sequence. Pre-allocating a file can increase the efficiency of the capture session. This can also cause wasted space, if the capture session does not use all of the space allocated. The capture Sequence will automatically extend the file if necessary. A value of zero will cause the program to use the size of the file currently allocated. To insure a new empty file, this value can be set to one.
Example
{ Force AVI file to be recreated on each sequence call }
videolib.AVIAllocate := 1;AVIFileName
Value
BSTR
Purpose
This is the file path and name of the AVI file. The data in this file will be over-written on each call to Sequence.
Example
{ Turn on video window }
videolib.Active := True;Overlay
Value
Boolean
Purpose
Allows live video to be displayed within a window. The video will be shown when Active is set to True. The video is displayed to the control using hardware overlay. Using Overlay does not require CPU resources. Enabling Overlay mode automatically disables Preview mode.
Example
{ Turn on video window }
videolib.Active := True;Preview
Value
Boolean
Purpose
Allows live video frames to be previewed within a window. The video will be shown when Active is set to True. In this mode, frames are transferred from the capture hardware to system memory and then displayed in the capture window using GDI functions. Enabling Preview mode automatically disables Overlay mode.
Example
{ Turn on video window }
videolib.Active := True;PreviewRate
Value
Short
Purpose
Rate in milliseconds at which new frames are captured and displayed. Preview mode takes up massive CPU resources. Applications should increase this value, whenever possible, to allow other applications to run.
Example
{ Set the preview rate to 10 frames per second }
videolib.PreviewRate := 100;
videolib.Preview := True;Scale
Value
Boolean
Purpose
When enabled, the captured video frame is stretched to the dimensions of the capture window. Some video capture boards only support a multiple of 40x30 in Overlay mode. For these boards videolib OCX™ will automaticlly scale the window down to the closest size.
Example
{ Enable scaling }
videolib.Scale := True;VideoDriver
Value
Short
Purpose
This is the integer value of the video driver.
Example
{ Set video driver to the first capture board }
videolib.VideoDriver := 0;VideoSize
Value
BSTR
Purpose
This property sets the size of the video window in Overlay mode. This is only if Scale is set to False. The string representing the video window size should be formated in the following manner: WIDTHxHEIGHT.
Example
{ Set video window to 280 width by 210 height }
videolib.Scale := False;
videolib.VideoSize := 280x210;
AbortLeftMouse
Value
Boolean
Purpose
If set to True, the video capture Sequence will stop when the user presses the left mouse button.
Example
{ Allow user to end capture with left or right mouse button }
videolib.AbortLeftMouse := True;
videolib.AbortRightMouse := True;AbortRightMouse
Value
Boolean
Purpose
If set to True, the video capture Sequence will stop when the user presses the right mouse button.
Example
{ Allow user to end capture with left or right mouse button }
videolib.AbortLeftMouse := True;
videolib.AbortRightMouse := True;ChunkGranularity
Value
Long
Purpose
Logical block size, in bytes, of the AVI file. The value 0 indicates the current sector size is used as the granularity. Audio and video chunks will have junk chunks appended to round the chunk up to the next multiple of ChunkGranularity.
Example
{ Set the chuck size to the default sector size }
videolib.ChunkGranularity := 2048;DisableWriteCache
Value
Boolean
Purpose
Disables the memory to disk cache. This parameter should be set to False, it is included only for compatibility.
Example
videolib.DisableWriteCache := False;IndexSize
Value
Long
Purpose
Maximum number of index entries allowed in the AVI file. If set to zero, a default value of 32K is used. Each video frame uses one index entry. Values range from 1,800 to 324,000.
Example
{ Set maximum number of indexes allowed }
videolib.IndexSize := 0;KeyAbort
Value
Short
Purpose
Virtual key code to use as an abort to the capture Sequence.
Example
{ Set abort key to ESCAPE }
VideoCaptureParms.KeyAbort := 27;MakeUserHitOKToCapture
Value
Boolean
Purpose
When set to True, this property displays a dialog box requesting the user to hit OK when ready to begin the video capture Sequence.
Example
{ Display Hit OK dialog }
videolib.MakeUserHitOKToCapture := True;
videolib.Sequence();MCIControl
Value
Boolean
Purpose
If True, the capture window controls a MCI-compatible video source during streaming capture. MCI-compatible video sources include VCRs and laserdiscs.
Example
videolib.MCIControl := False;MCIStartTime
Value
Long
Purpose
Starting position of the MCI device for the capture sequence. Time is in milliseconds. This field is ignored if MCIControl is set to False.
Example
videolib.MCIStartTime := 0;MCIStopTime
Value
Long
Purpose
Stopping position of the MCI device for the capture sequence. Time is in milliseconds. This field is ignored if MCIControl is set to False.
Example
videolib.MCIStopTime := 0;NumVideoRequested
Value
Long
Purpose
Specifies the maximum number of video buffers to allocate. The memory area used for the buffers is determined by the UsingDOSMemory flag. The actual number of buffers allocated might be lower if memory is unavailable. The default number of buffers allocated is 3 and the maximum is 1000.
Example
videolib.NumVideoRequested := 3;PercentDropForError
Value
Long
Purpose
Maximum percentage of dropped frames during a capture Sequence. The capture will be aborted if the number of dropped frames falls outside of this percentage. Values range from 0 to 100.
Example
{ Abort if more than 20 percent for the frames are dropped }
videolib.PercentDropForError := 20;StepMCIDevice
Value
Boolean
Purpose
If True, step capture using a MCI device as a video source is enabled. Otherwise, real-time capture using an MCI device is enabled. This field is ignored if MCIControl is set to False.
Example
videolib.StepMCIDevice := False;TimeLimit
Value
Long
Purpose
Maximum number of seconds to capture. Only used if TimeLimitEnabled is set to True.
Example
{ End capture after 10 seconds }
videolib.TimeLimitEnabled := True;
videolib.TimeLimit := 10;TimeLimitEnabled
Value
Boolean
Purpose
If set to True, capture Sequence will terminate after TimeLimit seconds.
Example
{ No time limit }
videolib.TimeLimitEnabled := False;RequestMicroSecPerFrame
Value
Long
Purpose
Requested frame capture rate, in microseconds. The default value is 66667, which corresponds to 15 frames per second. This value represents the number of microseconds between successive frames.
Example
{ Set the capture rate to 30 frames per second }
videolib.RequestMicroSecPerFrame := 1000000 / 30;StepCaptureAt2x
Value
Boolean
Purpose
If set to True, the capture hardware captures at twice the specified resolution. Enable this option if the hardware does not support hardware-based decimation and you are capturing in the RGB format.
Example
{ Capture the video at twice the display size }
videolib.StepCaptureAt2x := True;StepCaptureAverageFrames
Value
Long
Purpose
Number of times a frame is sampled when creating a frame based on the average sample. This averaging technique reduces the random digitization noise appearing in a frame.
Example
{ Use 5 samples for one frame }
videolib.StepCaptureAverageFrames := 5;UsingDOSMemory
Value
Boolean
Purpose
In Windows 3.1, a True value will attempt to allocate capture buffers in the memory area below one megabyte. This value is not used in 32-bit applications, but is included here for compatibility.
Example
videolib.UsingDOSMemory := False;Yield
Value
Boolean
Purpose
If this value is set to True, the capture process is performed in a separate thread. Applications which use this feature must support re-entry issues.
Example
{ Block the user during a sequence call }
videolib.Yield := True;
AudioBufferSize
Value
Long
Purpose
Size of audio buffers. If zero is used, the size of each buffer will be the maximum of 0.5 seconds of audio (10K bytes).
Example
{ Set to the maximum }
videolib.AudioBufferSize := 0;AVStreamMaster
Value
Long
Purpose
If set to 0, the audio stream controls the clock when writing an AVI file. This gives higher priority to writing audio over video. If set to 1, the duration of audio and video streams can differ.
Example
{ Give priority to the audio stream }
videolib.AVStreamMaster := 0;BitsPerSample
Value
Short
Purpose
The number of bits per sample. Should be 8 or 16.
Example
{ 8 bits per sample }
videolib.BitsPerSample := 8;CaptureAudio
Value
Boolean
Purpose
If set to True, audio is captured during the capture Sequence.
Example
{ Disable audio for a smaller AVI file }
videolib.CaptureAudio := False;Channels
Value
Short
Purpose
Number of audio channels. (1-Mono, 2-Stereo).
Example
{ Set to mono to save on disk space }
VideoAudioParms.Channels := 1;FormatTag
Value
Short
Purpose
Waveform-audio format type. Default format type is WAVE_FORMAT_PCM (1).
Example
videolib.FormatTag := 1;NumAudioRequested
Value
Long
Purpose
Maximum number of audio buffers to use. The size of each buffer is the maximum of 0.5 seconds of audio or 10K bytes. Maximum value is 10.
Example
videolib.NumAudioRequested := 10;SamplesPerSec
Value
Long
Purpose
Sample rate, in samples per second (hertz), that each channel should be played or recorded. Common values are 8.0 kHz, 11.025 kHz, 22.05 kHz, and 44.1 kHz.
Example
{ Set sample rate to 11.025 kHz }
videolib.SamplesPerSec := 11025;
BackColor
Value
Long
Purpose
Sets the background color for the videolib OCX™. This is a RGB value.
Example
{ Set the back ground to black }
videolib.BackColor := 0;
![]()
SkyLine Tools Imaging
A division of Creative Development, Ltd.
For sales and additional info, send E-Mail to sales@imagelib.com
or contact SkyLine via Phone (818) 585-5867
© 1994 - 2002 SkyLine Tools Imaging. All rights reserved.