关于PV231采集卡的问题,各位老大,小弟请求帮助阿,快来救救我,在线。。。。。。。。。 UP有分,不够在加 (100分)

  • 主题发起人 主题发起人 wjames
  • 开始时间 开始时间
W

wjames

Unregistered / Unconfirmed
GUEST, unregistred user!
现在我们要做一个项目,用了PV231的采集卡,看了vc写的程序,但是我的C++不好,
看了半天也没有搞明白,不知道那位做过的大大可以帮我
谁有pv231的delphi的例子,最好!!!!!

谢谢各位了,小弟就在这儿等了。。。。。。。。。。。。。。。。。。。。。。。

分不够可以加的,qq:87225511
mail:jian_w@163.com
 
把C++代码贴出来,大家帮你翻成DELPHI
 
// Sample.cpp : Defines the class behaviors for the application.
//

#include "stdafx.h"
#include "Sample.h"
#include "SampleDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CSampleApp

BEGIN_MESSAGE_MAP(CSampleApp, CWinApp)
//{{AFX_MSG_MAP(CSampleApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSampleApp construction

CSampleApp::CSampleApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}

/////////////////////////////////////////////////////////////////////////////
// The one and only CSampleApp object

CSampleApp theApp;

/////////////////////////////////////////////////////////////////////////////
// CSampleApp initialization

BOOL CSampleApp::InitInstance()
{
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.

#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif

CSampleDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}

// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}


// SampleDlg.cpp : implementation file
//

#include "stdafx.h"
#include "Sample.h"
#include "SampleDlg.h"

#include "PVMpegI.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog used for App About

class CAboutDlg : public CDialog
{
public:
CAboutDlg();

// Dialog Data
//{{AFX_DATA(CAboutDlg)
enum { IDD = IDD_ABOUTBOX };
//}}AFX_DATA

// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CAboutDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL

// Implementation
protected:
//{{AFX_MSG(CAboutDlg)
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
{
//{{AFX_DATA_INIT(CAboutDlg)
//}}AFX_DATA_INIT
}

void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAboutDlg)
//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
//{{AFX_MSG_MAP(CAboutDlg)
// No message handlers
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSampleDlg dialog

CSampleDlg::CSampleDlg(CWnd* pParent /*=NULL*/)
: CDialog(CSampleDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CSampleDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}

void CSampleDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSampleDlg)
DDX_Control(pDX, IDC_SLIDER_BRIGHT, m_cslBright);
DDX_Control(pDX, IDC_SLIDER_CONTRAST, m_cslContrast);
DDX_Control(pDX, IDC_SLIDER_HUE, m_cslHue);
DDX_Control(pDX, IDC_SLIDER_SATURATION, m_cslSaturation);
//}}AFX_DATA_MAP
}

BEGIN_MESSAGE_MAP(CSampleDlg, CDialog)
//{{AFX_MSG_MAP(CSampleDlg)
ON_WM_SYSCOMMAND()
ON_WM_PAINT()
ON_WM_QUERYDRAGICON()
ON_WM_TIMER()
ON_WM_HSCROLL()
ON_BN_CLICKED(IDC_BTN_STARTREC, OnBtnStartrec)
ON_BN_CLICKED(IDC_BTN_STOPREC, OnBtnStoprec)
ON_BN_CLICKED(IDC_BTN_SNAP, OnBtnSnap)
ON_BN_CLICKED(IDC_BTN_PLAYBACK, OnBtnPlayback)
ON_BN_CLICKED(IDC_BTN_STOPPLAY, OnBtnStopplay)
ON_BN_CLICKED(IDC_RDO_AV0, OnRdoAv0)
ON_BN_CLICKED(IDC_RDO_AV1, OnRdoAv1)
ON_BN_CLICKED(IDC_RDO_SVIDEO, OnRdoSvideo)
ON_BN_CLICKED(IDC_RDO_PAL, OnRdoPal)
ON_BN_CLICKED(IDC_RDO_NTSC, OnRdoNtsc)
ON_BN_CLICKED(IDC_RDO_SECAM, OnRdoSecam)
ON_BN_CLICKED(IDC_RDO_SIF, OnRdoSif)
ON_BN_CLICKED(IDC_RDO_QSIF, OnRdoQsif)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSampleDlg message handlers

BOOL CSampleDlg::OnInitDialog()
{
CDialog::OnInitDialog();

// Add "About..." menu item to system menu.

// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);

CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}

// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon

// TODO: Add extra initialization here

m_iResSize = SIF;
//Init slider bar
m_cslBright.SetRangeMax(255,TRUE);
m_cslContrast.SetRangeMax(255,TRUE);
m_cslHue.SetRangeMax(255,TRUE);
m_cslSaturation.SetRangeMax(255,TRUE);

m_bPlayBack = FALSE;
m_cView=(CStatic*)GetDlgItem(IDC_VIEW);
m_cStatus=(CStatic*)GetDlgItem(IDC_STATUS);
m_cView->MoveWindow(5, 5, 352, 240);

if(!MPG_Init(this->m_hWnd))
return FALSE;


m_iDeviceCount = MPG_GetDeviceAccount();
RECT rc = {0,0,352,240};
MPG_OpenDisplay (m_cView->m_hWnd, rc, 0);

char szPath[MAX_PATH];
GetCurrentDirectory(sizeof(szPath), szPath);
MPG_SetWorkDirectory(szPath, 0);

POINT p = {0,0};
MPG_CheckLogo(FALSE, p, 0); //Logo.yuv

//Set slider position.
m_cslBright.SetPos(MPG_GetVideoAmp(BRIGHTNESS, 0) +128);
m_cslContrast.SetPos(MPG_GetVideoAmp(CONTRAST, 0) +128);
m_cslHue.SetPos(MPG_GetVideoAmp(HUE, 0) +128);
m_cslSaturation.SetPos(MPG_GetVideoAmp(SATURATION, 0) +128);

CheckDlgButton(IDC_RDO_AV0, TRUE);
CheckDlgButton(IDC_RDO_NTSC, TRUE);
CheckDlgButton(IDC_RDO_SIF, TRUE);
SetTimer(100, 1000, NULL);
return TRUE; // return TRUE unless you set the focus to a control
}

void CSampleDlg::OnSysCommand(UINT nID, LPARAM lParam)
{
if ((nID &amp; 0xFFF0) == IDM_ABOUTBOX)
{
CAboutDlg dlgAbout;
dlgAbout.DoModal();
}
else
{
CDialog::OnSysCommand(nID, lParam);
}
}

// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.

void CSampleDlg::OnPaint()
{
if (IsIconic())
{
CPaintDC dc(this); // device context for painting

SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
CRect rect;
GetClientRect(&amp;rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;

// Draw the icon
dc.DrawIcon(x, y, m_hIcon);
}
else
{
CDialog::OnPaint();
}
}

// The system calls this to obtain the cursor to display while the user drags
// the minimized window.
HCURSOR CSampleDlg::OnQueryDragIcon()
{
return (HCURSOR) m_hIcon;
}

void CSampleDlg::OnCancel()
{
// TODO: Add extra cleanup here
KillTimer(100);
MPG_CloseDisplay ( 0);
MPG_Exit();
CDialog::OnCancel();
}

void CSampleDlg::OnBtnStartrec()
{
RECPARAM rp;

rp.compress = MPEG1;
rp.resolution = (Resolution)m_iResSize;
rp.streamtype = BOTHSTREAM;
rp.videobitrate = 1150000;
rp.audiobitrate = 224;
rp.audiodelay = 0;
rp.audiosamplerate = 44100; //Fix in 44100 only.

MPG_Record("Sample0.mpg", // File name.
NULL, // capture type.
0);
}

void CSampleDlg::OnBtnStoprec()
{
// Stop record.
MPG_RecordStop(0);
}

void CSampleDlg::OnBtnSnap()
{
SNAPPARAM snp;

snp.compress = JPEG;
snp.resolution = (Resolution)m_iResSize;

MPG_Snap( "Image0.JPG", // File name
&amp;snp, // Capture type.
0); //Device ID (Card ID)
}

void CSampleDlg::OnBtnPlayback()
{
if(!m_bPlayBack)
{
char szPath[MAX_PATH];
GetCurrentDirectory(sizeof(szPath), szPath);
strcat(szPath, "//Sample0.mpg");
if(MPG_StartPlayBack(szPath, 0) )
{
SetTimer(300, 600, NULL);
m_bPlayBack = TRUE;
}
}
}

void CSampleDlg::OnBtnStopplay()
{
if(m_bPlayBack)
{
KillTimer(300);
MPG_StopPlayBack(0 );
m_bPlayBack = FALSE;
}
}

void CSampleDlg::OnTimer(UINT nIDEvent)
{
switch(nIDEvent)
{
case 100:
if(MPG_IsVideoSourceOK(0) )
m_cStatus->SetWindowText("Video OK");
else
m_cStatus->SetWindowText("Video Error !");
break;

case 300:
DWORD dwSecond;
if(!MPG_IsInPlayBack(&amp;dwSecond, 0) )
{
OnBtnStopplay();
}
break;
default:
break;
}
CDialog::OnTimer(nIDEvent);
}

void CSampleDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
char i[256];
itoa(nPos, i, 10);
if (nPos==0) return;

if( m_cslBright.m_hWnd == pScrollBar->m_hWnd)
MPG_SetVideoAmp(BRIGHTNESS, nPos-128, 0);

if( m_cslContrast.m_hWnd == pScrollBar->m_hWnd)
MPG_SetVideoAmp(CONTRAST, nPos-128, 0);

if( m_cslHue.m_hWnd == pScrollBar->m_hWnd)
MPG_SetVideoAmp(HUE, nPos-128, 0);

if( m_cslSaturation.m_hWnd == pScrollBar->m_hWnd)
MPG_SetVideoAmp(SATURATION, nPos-128, 0);

CDialog::OnHScroll(nSBCode, nPos, pScrollBar);
}

void CSampleDlg::OnRdoAv0()
{
MPG_SetVideoPort(0, 0);
}

void CSampleDlg::OnRdoAv1()
{
MPG_SetVideoPort(1, 0);
}

void CSampleDlg::OnRdoSvideo()
{
MPG_SetVideoPort(2, 0);
}

void CSampleDlg::OnRdoPal()
{
MPG_SetVideoStandard(PAL, 0);
}

void CSampleDlg::OnRdoNtsc()
{
MPG_SetVideoStandard(NTSC, 0);
}

void CSampleDlg::OnRdoSecam()
{
//Not ready.
}

void CSampleDlg::OnRdoSif()
{
m_iResSize = SIF; //NTSC:352x240, PAL:352x288

}

void CSampleDlg::OnRdoQsif()
{
m_iResSize = QSIF; //NTSC:176x120, PAL:176x144

}


// Sample.h : main header file for the SAMPLE application
//

#if !defined(AFX_SAMPLE_H__9D7F3D64_AE52_11D4_B47F_0000E8764F8E__INCLUDED_)
#define AFX_SAMPLE_H__9D7F3D64_AE52_11D4_B47F_0000E8764F8E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif

#include "resource.h" // main symbols

/////////////////////////////////////////////////////////////////////////////
// CSampleApp:
// See Sample.cpp for the implementation of this class
//

class CSampleApp : public CWinApp
{
public:
CSampleApp();

// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSampleApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL

// Implementation

//{{AFX_MSG(CSampleApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};


/////////////////////////////////////////////////////////////////////////////

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SAMPLE_H__9D7F3D64_AE52_11D4_B47F_0000E8764F8E__INCLUDED_)


// SampleDlg.h : header file
//

#if !defined(AFX_SAMPLEDLG_H__9D7F3D66_AE52_11D4_B47F_0000E8764F8E__INCLUDED_)
#define AFX_SAMPLEDLG_H__9D7F3D66_AE52_11D4_B47F_0000E8764F8E__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CSampleDlg dialog

class CSampleDlg : public CDialog
{
// Construction
public:
CSampleDlg(CWnd* pParent = NULL); // standard constructor

// Dialog Data
//{{AFX_DATA(CSampleDlg)
enum { IDD = IDD_SAMPLE_DIALOG };
CSliderCtrl m_cslBright;
CSliderCtrl m_cslContrast;
CSliderCtrl m_cslHue;
CSliderCtrl m_cslSaturation;
//}}AFX_DATA

// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSampleDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL

// Implementation
protected:
HICON m_hIcon;
CStatic *m_cView;
CStatic *m_cStatus;
int m_iDeviceCount;
BOOL m_bPlayBack;
int m_iResSize;

// Generated message map functions
//{{AFX_MSG(CSampleDlg)
virtual BOOL OnInitDialog();
afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
virtual void OnCancel();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
afx_msg void OnBtnStartrec();
afx_msg void OnBtnStoprec();
afx_msg void OnBtnSnap();
afx_msg void OnBtnPlayback();
afx_msg void OnBtnStopplay();
afx_msg void OnRdoAv0();
afx_msg void OnRdoAv1();
afx_msg void OnRdoSvideo();
afx_msg void OnRdoPal();
afx_msg void OnRdoNtsc();
afx_msg void OnRdoSecam();
afx_msg void OnRdoSif();
afx_msg void OnRdoQsif();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SAMPLEDLG_H__9D7F3D66_AE52_11D4_B47F_0000E8764F8E__INCLUDED_)


 
//pvmpegi.h :


// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the PVMPEGI_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// PVMPEGI_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
#ifdef PVMPEGI_EXPORTS
#define PVMPEGI_API __declspec(dllexport)
#else
#define PVMPEGI_API __declspec(dllimport)
#endif

#ifdef __cplusplus
extern "C" {
#endif

typedef enum _ComPressMethod
{
MPEG1,
JPEG,
BMP,
} ComPressMethod;

typedef enum _Standard
{
NTSC,
SQUARE,
PAL
} Standard;

typedef enum _Resolution
{
SIF,
QSIF,
FULL
} Resolution;

typedef enum _StreamType
{
VIDEOONLY,
AUDIOONLY,
BOTHSTREAM
} StreamType;

typedef enum _VideoAmp
{
BRIGHTNESS,
CONTRAST,
HUE,
SATURATION
} VideoAmp;

typedef enum _AudioEncodingBitRate{
ABR_112K,
ABR_128K,
ABR_160K,
ABR_192K,
ABR_224K,
ABR_256K,
ABR_320K,
ABR_384K,
} AudioEncodingBitRate;

typedef struct _SNAPPARAM
{
ComPressMethod compress;
Resolution resolution;
} SNAPPARAM;

typedef struct _RECPARAM
{
ComPressMethod compress;
Resolution resolution;
StreamType streamtype;
int videobitrate;
int audiobitrate;
int audiodelay;
int audiosamplerate;
} RECPARAM;

typedef struct _VIDEOPARAM
{
int brightness;
int contrast;
int saturation;
int hue;
} VIDEOPARAM;

// Initialize all DLL.
PVMPEGI_API BOOL WINAPI MPG_Init(HWND hMainWnd);
// DLL exit.
PVMPEGI_API BOOL WINAPI MPG_Exit();

// Open a display window for MPEG live video pass through.
PVMPEGI_API BOOL WINAPI MPG_OpenDisplay (HWND hShowWnd,
RECT rcDisplay, //Display area.
DWORD dwSlotNumber = 0);

// Close live video window.
PVMPEGI_API void WINAPI MPG_CloseDisplay (DWORD dwSlotNumber = 0);

// Get device account on your system.
PVMPEGI_API int WINAPI MPG_GetDeviceAccount();

// Snap capture, snap file will save to work path.
// SnapName : snap file name, don't include path.
PVMPEGI_API BOOL WINAPI MPG_Snap(LPSTR SnapName, // File name
SNAPPARAM *pSnapParam = NULL, // Capture type.
DWORD dwSlotNumber = 0); //Device ID (Card ID)

//Record MPEG-1 file.
PVMPEGI_API BOOL WINAPI MPG_Record(LPSTR RecName, // File name.
RECPARAM* pRecParam = NULL, // capture type.
DWORD dwSlotNumber = 0 //Device ID.
);
// Stop record.
PVMPEGI_API BOOL WINAPI MPG_RecordStop(DWORD dwSlotNumber = 0);

// Set display area and position.
PVMPEGI_API void WINAPI MPG_SetVideoRect(RECT *pRect, DWORD dwSlotNumber = 0);
// Get display area and position.
PVMPEGI_API void WINAPI MPG_GetVideoRect(RECT *pRect, DWORD dwSlotNumber = 0);

// Set video source.
PVMPEGI_API BOOL WINAPI MPG_SetVideoPort(int port, DWORD dwSlotNumber = 0);
// Get video source.
PVMPEGI_API WINAPI MPG_GetVideoPort(DWORD dwSlotNumber = 0);
// Set video standard.
PVMPEGI_API BOOL WINAPI MPG_SetVideoStandard(Standard std, DWORD dwSlotNumber = 0);
// Get video standard.
PVMPEGI_API Standard WINAPI MPG_GetVideoStandard(DWORD dwSlotNumber = 0);

//Play back MPEG-1 file, use DirectShow.
PVMPEGI_API BOOL WINAPI MPG_StartPlayBack(LPSTR lpFileName, DWORD dwSlotNumber = 0);
PVMPEGI_API void WINAPI MPG_StopPlayBack(DWORD dwSlotNumber = 0);
//If using MPG_StartPlayBack, this will return TRUE;
//dwPlayTime: second.
PVMPEGI_API BOOL WINAPI MPG_IsInPlayBack(DWORD *dwPlayTime, DWORD dwSlotNumber=0);

// Set video amp property.
PVMPEGI_API BOOL WINAPI MPG_SetVideoAmp(VideoAmp va, int iValue, DWORD dwSlotNumber = 0);
// Get video amp property.
PVMPEGI_API int WINAPI MPG_GetVideoAmp(VideoAmp va, DWORD dwSlotNumber=0);

//Check video source.
PVMPEGI_API BOOL WINAPI MPG_IsVideoSourceOK(DWORD dwSlotNumber=0);

// Get snap capture parameter.
PVMPEGI_API void WINAPI MPG_GetSnapParam(SNAPPARAM *pSnapPam, DWORD dwSlotNumber = 0);
// Get record parameter.
PVMPEGI_API void WINAPI MPG_GetRecParam(RECPARAM *pRecPam, DWORD dwSlotNumber = 0);
/// PVMPEGI_API void WINAPI MPGErrorReport()

//Display logo.
PVMPEGI_API void WINAPI MPG_CheckLogo(BOOL bShowLogo, POINT pos, DWORD dwSlotNumber = 0);
//Set working directory for MPEG1 and snap capture.
PVMPEGI_API void WINAPI MPG_SetWorkDirectory(LPSTR lpWordDir, DWORD dwSlotNumber = 0);

////////////////I2C functions/////////////////////////////
//Write n byte to I2C device, Tuner Slave Address ==> PHILIPS &amp; LG:0xc0 , NEW LG:0xc6
PVMPEGI_API BOOL WINAPI MPG_I2CWriteTuner(BYTE byAddress, BYTE *byData, BYTE byCount,DWORD ID = 0);
PVMPEGI_API BOOL WINAPI MPG_I2CReadTuner(BYTE byAddress, BYTE *byData
, DWORD dwSlotNumber = 0);
//Get remote control code.
PVMPEGI_API BOOL WINAPI MPG_ReadIR(BYTE *byData, DWORD dwSlotNumber = 0);

// Detect video stream.
//PVMPEGI_API ErrorCode WINAPI MPG_DetectVStream(DWORD dwSlotNumber = 0);
//
//PVMPEGI_API UINT WINAPI MPG_CreateStreamHook(StreamProc lpStreamFun, DWORD dwSlotNumber = 0);
//
//PVMPEGI_API UINT WINAPI MPG_StopStreamHook(DWORD dwSlotNumber = 0);
// Set video frame rate.
//PVMPEGI_API BOOL WINAPI MPG_SetVideoFps(int fps, DWORD ID = 0);
// Get video frame rate.
//PVMPEGI_API int WINAPI MPG_GetVideoFps(DWORD dwSlotNumber = 0);
// Get available device index.
//PVMPEGI_API int WINAPI MPG_GetAvailableIndex();

////////////////////Security Functions///////////////////////
//
//PVMPEGI_API ErrorCode WINAPI MPG_SensorStart(SensorProc fpDeal,DWORD dwSlotNumber = 0);
//
//PVMPEGI_API void WINAPI MPG_SensorStop(DWORD ID = 0);
//
//PVMPEGI_API BOOL WINAPI MPG_SetSensorArea(RECT senRc, DWORD dwSlotNumber = 0);
//
//PVMPEGI_API BOOL WINAPI MPG_EraseSensorArea(RECT senRc, DWORD dwSlotNumber = 0);
//
//PVMPEGI_API void WINAPI MPG_SetSensorThreshold(int value, DWORD dwSlotNumber = 0);
///////////////////////////////////////////////////////////////////

#ifdef __cplusplus
}
#endif

// This class is exported from the PVMPEGI.dll
class PVMPEGI_API CPVMPEGI {
public:
CPVMPEGI(void);
// TODO: add your methods here.
};

extern PVMPEGI_API int nPVMPEGI;

PVMPEGI_API int fnPVMPEGI(void);

 
俺不懂采集卡的事,
帮你提提!
 
找厂家咨询吧!!
 
PV231是巴,这东西很难用的 我用的是这个但是没有对他进行编程有空研究一下
欢迎您访问我的网站 www.iligia.com
 
pv231只是比pv230多了个音频采集功能,其他应该都是一样的吧?
 
这么长啊?!哪位要帮忙翻译来着?[:D]
 
多人接受答案了。
 

Similar threads

回复
0
查看
1K
不得闲
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
后退
顶部