LIBRARY.TXT Driver File Contents (wwlib.zip)








WaveWatcher

Windows Developers' Toolkit

Reference Guide

Version 1.00


































Microsoft, MS, MS-DOS, Microsoft logo are registered trademarks, and Windows is a trademark 
of Microsoft Corporation

Other names are tradenames/trademarks of their respective owners



In Your Package

Your WaveWatcher Windows Developers' Toolkit package contains a diskette and this Guide.

The diskette contains the library, the Dynamic Link Libraries, the include file and sample routine 
that you will need in your Windows development.

This Guide contains informations that you can use to write application for WaveWatcher that runs 
under Microsoft Windows 3.x. It describes the different functions in the Dynamic Link Libraries 
of WaveWatcher for creating applications that includes video.



What You Should Know About the Toolkit

This Guide assumes that you are familiar with writing application for Microsoft Windows version 
3.x, using C programming language. See one of the following for more information on 
programming for Windows :
	i.	Guide to Programming (provided with the Microsoft Windows Software 
Development Kit)
	ii.	Petzold, Charles. Programming Windows, Third Edition. Redmond: Microsoft 
Press, 1992.
	iii.	Norton, Peter and Paul L. Yao. Peter Norton's Windows 3.0 Power Programming 
technique. New York: Bantam Books, 1990.


Application developer who develop Windows with video using the WaveWatcher requires a 
software platform consists of :
	i.	MS-DOS 3.1 or later
	ii.	Microsoft Windows 3.x
	iii.	Microsoft Windows Software Development Kit Ver 3.x
	iv.	Microsoft C Compiler ver 5.1 or later
	v.	Microsoft Macro Assembler ver 5.1 or later




Windows 3.x Dynamic Link Libraries

A Window dynamic link library (DLL) is collection of routines that can be called by Windows 
applications or by routines in other dynamic link libraries.  There are several advantages to having 
routines packaged in a dynamic link library.  Routines residing in dynamic link libraries can be 
replaced by replacing the dynamic link library.  Also, executable programs takes less disk space 
since code is not linked into a single executable image.  Routines in a dynamic link library share 
the same data segment and can communicate with each other to act as a unified interface to some 
physical resource.


Compiler

As the WaveWatcher Dynamic Link Libraries ( WWDLL.DLL ) are compiled using the 
Microsoft C Compiler version 7.0, it is highly recommended that the developer utilize the same 
compiler.


Calling functions in WaveWatcher DLL from the Windows Application

Functions in the WaveWatcher dynamic link library ( WWDLL.DLL ) are called just like any 
routine residing in another module. To build new application, all that required is to reference the 
file WWATCHER.H in an include statement within your program.

This header is used to inform the compiler that those DLL function entry points are external.
   #include "windows.h
   #include "wwatcher.h"		/* Procedure declarations */

   int xpos=0,ypos=0;		/* Top left corner of window */
   int width=100, height=100;	/* Window width and height */
   PCV_EnableVideo()		/* Enable display of video */
   PCV_CreateWindow (xpos,ypos,width,height,TRUE)

Note :	The WWATCHER.H include file must be refered after the Windows' WINDOWS.H 
include file as the WWATCHER.H make use of some declearation in 
WINDOWS.H

		In order for the WaveWatcher card to function correctly, the WWDLL.DLL must 
be located either in the same directory as the application program or in the 
Windows' SYSTEM directory.



Linking with WWDLL.DLL

Applications have three methods of accessing the functions in the WWDLL.DLL.

	a. Link during compilation/link stage

		Using this method, the makefile should include WWDLL.LIB in their link 
statement.

		link /NOD module1+module2,,,slibcew libw wwdll.lib,module.def

		Refer to Microsoft C Compiler manual and Microsoft Windows Software 
Development kit manual for more information regarding the syntax of the Link.

		Note : The "Link" should be the Microsoft Segmented-Executable Linker Version 
5.01.21 or higher version.

	b. Define the functions of WWDLL.DLL in the application definition file

		Application calling functions in a DLL can include the IMPORT statement in the 
program definition file to import functions from the DLL into application program. 
Refer to Microsoft SDK reference manual for more information on the IMPORT 
statement in the program definition file.

	c. Link the functions in WWDLL.DLL on run-time

		Windows SDK provides a function called "LoadLibrary" for the application to 
dynamic link the function in a DLL on run-time. Refer to Microsoft SDK 
reference manual for more information on the usage of the "LoadLibrary" 
function.


Running Application With WWDLL.DLL

Applications program calling functions in WWDLL.DLL should have the WWDLL.DLL 
located in either the same directory of as the application program or in Windows' SYSTEM 
directory. Application program calling the PCV_SaveImageRect and PCV_LoadImageRect with 
JPEG option should contact CEI for more information and additional DLL that supports the JPEG.




Functions in the WWDLL.DLL

The function with "R4" indicates that the function is only supported under WaveWatcher Rev 4.0 
and above hardware.


The function in alphabetical order are :

PCV_ClearVideoRect
PCV_ClearVSyncIntr		(R4)
PCV_CreateWindow
PCV_DisableFieldReplication
PCV_DisableVideo
PCV_DisableVSyncIntr		(R4)
PCV_EnableFieldReplication
PCV_EnableVideo
PCV_EnableVSyncIntr		(R4)
PCV_Exit
PCV_FldFreezeVideo
PCV_FrameFreezeVideo
PCV_GetAudio			(R4)
PCV_GetAudioSource		(R4)
PCV_GetColor
PCV_GetHiColorMode		(R4)
PCV_GetInputFormat
PCV_GetIntrNo			(R4)
PCV_GetMVHWVersion		(R4)
PCV_GetOutputMode
PCV_GetPortAddr
PCV_GetSkewFactor
PCV_GetSyncPol
PCV_GetVideoAddr
PCV_GetVideoSource		(R4)
PCV_GetVolume
PCV_GetZoomFactor
PCV_Initialize
PCV_LoadClipboardFormat
PCV_LoadConfiguration
PCV_LoadImageRect
PCV_MuteAudio			(R4)
PCV_MuteVolume
PCV_PanWindow
PCV_ReadRGBRect
PCV_ResetAudio			(R4)
PCV_ResetColors
PCV_ResetSkewFactors
PCV_ResetSyncPol
PCV_ResetVolume
PCV_SaveClipboardFormat
PCV_SaveConfiguration
PCV_SaveImageRect
PCV_SetAudio			(R4)
PCV_SetAudioSource		(R4)
PCV_SetColor
PCV_SetColorKey
PCV_SetIntrNo			(R4)
PCV_SetInputFormat
PCV_SetLumaChromaMasks
PCV_SetOutputMode
PCV_SetPortAddr
PCV_SetSkewFactor
PCV_SetSyncPol
PCV_SetVideoAddr
PCV_SetVideoSource		(R4)
PCV_SetVolume
PCV_SetWindowPosition
PCV_SetWindowSize
PCV_SetZoomFactor
PCV_UnFreezeVideo


The function in functional group order are :


Configuration
PCV_ClearVSyncIntr		(R4)
PCV_DisableVSyncIntr		(R4)
PCV_EnableVSyncIntr		(R4)
PCV_Exit
PCV_GetAudioSource		(R4)
PCV_GetHiColorMode		(R4)
PCV_GetIntrNo			(R4)
PCV_GetInputFormat
PCV_GetMVHWVersion		(R4)
PCV_GetOutputMode
PCV_GetPortAddr
PCV_GetSyncPol
PCV_GetVideoAddr
PCV_GetVideoSource		(R4)
PCV_Initialize
PCV_LoadConfiguration
PCV_ResetSyncPol
PCV_SaveConfiguration
PCV_SetAudioSource		(R4)
PCV_SetColorKey
PCV_SetInputFormat
PCV_SetIntrNo			(R4)
PCV_SetOutputMode
PCV_SetPortAddr
PCV_SetSyncPol
PCV_SetVideoAddr
PCV_SetVideoSource		(R4)


Display
PCV_DisableFieldReplication
PCV_EnableFieldReplication
PCV_GetColor
PCV_GetSkewFactor
PCV_ResetColors
PCV_ResetSkewFactors
PCV_SetColor
PCV_SetLumaChromaMasks
PCV_SetSkewFactor


Freeze
PCV_FldFreezeVideo
PCV_FrameFreezeVideo
PCV_UnFreezeVideo


Image
PCV_LoadClipboardFormat
PCV_LoadImageRect
PCV_ReadRGBRect
PCV_SaveClipboardFormat
PCV_SaveImageRect




Volume
PCV_GetAudio			(R4)
PCV_GetVolume
PCV_MuteAudio			(R4)
PCV_MuteVolume
PCV_ResetAudio			(R4)
PCV_ResetVolume
PCV_SetAudio			(R4)
PCV_SetVolume


Window
PCV_ClearVideoRect
PCV_CreateWindow
PCV_DisableVideo
PCV_EnableVideo
PCV_PanWindow
PCV_SetWindowPosition
PCV_SetWindowSize


Zoom
PCV_GetZoomFactor
PCV_SetZoomFactor














Description of functions in 

WaveWatcher

Dynamic Link Library 





PCV_ClearVideoRect


Description

	This function clears a specific area of the video frame buffer.


Syntax

	int PCV_ClearVideoRect(xLeft,yTop,width,height)


	Parameter		Type		Description

	xLeft			WORD	Pixel coordinate of left side of block

	yTop			WORD	Pixel coordinate of top side of block

	width			WORD	Width of block in pixel

	height			WORD	Height of block in pixel


Return value

	1	Success
	0	Error


Comments

	The yTop and xLeft values are the coordinates relative to the current video window.



PCV_ClearVSyncIntr (R4)


Description

	This function resets the Vertical Sync interrupt (from the video source) from the 
WaveWatcher hardware.


Syntax

	void PCV_ClearVSyncIntr()

	There is no parameter for this function.


Return Value

	None


Comments

	The Vertical Sync interrupt must be enable by PCV_EnableVSyncIntr() before the 
hardware can interrupt the PC system.

	In order for the interrupt system to function correctly, the hardware interrupt jumper 
setting on the WaveWatcher board must match the software configuration setting. Use the 
PCV_SetIntrNo() and PCV_GetIntrNo() functions to set and get the software 
configuration interrupt setting.



PCV_CreateWindow


Description

	This function creates a video display window on the VGA at the specified position.


Syntax

	void PCV_CreateWindow(xLeft,yTop,xExtent,yExtent, fFitToWindow)


	Parameter		Type		Description
	
	xLeft			WORD	Position in pixel of the left side of the video window 
on the VGA display

	yTop			WORD	Position in pixel of the top side of the video window 
on the VGA display

	xExtent		WORD	Width of window in pixel

	yExtent		WORD	Height of window in pixel

	fFitToWindow	BOOL	Flag indicating whether to fitvideo to the window. 1 = fit to 
window 0 = keep video full size

Return Value

	None


Comments
	
	a.	The yTop and xLeft value are the absolute coordinate on the physical VGA 
screen.

	b.	In the Fit-to-window mode, one of the field will be disabled when the display 
window size is less than half of the actual video size. This is to take care of the 
flicking of the screen due to interlace input.



PCV_DisableFieldReplication


Description

	This function stops the replication of the odd field to the even field of the video buffer. 
This mode setting cannot be saved in the configuration file.


Syntax

	void PCV_DisableFieldReplication()

	There is no parameter for this function.


Return Value

	None


Comments

	a.	This is the default mode for the WaveWatcher card during power up.

	b.	This replicate field feature cannot work with the fitvideo to windows option as 
specified in PCV_SetWindowSize and PCV_CreateWindow.



PCV_DisableVideo


Description

	This function disables display of video from the video frame buffer.


Syntax

	void PCV_DisableVideo()

	There is no parameter for this function.


Return Value

	None


Comments

	This is the default mode for the WaveWatcher card during power up.



PCV_DisableVSyncIntr (R4)


Description

	This function disables the Vertical Sync interrupt (from the video source) from the 
WaveWatcher hardware.


Syntax

	void PCV_DisableVSyncIntr()

	There is no parameter for this function.


Return Value

	None


Comments

	By default, the Vertical Sync interrupt is disabled during power-up.

	If the Vertical Sync interrupt is set, this function will not clear the interrupt before it is 
being disable, the PCV_ClearVSyncIntr() is needed to clear the interrupt before it is 
being disable.

	The Vertical Sync interrupt can be enabled by PCV_EnableVSyncIntr() before the 
hardware can interrupt the PC system.



PCV_EnableFieldReplication


Description

	This function replicates the odd field to the even field of the video buffer. This mode 
setting cannot be saved in the configuration file.


Syntax

	void PCV_EnableFieldReplication()

	There is no parameter for this function.


Return Value	

	None

Comments

	This replicate field feature cannot work with the fitvideo to windows option as specified 
in PCV_SetWindowSize and PCV_CreateWindow.



PCV_EnableVideo


Description

	This function enables display of video captured in the video frame buffer.  Video will be 
display at every pixel on the VGA display matching the color specified in the 
PCV_SetColorKey function, and inside the video display window specified with the 
PCV_SetWindowSize and PCV_SetWindowPosition functions.


Syntax

	void PCV_EnableVideo()

	There is no parameter for this function.


Return Value

	None


Comments

	The video display window and color key must be setup before video is being displayed.




PCV_EnableVSyncIntr (R4)


Description

	This function enables the Vertical Sync interrupt (from the video source) from the 
WaveWatcher hardware.


Syntax

	void PCV_EnableVSyncIntr(mode)

	Parameter		Type		Description

	mode			int		Define the type of interrupt according to the 
following index:

						Index		Description
						  1		Even (frame) field interrupt
						  2		Odd field interrupt
						  3		Even and Odd field interrupt


Return Value

	None


Comments

	In order for the interrupt system to function correctly, the hardware interrupt jumper 
setting on the WaveWatcher board must match the software configuration setting. Use the 
PCV_SetIntrNo() and PCV_GetIntrNo() functions to set and get the software 
configuration interrupt setting.

	Use the PCV_ClearVSyncIntr() to clear the interrupt and PCV_DisableVSyncIntr() to 
disable the interrupt.



PCV_Exit (R4)


Description

	This function is the last routine to call before terminating the program. It close all files in 
the DLL and release all memory.


Syntax

	void PCV_Exit()

	There is no parameter for this function.


Return Value

	None




PCV_FldFreezeVideo


Description

	This function disables field video capture. The last field captured in the video frame buffer 
is displayed in the VGA window until video is unfrozen using the same function or the 
PCV_UnFreezeVideo function. This mode setting cannot be saved in the configuration 
file.


Syntax

	void PCV_FldFreezeVideo(mode)

	Parameter		Type		Description

	mode			char		Define what field and action to take according to the 
following index:

						Index		Description
						 0x02		Freeze Even field
						 0x03		Unfreeze Even field
						 0x04		Freeze Odd field
						 0x05		Unfreeze Odd field


Return Value

	None

Comments

	a.	This function does not affect video data in the video frame buffer which is 
displayed.  It only disables updates to this buffer.

	b.	PCV_FldFreezeVideo only works in keep image to full size mode or when image 
height is larger than 240 pixel in fit to window mode. Refer to 
PCV_CreateWindow for more information on the modes.



PCV_FrameFreezeVideo


Description

	This function disables video capture to the video frame buffer.  The last frame captured is 
displayed in the VGA window until video is unfrozen using the PCV_UnFreezeVideo 
function.  This mode setting cannot be saved in the configuration file.


Syntax

	void PCV_FrameFreezeoVideo()

	There is no parameter for this function.


Return Value

	None


Comments

	This function does not affect video data in the video frame buffer which is displayed. It 
only disables updates to this buffer.




PCV_GetAudio (R4)


Description

	This function returns the settings of the specific audio register.  


Syntax

	BYTE PCV_GetAudio(iAudioIndex)

	Parameter		Type		Description
	iAudioIndex		WORD	Audio index between 0 and 3.
						Index values are as follows :

						Index		Description
						  0		Volume
						  1		Balance
						  2		Bass
						  3		Treble


Return Value

	Value of the specific audio are :

	Index		Description		Return value
	  0		Volume		0 - 21
	  1		Balance		0 - 30, balance at 15
	  2		Bass			0 - 10
	  3		Treble		0 - 10




PCV_GetAudioSource (R4)


Description

	This function returns the active audio channel.


Syntax

	int PCV_GetAudioSource()

	There is no parameter for this function.


Return Value

	0	Audio channel 1
	1	Audio channel 2
	2	Audio channel 3




PCV_GetColor


Description

	This function returns the settings of the specified color register.  


Syntax

	BYTE PCV_GetColor(iColorIndex)

	Parameter		Type		Description
	iColorIndex		WORD	Color index between 0 and 6.
						Index values are as follows :

						Index		Description
						  0		Brightness
						  1		Saturation
						  2		Contrast
						  3		Hue
						  4		Red
						  5		Green
						  6		Blue

Return Value

	Value of the specified color (0-255)




PCV_GetHiColorMode (R4)


Description

	Get the Hi-Color mode.


Syntax

	BYTE PCV_GetHiColorMode()

	There is no parameter for this function.


Return Value

	0x00	Normal VGA
	0x01	Hi-Color Mode 1
	0x02	Hi-Color Mode 2




PCV_GetInputFormat


Description

	Get the input video format standard.


Syntax

	int PCV_GetInputFormat()

	There is no parameter for this function.


Return Value

	1	NTSC format
	0	PAL format


Comments

	The maximum video size for NTSC video format is :
			Vertical height	= 474
			Horizontal Width	= 688

	The maximum video size for PAL video format is :
			Vertical height	= 512
			Horizontal Width	= 688




PCV_GetIntrNo (R4)


Description

	Get the Vertical Sync interrupt setting from the software configuration.


Syntax

	WORD PCV_GetIntrNo()

	There is no parameter for this function.


Return Value

	The software Vertical Sync interrupt setting.


Comments

	Use the PCV_SetIntrNo() to set the software Vertical Sync interrupt setting.

	Use the PCV_EnableVSyncIntr(), PCV_ClearVSyncIntr() and PCV_DisableVSyncIntr() 
to enable, clear and disable the interrupt respectively.



PCV_GetMVHWVersion (R4)


Description

	This function returns the hardware version of WaveWatcher card.


Syntax

	int PCV_GetMVHWVersion()

	There is no parameter for this function.


Return Value

	0	WaveWatcher Revision 2 or below
	1	WaveWatcher Revision 4 




PCV_GetOutputMode


Description

	This function gets the output display (interlace) mode of the video display screen. 


Syntax

	WORD PCV_GetOutputMode()

	There is no parameter for this function.


Return Value

	0	Non interlace mode
	1	Interlace mode




PCV_GetPortAddr

Description

	This function gets the input/output port address of the WaveWatcher card.


Syntax

	int PCV_GetPortAddr()

	There is no parameter for this function.


Return value

	Port Address




PCV_GetSkewFactor


Description

	This function returns the settings of the specified skew register.


Syntax

	WORD PCV_GetSkewFactor(iIndex)

	Parameter	Type		Description

	iIndex		int		Skew index between 0 and 5.
					Index values are as follows :

					Index	Description		Range

					  0	Display Window X	0-2047
					  1	Display Window Y	0-1023
					  2	Display Address X	0-1023
					  3	Display Address Y	0-511
					  4	Shift Clock Start	0-127
					  5	Palette Skew		0-3
						  

Return Value

	Value of the specified skew index



PCV_GetSyncPol


Description

	This function gets the output video vertical and horizontal synchronisation polarities of the 
WaveWatcher card.


Syntax

	BYTE PCV_GetSyncPol()

	There is no parameter for this function.


Return value

				(bit 0)	(bit 1)	(bit 2-7)
		Polarity	Horizontal	Vertical
		    -		    0		   0		reserved
		    +		    1		   1




PCV_GetVideoAddr


Description

	This function gets the video buffer address of the WaveWatcher card.


Syntax

	int PCV_GetVideoAddr()

	There is no parameter for this function.


Return value

	Video buffer address




PCV_GetVideoSource (R4)


Description

	This function returns the active video channel.


Syntax

	int PCV_GetVideoSource()

	There is no parameter for this function.


Return Value

	0	Video channel 1
	1	Video channel 2
	2	Video channel 3




PCV_GetVolume


Description

	This function gets the current audio volume level.


Syntax

	WORD PCV_GetVolume()

	There is no parameter for this function.


Return Value

	Audio volume level




PCV_GetZoomFactor


Description

	This function gets both the horizontal and vertical zoom factors of the video screen.


Syntax

	POINT PCV_GetZoomFactor()

	There is no parameter for this function.


Return Value

	Zoom factor in a structure POINT. First parameter of the structure is the X zoom factor, 
second parameter is the Y zoom factor.




PCV_Initialize


Description

	This function is the first function to call before accessing the DLL. It initialize all 
temporary files and setup all memory in the DLL.


Syntax

	int PCV_Initialize()

	There is no parameter for this function.


Return Value

	0	Error
	1	Successful


Comments

	The application should not access any function in DLL if this function fail.



PCV_LoadClipboardFormat


Description

	This function reads the specified format of image from clipboard and copy the image data 
to the video frame buffer. This function does not freeze the display screen before loading 
the image.


Syntax

	int PCV_LoadClipboardFormat(hWind,xLeft,yTop)

	Parameter	Type		Description

	hWind	HWND	Window handle of the calling program

	xLeft		WORD	Pixel coordinate of left side of image to be placed

	yTop		WORD	Pixel coordinate of top side of image to be placed


Return Value

	 1		Image loaded
	 0		Error writing image
	-1		Clipboard data not available
	-2		Unknown clipboard format
	-3		Clipboard data error
	-4		Memory could not be allocated
	-5		Memory could not be locked
	-6		Unsupported file format


Comments

	a.	The application must freeze the video screen using PCV_FrameFreezeVideo() 
before loading an image.

	b.	The yTop and xLeft value are the coordinates relative to the current video 
window.



	c.	The following image file formats are supported by this function :

			i.	Windows DIB 24 bpp true color
			ii.	Windows DIB 8 bpp palettized
			iii.	Windows DIB 8 bpp grey-scale
			iv.	BITMAP 24 bpp true color
			v.	BITMAP 8 bpp palettized
			vi.	BITMAP 8 bpp grey-scale



PCV_LoadConfiguration


Description

	Loads the register settings of the WaveWatcher card. The configuration file 
(MVWIN.CFG) is located in the Windows' System subdirectory. If the file does not exist, 
nothing is done.


Syntax

	int PCV_SaveConfiguration()

	There is no parameter for this function.


Return Value

	1	Success
	0	File does not exist.
	-1	File does not have sufficient data.
	-2	File is not a WaveWatcher configuration file.


Comments

	The function only reads in the audio level, and output format (i.e., the interlace mode), it 
does not physically set the respective WaveWatcher register. It is the responsibility of the 
calling routine to physically set these mode through the respective Get and Set function. 




PCV_LoadImageRect


Description

	This function reads the specified format of image from a file and copy the image data to 
the video frame buffer. This function does not freeze the display screen before loading 
the image.


Syntax

	int PCV_LoadImageRect(lpFileName,xLeft,yTop,width,height)

	Parameter	Type		Description

	lpFileName	LPSTR	Long pointer to a file name string

	xLeft		WORD	Pixel coordinate of left side of image to be placed

	yTop		WORD	Pixel coordinate of top side of image to be placed

	width		short		Not used, maintain for compatibility

	height		short		Not used, maintain for compatibility


Return Value

	 1	Image loaded
	 0	Protected Mode Services not available
	-1	File open error
	-2	Memory allocation error
	-3	File does not have sufficient data.
	-4	File is not in MMP format.
	-6	File is not uncompressed RGB TARGA 24/16 format.
	-9	Incompatible TIFF file format.
	-10	Unsupported TIFF file option.
	-11	Parameter in TIFF file too large.
	-12	File is not 8 bits pcx format.
	-13	JPEG DLL error
	-14	JPEG file error
	-99	llseek error in file.
	-100	No such format.


Comments

	a.	The application must freeze the video screen using PCV_FrameFreezeVideo() 
before loading a image.

	b.	The yTop and xLeft values are the coordinates relative to the current video 
window.

	c.	The following image file format are supported by this function :

			i.	Windows DIB 24 bpp true color
			ii.	Windows DIB 8 bpp palettized
			iii.	Windows DIB 8 bpp grey-scale
			iv.	Targa 24 bpp true color uncompressed
			v.	Targa 16 bpp true color uncompressed
			vi.	IBM MMotion format YUV
			vii.	TIFF 24 bits RGB uncompressed
			viii.	PCX 8 bits color
			ix.	+JPEG YUV 4:1:1
			x.	Targa 32 bpp true color uncompressed

	



PCV_MuteAudio (R4)


Description

	This function turns on/off the audio. This mode setting cannot be saved in the 
configuration file.


Syntax

	void PCV_MuteVolume(mode)

	Parameter		Type		Description
	mode			short		On or Off index.
						Index values are as follows :

						Index		Description
						  1		On audio
						  0		Off audio


Return Value

	None


Comments

	Mute Off mode is the default mode for the WaveWatcher card during power up.




PCV_MuteVolume


Description

	This function turns on/off the audio. This mode setting cannot be saved in the 
configuration file.


Syntax

	void PCV_MuteVolume(mode)

	Parameter		Type		Description
	mode			short		On or Off index.
						Index values are as follows :

						Index		Description
						  1		On audio
						  0		Off audio


Return Value

	None


Comments

	Mute Off mode is the default mode for the WaveWatcher card during power up.




PCV_PanWindow


Description

	This function sets the position of the top left corner of the portion of the video capture 
buffer displayed in the window on the VGA.


Syntax

	void PCV_PanWindow(xLeft,yTop)

	Parameter	Type		Description

	xLeft		WORD	Position in the video frame buffer of the left side of the 
region to be displayed (in pixel)

	yTop		WORD	Position in the video frame buffer of the top side of the 
region to be displayed (in pixel)


Return Value

	None


Comments

	This function has no effect unless video is full size. The setting for fit-in-window is 
controlled by PCV_CreateWindow and PCV_SetWindowSize.  This has no effect on the 
size or position of the display window on the VGA.  It only changes the portion of the 
video frame buffer displayed in that window.




PCV_ReadRGBRect

Description

	This function reads a scan line of pixel from the video frame buffer, converts to respective 
form, and writes this to the specific buffer. This function does not freeze the video frame 
buffer before reading the data.

Syntax

	int PCV_ReadRGBRect(lpMem,xLeft,yTop,width,height,type,lpWorkSpace)

	Parameter	Type		Description

	lpMem	LPSTR	Long pointer to a char buffer that hold the return data

	xLeft		WORD	X pixel coordinate of left side of the scan line

	yTop		WORD	Y pixel coordinate of left side of the scan line

	width		WORD	Width of the scan line in pixel

	height		WORD	Always set to 1

	type		WORD	The index of the file format to save. The index are:

					Parameter	Type/Description
					    0		24 bpp RGB
					    2		8 bpp grey-scale
					    5		16 bpp RGB in 565 RGB
					   11		32 bpp RGB 


	lpWorkSpace	LPSTR	Always set to NULL


Return Value

	 1	Data copied
	 0	Error




Comments

	a.	The application must freeze the video screen using PCV_FrameFreezeVideo() 
before saving an image.

	b.	The yTop and xLeft value are the coordinates relative to the current video 
window.




PCV_ResetAudio (R4)

Description

	This function resets all 4 audio registers to default values.

	The default values for the audio settings are :

			Volume	= 6 
			Balance	= 15
			Bass		= 5
			Treble	= 5

Syntax

	void PCV_ResetAudio()

	There is no parameter for this function.

	
Return Value

	None




PCV_ResetColors


Description

	This function resets all 7 color registers to default values.

	The default values for the color registers are :

			Brightness	= 252 
			Saturation	= 40
			Contrast	= 168
			Hue		= 110
			Red		= 124
			Green	= 132
			Blue		= 140


Syntax

	void PCV_ResetColors()

	There is no parameter for this function.


Return Value

	None




PCV_ResetSkewFactors


Description

	This function resets all 6 skew registers to default values.

	The defaults values for the skew registers are:

		Display Window X	= 42
		Display Window Y	= 32
		Display Address X	= 517
		Display Address Y	= 32
		Shift Clock Start	= 0
		Palette Slew		= 2

Syntax

	void PCV_ResetSkewFactors()

	There is no parameter for this function.


Return Value

	None




PCV_ResetSyncPol


Description

	This function resets the output video vertical and horizontal synchronisation polarities of 
the WaveWatcher card to the default value.

	The default values of the synchronisation signals are :
		Horizontal Sync	:	negative
		vertical Sync		:	negative


Syntax

	void PCV_ResetSyncPol()

	There is no parameter for this function.


Return value

	None




PCV_ResetVolume


Description

	This function resets the audio volume to default level.


Syntax

	WORD PCV_ResetVolume()

	There is no parameter for this function.


Return Value

	Audio level




PCV_SaveConfiguration


Description

	This function saves the register settings of the WaveWatcher card in a configuration file. 
The DLL will first check the Windows System sub-directory for the configuration file 
(MVWIN.CFG). If it does not exist, it will create one.


Syntax

	int PCV_SaveConfiguration()

	There is no parameter for this function.


Return value

	1	Success
	0	File create error, disk may be full.
	-1	File write error, disk may be full.




PCV_SaveClipboardFormat

Description

	This function reads a rectangular block of pixel from the video frame buffer, converts to 
respective format, and writes this to the Windows clipboard. This function does not freeze 
the video buffer before saving the image.

Syntax

	int PCV_SaveClipboardFormat(hWind,xLeft,yTop,width,height, Filetype,Option)

	Parameter	Type		Description

	hWind	HWND	Window handle of the calling program

	xLeft		WORD	Pixel coordinate of left side of block

	yTop		WORD	Pixel coordinate of top side of block

	width		WORD	Width of block in pixel

	height		WORD	Height of block in pixel
	
	Filetype	WORD	The index of the file format to save.
					The index are :

					Parameter	Type/Description
					  0x0000	Windows Bitmap 24 bpp color
					  0x0001	Windows Bitmap 8 bpp palettized
					  0x0002	Windows Bitmap 8 bpp grey-scale
					  0x1000	Windows DIB 24 bpp color
					  0x1001	Windows DIB 8 bpp palettized 
					  0x1002	Windows DIB 8 bpp grey scale

	Option	WORD	Always set to 0.




Return Value

	 1	Image saved
	 0	Error reading video buffer
	-1	File creation error
	-2	Memory allocation error
	-3	File write error
	-4	Palette creation error
	-5	Unsupport clipboard format


Comments

	a.	The application must freeze the video screen using PCV_FrameFreezeVideo() 
before saving a image.

	b.	The yTop and xLeft value are the coordinates relative to the current video 
window.




PCV_SaveImageRect

Description

	This function reads a rectangular block of pixel from the video frame buffer, converts to 
respective format, and writes this to the specified file. This function does not freeze the 
video buffer before saving the image.

Syntax

	int PCV_SaveImageRect(lpFileName,xLeft,yTop,width,height,Filetype,Option)

	Parameter	Type		Description

	lpFileName	LPSTR	Long pointer to a file name string

	xLeft		WORD	Pixel coordinate of left side of block

	yTop		WORD	Pixel coordinate of top side of block

	width		WORD	Width of block in pixel

	height		WORD	Height of block in pixel

	Option	WORD	Always set to 0.

	Filetype	WORD	The index of the file format to save. The index are:

					Parameter	Type/Description
					   0		Windows DIB 24 bpp color
					   1		Windows DIB 8 bpp palettized
					   2		Windows DIB 8 bpp grey-scale
					   3		Windows DIB 4 bpp dithered
					   4*		Targa 24 bpp true color
					   5*		Targa 16 bpp true color 
					   6		IBM MMotion format YUV
					   7*		TIFF 24 bits RGB 
					   8		PCX 8 bits color
					   9+		JPEG YUV 4:1:1
					  10*		Targa 32 bpp true color
					  11		Windows DIB 16 bpp color
					  12		Windows DIB 32 bpp color




			* Note : These are uncompressed format.
			
Return Value

	 1	Image saved
	 0	Protected Mode Services not available
	-1	File creation error
	-2	Memory allocation error
	-3	File write error
	-4	JPEG DLL error
	-5	JPEG error


Comments

	a.	The application must freeze the video screen using PCV_FrameFreezeVideo() 
before saving a image.

	b.	The yTop and xLeft values are the coordinates relative to the current video 
window.




PCV_SetAudio (R4)


Description

	This function sets the value of the specific audio register.


Syntax

	WORD PCV_SetAudio(iAudioIndex,iAudioValue)

	Parameter		Type		Description
	iAudioIndex		WORD	Audio index between 0 and 3.
						Index values are as follows :

						Index	Description	Range
						  0	Volume	0 - 21
						  1	Balance	0 - 14(left)
									15 (balance)
									16 - 30 (right)
						  2	Bass		0 - 10
						  3	Treble	0 - 10

	iAudioValue		BYTE	Audio register level


Return Value

	1	true  (Sucessful)
	0	false (Unsucessful)


Comments

	PCV_SaveConfiguration is needed to save the new settings into the configuration file. 
These audio settings will be initialized by the DLL start-up routine when the DLL is first 
loaded.




PCV_SetAudioSource (R4)


Description

	This function sets the active audio channel.


Syntax

	void PCV_SetAudioSource(iSource)

	Parameter		Type		Description
	iSource		int		Audio channel selected.

						Index		Description
						  0		Channel 1
						  1		Channel 2
						  2		Channel 3


Return Value

	None


Comments

	This function only sets the active audio channel. It is the responsibility of the application 
program to set the active video channel correctly.




PCV_SetColor


Description

	This function sets the value of the specified color register.


Syntax

	int PCV_SetColor(iColorIndex,iColorValue)

	Parameter		Type		Description
	iColorIndex		WORD	Color index between 0 and 6.
						Index values are as follows :

						Index		Description
						  0		Brightness
						  1		Saturation
						  2		Contrast
						  3		Hue
						  4		Red
						  5		Green
						  6		Blue

	iColorValue		BYTE	Color value between 0 and 255.

Return Value

	1	true (Successful)
	0	false (Unsuccessful)


Comments

	PCV_SaveConfiguration is needed to save the new settings into the configuration file. 
These color settings will be initialized by the DLL start-up routine when the DLL is first 
loaded.




PCV_SetColorKey


Description

	This function sets the color index used as a color key for video display.  Any pixel within 
the display window set to this color in the VGA frame buffer will display video from the 
video frame buffer. The setting cannot be saved in the configuration file.


Syntax

	void PCV_SetColorKey (wColorIndex)

	Parameter		Type		Description
	wColorIndex		Word		Specifies the color index to be used as a key for 
selecting between the video frame buffer and the 
VGA display. This color index is the index to the 
physical VGA color palette.


Return Value

	None




PCV_SetInputFormat


Description

	Set the input video format standard.


Syntax

	void PCV_SetInputFormat(mode)

	Parameter	Type		Description

	mode		WORD	mode of the input format standard.
					The modes are :

					Mode		Description
					  0		PAL format
					  1		NTSC format


Return Value

	None


Comments

	a.	The maximum video size for NTSC video format is :
				Vertical height	= 474
				Horizontal width	= 688

		The maximum video size for PAL video format is :
				Vertical height	= 512
				Horizontal width	= 688

	b.	PCV_SaveConfiguration is needed to save the new setting into the configuration 
file. This mode will be initialized by the DLL start-up routine when the DLL is 
first loaded.



PCV_SetIntrNo (R4)


Description

	Set the Vertical Sync interrupt setting of the software configuration.


Syntax

	void PCV_SetIntrNo(intrno)

	Parameter		Type		Description

	intrno			WORD	Vertical Sync interrupt setting. This setting must be 
the same as the hardware interrupt setting


Return Value

	None


Comments

	Use the PCV_GetIntrNo() to get the software Vertical Sync interrupt setting.

	Use the PCV_EnableVSyncIntr(), PCV_ClearVSyncIntr() and PCV_DisableVSyncIntr() 
to enable, clear and disable the interrupt respectively.



PCV_SetLumaChromaMasks


Description

	This function sets masks used to write-protect bits of the luma and chroma memory in the 
video frame buffer when acquiring video. These Luma and Chroma bits setting cannot be 
saved in the configuration file.

Syntax

	void PCV_SetLumaChromaMasks(lc_masks)

	Parameter		Type		Description

	lc_masks		WORD	A 16 bit mask. The lower order byte is the Luma 
byte and the higher order byte is the Chroma byte. 
0's specify the bits to be write-protected. 


Return Value

	None




PCV_SetOutputMode


Description

	This function sets the interlace mode of the video display screen.


Syntax

	void PCV_SetOutputMode(mode)

	Parameter	Type		Description

	mode		WORD	mode of output. Mode available are :

					Mode		Description
					  0		Non interlace mode
					  1		Interlace mode

Return Value

	None


Comments

	PCV_SaveConfiguration is needed to save the new setting into the configuration file.



PCV_SetPortAddr


Description

	This function sets the input/output port address of the WaveWatcher card.


Syntax

	int PCV_SetPortAddr(iPortAddr)

	Parameter		Type		Description

	iPortAddr		int		New port address of the WaveWatcher card. 


Return value

	1	Success
	0	Error


Comments

	PCV_SaveConfiguration is needed to save the new setting into the configuration file. The 
new setting is in effect on the next power-up of the PC system and the switches on the 
WaveWatcher card need to be set before the new setting is in order. 




PCV_SetSkewFactor


Description

	This function sets the value of the specified skew register.


Syntax

	int PCV_SetSkewFactor(iIndex,iValue)

	Parameter	Type		Description

	iIndex		int		Skew index between 0 and 5. Index values are as follows :

					Index		Description		Range
					  0		Display Window X	0-2047
					  1		Display Window Y	0-1023
					  2		Display Address X	0-1023
					  3		Display Address Y	0-511
					  4		Shift Clock Start	0-127
					  5		Palette Skew		0-3


	iValue	WORD	Skew value as specify above.


Return Value

	1	true
	0	false


Comments

	PCV_SaveConfiguration is needed to save the new setting into the configuration file. 
These skew setting will be initialized by the DLL start-up routine when the DLL is first 
loaded.




PCV_SetSyncPol


Description

	This function sets the output video vertical and horizontal synchronisation polarities of the 
WaveWatcher card. This function is used only when the live video is overlayed onto a 
Super VGA standard display card (i.e. 640x480 256 color and above). Consult your Super 
VGA card for the particular of the mode and synchronisation polarity used.


Syntax

	void PCV_SetSyncPol(polarity)

	Parameter	Type		Description

	polarity	BYTE	bit 0	=	Horizontal polarity
					bit 1	=	Vertical polarity
					bit 2-7 =	reserved

					The bit representation are as follow :

					Polarity	setting
					    -		   0
					    +		   1


Return value

	None


Comments

	For standard VGA modes, the synchronisation signal is automatically set to the correct 
polarity. This function will overwrite the preset value. Use the PCV_ResetSyncPol to 
reset to default setting.




PCV_SetVideoAddr


Description

	This function sets the video buffer address of the WaveWatcher card.


Syntax

	int PCV_SetVideoAddr(iVideoAddr)

	Parameter	Type		Description

	iVideoAddr	int		New video buffer address of the WaveWatcher card. The 
address must be on the megabyte boundary and can range 
from 2 - 31 Mbyte.


Return value

	1	Success
	0	Error


Comments

	PCV_SaveConfiguration is needed to save the new setting into the configuration file. This 
video address will be initialized by the DLL start-up routine when the DLL is first loaded.




PCV_SetvideoSource (R4)


Description

	This function sets the active video channel.


Syntax

	void PCV_SetVideoSource(iSource)

	Parameter		Type		Description
	iSource		int		Video channel selected.

						Index		Description
						  0		Channel 1
						  1		Channel 2
						  2		Channel 3


Return Value

	None


Comments

	This function only sets the active video channel. It is the responsibility of the application 
program to set the active audio channel correctly.



PCV_SetVolume


Description

	This function sets the audio volume according to the level provided.


Syntax

	void PCV_SetVolume(level)

	Parameter	Type		Description
	level		int		the level of the audio volume to set.


Return Value

	None


Comments

	PCV_SaveConfiguration is needed to save the new setting into the configuration file.




PCV_SetWindowPosition


Description

	This function sets the position of the top left corner of the video display window on the 
VGA.


Syntax

	void PCV_SetWindowPosition(xLeft, yTop)

	Parameter	Type		Description

	xLeft		WORD	Position in pixel of the left side of the video window on the 
VGA display

	yTop		WORD	Position in pixel of the top side of the video window on the 
VGA display


Return Value

	None


Comments

	The yTop and xLeft values are the absolute coordinate on the physical VGA screen.



PCV_SetWindowSize


Description

	This function sets the width and height of video display window on the VGA.


Syntax

	void PCV_SetWindowSize(xExtent,yExtent,fFitToWindow)

	Parameter		Type		Description

	xExtent		WORD	Width of window in pixel

	yExtent		WORD	Height of window in pixel

	fFitToWindow	BOOL	Flag indicating whether to fit video to the window. '1' = fit to 
window '0' = keep video full size


Return Value

	None


Comments

	In the Fit-to-window mode, one of the field will be disabled when the display window 
size is less than half of the actual video size. This is to take care of the flicking of the 
screen due to interlace input.




PCV_SetZoomFactor


Description

	This function sets both the horizontal and vertical zoom factor of the video screen. These 
zoom factors setting cannot be saved in the configuration file.


Syntax

	void PCV_SetZoomFactor(xZoom,yZoom)

	Parameter		Type		Description

	xZoom		int		X zoom factor

	yZoom		int		Y zoom factor


	The valid zoom factor are :	0 = 100%
						1 = 200%
						2 = 400%
						3 = 800%


Return Value

	None




PCV_UnFreezeVideo


Description

	This function re-enables video capture.  Active video is displayed in the VGA window 
following a call to this function. This is the mode when the WaveWatcher card is powered 
up.


Syntax

	void PCV_UnFreezeVideo()

	There is no parameter for this function.


Return Value

	None


Comments

	This function re-enables video capture only.  It does not affect how or whether captured 
video is displayed.  Display of captured video is controlled by the PCV_EnableVideo, 
PCV_SetWindowSize, and PCV_SetWindowPosition functions.




Undocumented function in the WWDLL.DLL

The functions in alphabetical order are :

PCV_GetDPMISelector
PCV_ReadYUVRect
PCV_WriteYUVRect



The functions in functional group order are :

Configuration
PCV_GetDPMISelector


Image
PCV_ReadYUVRect
PCV_WriteYUVRect




PCV_GetDPMISelector


Description

	Get the DPMI Selector and Selector Increment for the WaveWatcher RAM Buffer.


Syntax

	DWORD PCV_GetDPMISelector()

	There is no parameter for this function.


Return Value

	Upper WORD	=	DPMI Selector
	Lower WORD	=	DPMI Selector Increment




PCV_ReadYUVRect


Description

	This function reads a block of pixel from the video frame buffer, converts to the 
Unpacked YUV format, and writes this to the specified buffer. This function does not 
freeze the video frame buffer before reading the data.


Syntax

	int PCV_ReadYUVRect(lpMem,xLeft,yTop,width,height)

	Parameter	Type		Description

	lpMem	LPSTR	Long pointer to a char buffer that hold the return data

	xLeft		WORD	Pixel coordinate of left side of block

	yTop		WORD	Pixel coordinate of top side of block

	width		WORD	Width of block in pixel

	height		WORD	Height of block pixel


Return Value

	 1	Data copied
	 0	Error


Comments

	a.	The application must freeze the video screen using PCV_FrameFreezeVideo() 
before saving an image.

	b.	The yTop and xLeft values are the coordinates relative to the current video 
window.




PCV_WriteYUVRect


Description

	This function reads a block of data in Unpacked YUV format, converts it and writes the 
data to the video frame buffer. This function does not freeze the video frame buffer 
before writing the data.


Syntax

	int PCV_WriteYUVRect(lpMem,xLeft,yTop,width,height)

	Parameter	Type		Description

	lpMem	LPSTR	Long pointer to a char buffer that hold the data

	xLeft		WORD	Pixel coordinate of left side of block

	yTop		WORD	Pixel coordinate of top side of block

	width		WORD	Width of block in pixel

	height		WORD	Height of block in pixel


Return Value

	 1	Data copied
	 0	Error


Comments

	a.	The application must freeze the video screen using PCV_FrameFreezeVideo() 
before saving an image.

	b.	The yTop and xLeft values are the coordinates relative to the current video 
window.



 

                                                 WaveWatcher Windows Developer's Toolkit Reference Guide


                                                 WaveWatcher Windows Developer's Toolkit Reference Guide







Download Driver Pack

How To Update Drivers Manually

After your driver has been downloaded, follow these simple steps to install it.

  • Expand the archive file (if the download file is in zip or rar format).

  • If the expanded file has an .exe extension, double click it and follow the installation instructions.

  • Otherwise, open Device Manager by right-clicking the Start menu and selecting Device Manager.

  • Find the device and model you want to update in the device list.

  • Double-click on it to open the Properties dialog box.

  • From the Properties dialog box, select the Driver tab.

  • Click the Update Driver button, then follow the instructions.

Very important: You must reboot your system to ensure that any driver updates have taken effect.

For more help, visit our Driver Support section for step-by-step videos on how to install drivers for every file type.

server: ftp, load: 2.12