
九视电子878开发卡(PV988M)开发说明文档
视频预览.图像数据处理
(1) int PV980m_GetTotalCard ( );
函数说明 : 取当前计算机卡的总数,在使用其它函数之前调用此函数,程序中只需用一次.
版本 : 1.0
返回值 : int – 返回当前计算机980m 卡的总数
参数说明 : 此函数不带参数
==================================================================
(2) int PV980m_InitVideo( int nSlot, HWND hWnd, int width, intheight );
函数说明 : 初始化视频.此函数在使用PV980m_GetTotalCard()后使用.
版本 : 1.0
返回值 : int - 成功0,失败-1
参数说明 :
nSlot - 通道号,索引号是从0 开始,其最大值不能超过(卡的总数-1)
hWnd - 窗口句柄.用来显示视频
width - 图像宽度,不能大于768
height - 图像的高度, 不能大于576
==================================================================
(3) int PV980m_StartVideo ( int nSlot , int Source , int Mode );
函数说明 : 启动视频成预览状态, 初始化视频之后使用此函数
版本 : 1.0
返回值 : int - 成功0,失败-1
参数说明 :
nSlot - 通道号
Source - 视频输入, IS_SET_VIDEO_IN_1, IS_SET_VIDEO_IN_2,
IS_SET_VIDEO_IN_3.根据视频源的不同传其对应的参数
Mode - 显示模式IS_SET_DM_DIRECTDRAW|IS_SET_DM_ALLOW_SYSMEM;
IS_SET_DM_DIRECTDRAW|IS_SET_DM_ALLOW_PRIMARY 等多种模式
==================================================================
(4) int PV980m_ExitVideo ( int nSlot );
函数说明 : 退出视频,和PV980m_InitVideo 相对应.
版本 : 1.0
返回值 : int - 成功0,失败-1
参数说明 :
nSlot - 通道号
==================================================================
(5) int PV980m_StopLiveVideo ( int nSlot , INT Wait )
函数说明 :停止预览,与函数PV980m_StartVideo 相对应
版本 : 1.0
返回值 : int - 成功0,失败-1
参数说明 :
nSlot - 通道号
Wait - IS_WAIT
==================================================================
(6) int PV980m_FreezeVideo ( int nSlot , INT Wait )
函数说明 :冻结当前图像内存,达到暂停预览的效果
版本 : 1.0
返回值 : int - 成功0,失败-1
参数说明 :
nSlot - 通道号
Wait - IS_WAIT 函数等到当前图像数据被卡抓到后才返回(后台缓冲区在执行此项工作)
IS_DONT_WAIT 函数立即返回在一般的情况两者区别不大
==================================================================
(7) int PV980m_HasVideoStarted ( int nSlot, BOOL* pbo );
函数说明 :判断视频是否已启动. 此函数一般与PV980m_FreezeVideo 函数(参数:IS_DONT_WAIT)关联使用
版本 : 1.0
返回值 : int - 成功0,失败-1
参数说明 :
nSlot - 通道号
pbo - - 标志状态
0 没启动
1 启动
==================================================================
(8) int PV980m_IsVideoFinish ( int nSlot, BOOL* pbo );
函数说明 :判断当前图像数据是否完全的被图像内存取得到,此函数一般与PV980m_FreezeVideo 函数(参数:IS_DONT_WAIT)关联使用
版本 : 1.0
返回值 : int - 成功0,失败-1
参数说明 :
nSlot - 通道号
pbo - - 标志状态
IS_VIDEO_NOT_FINISH
IS_VIDEO_FINISH
==================================================================
(9) int PV980m_CaptureVideo(int nSlot, INT Wait)
函数说明 :此函数主要功能将图像数字信号实时输送到预先分配的图像内存,在DirectDraw 模式下它被直接输送的到显示卡.
版本 : 1.0
返回值 : int - 成功0,失败-1
参数说明 :
nSlot - 通道号
Wait - IS_WAIT 函数等到下一帧图像采集到才返回(后台缓冲区在执行此项工作)
IS_DONT_WAIT 函数立即返回
在一般的情况两者区别不大
==================================================================
(10) int PV980m_StealVideo ( int nSlot, int Wait );
函数说明 :在DirectDraw 活动模式下”StealVideo”.调用此函数后下一帧将会重新分配图像内存.
版本 : 1.0
返回值 : int - 成功0,失败-1
参数说明 :
nSlot - 通道号
Wait - IS_WAIT 函数等到当前帧完整取得才返回
IS_DONT_WAIT 函数立即返回
==================================================================
(11)int PV980m_PrepareStealVideo (int nSlot , int Mode, ULONGStealColorMode );
函数说明 :在DirectDraw 活动模式下预备获取图像从图像内存.活动的图像可能会短暂的凝固.
版本 : 1.0
返回值 : int - 成功0,失败-1
参数说明 :
nSlot - 通道号
Mode - 初始化定义后取消这种状态
IS_INIT_STEAL_VIDEO
IS_EXIT_STEAL_VIDEO
StealColorMode 传递的值由PV980m_SetColorMode决定,可以用PV980m_GetColorDepth获得.
==================================================================
(12) int PV980m_SaveImage (int nSlot , char* File , int Format )
函数说明 :保存当前单帧图像.存成bmp 文件或者jpg 文件格式
版本 : 1.0
返回值 : int - 成功0,失败-1
参数说明 :
nSlot - 通道号
File - 文件存放的完整路径.如:c:\980m.jpg,c:\980m.bmp
Format - 文件存盘格式,IS_SET_DM_BMP,或者IS_SET_DM_JPG
==================================================================
相关链接:


