資源簡介
VS2010環境下實現USB攝像頭視頻采集、錄像和回放。采用jpeg編碼壓縮解壓縮,錄制視頻文件占用存儲空間小,回放過程可控。
代碼片段和文件信息
//?VideoRecordPlayDlg.cpp?:?實現文件
//
#include?“stdafx.h“
#include?“VideoRecordPlay.h“
#include?“VideoRecordPlayDlg.h“
#include?“afxdialogex.h“
#include?“opencv2/opencv.hpp“????//opencv?header?files
#include?
#include?
#include?
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#endif
#define?DEBUG?0
using?namespace?cv;
using?namespace??std;
CVideoRecordPlayDlg?*?pVideoDlg;
//?CVideoRecordPlayDlg?對話框
int?sxsy;
VideoCapture?capture;
Mat?frame;
CEvent m_ExitEvent;
UINT?CommNo;
BYTE?Temp_Buf[MAX_TEMP_BUFFER];
unsigned?char?Read_Buf[MAX_TEMP_BUFFER];
UINT?PlayVideoThread(LPVOID?lparam)
{
while(true)
{
if(pVideoDlg->m_ExitFlag)
{
SetEvent(m_ExitEvent);?
Sleep(10);
break;
}
if(pVideoDlg->bPlay)
{
pVideoDlg->Video
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????22730??2017-09-27?10:13??videorecord\VideoRecordPlayDlg.cpp
?????文件???????3056??2017-09-12?20:42??videorecord\VideoRecordPlayDlg.h
?????目錄??????????0??2018-11-27?09:54??videorecord
-----------?---------??----------?-----??----
????????????????25786????????????????????3
評論
共有 條評論