-
大小: 137KB文件类型: .rar金币: 2下载: 0 次发布日期: 2021-05-09
- 语言: 其他
- 标签: DSHOW DirectShow
资源简介
使用DShow进行摄像头采集预览,并可以随时拍照,其中有获取采集设备列表、获取设备支持分辨率等功能,希望对大家有用

代码片段和文件信息
// GetDeviceInfo.cpp : Defines the class behaviors for the application.
//
#include “stdafx.h“
#include “GetDeviceInfo.h“
#include “GetDeviceInfoDlg.h“
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
// CGetDeviceInfoApp
BEGIN_MESSAGE_MAP(CGetDeviceInfoApp CWinApp)
ON_COMMAND(ID_HELP &CWinApp::onhelp)
END_MESSAGE_MAP()
// CGetDeviceInfoApp construction
CGetDeviceInfoApp::CGetDeviceInfoApp()
{
// support Restart Manager
m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;
// TODO: add construction code here
// Place all significant initialization in InitInstance
}
// The one and only CGetDeviceInfoApp object
CGetDeviceInfoApp theApp;
// CGetDeviceInfoApp initialization
BOOL CGetDeviceInfoApp::InitInstance()
{
// InitCommonControlsEx() is required on Windows XP if an application
// manifest specifies use of ComCtl32.dll version 6 or later to enable
// visual styles. Otherwise any window creation will fail.
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
// Set this to include all the common control classes you want to use
// in your application.
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);
CWinApp::InitInstance();
AfxEnableControlContainer();
// Create the shell manager in case the dialog contains
// any shell tree view or shell list view controls.
CShellManager *pShellManager = new CShellManager;
// Activate “Windows Native“ visual manager for enabling themes in MFC controls
CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));
// 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
// Change the registry key under which our settings are stored
// TODO: You should modify this string to be something appropriate
// such as the name of your company or organization
SetRegistryKey(_T(“Local AppWizard-Generated Applications“));
CGetDeviceInfoDlg dlg;
m_pMainWnd = &dlg;
INT_PTR 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
}
else if (nResponse == -1)
{
TRACE(traceAppMsg 0 “Warning: dialog creation failed so application is terminating unexpectedly.\n“);
TRACE(traceAppMsg 0 “Warning: if you are using MFC controls on the dialog you cannot #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS.\n“);
}
// Delete the shell manager created above.
if (pShellManager != NULL)
{
delete pShellManager;
}
// Since the dialog has been closed return FALSE so that we exit the
// application rather than start the application‘s message pump.
return FALSE;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 110020 2017-02-10 11:24 CameraTakePic\GetDeviceInfo.aps
文件 3006 2017-02-09 15:31 CameraTakePic\GetDeviceInfo.cpp
文件 547 2017-02-09 15:31 CameraTakePic\GetDeviceInfo.h
文件 13562 2017-02-10 11:24 CameraTakePic\GetDeviceInfo.rc
文件 892 2017-02-09 15:32 CameraTakePic\GetDeviceInfo.sln
..A..H. 30720 2017-02-10 11:29 CameraTakePic\GetDeviceInfo.v11.suo
文件 6442 2017-02-09 15:42 CameraTakePic\GetDeviceInfo.vcxproj
文件 2132 2017-02-09 15:31 CameraTakePic\GetDeviceInfo.vcxproj.filters
文件 23951 2017-02-10 11:27 CameraTakePic\GetDeviceInfoDlg.cpp
文件 3302 2017-02-10 11:14 CameraTakePic\GetDeviceInfoDlg.h
文件 4768 2017-02-09 15:31 CameraTakePic\ReadMe.txt
文件 67777 2013-06-05 10:20 CameraTakePic\res\GetDeviceInfo.ico
文件 810 2017-02-09 15:31 CameraTakePic\res\GetDeviceInfo.rc2
文件 2292 2017-02-10 11:07 CameraTakePic\resource.h
文件 215 2017-02-09 15:31 CameraTakePic\stdafx.cpp
文件 2215 2017-02-09 17:19 CameraTakePic\stdafx.h
文件 314 2017-02-09 15:31 CameraTakePic\targetver.h
目录 0 2017-02-10 09:20 CameraTakePic\res
目录 0 2017-02-10 11:29 CameraTakePic
----------- --------- ---------- ----- ----
272965 19
- 上一篇:net-snmp开始教程
- 下一篇:stm32 ADC四路采集代码,附解析
相关资源
- 使用FFmpeg采集摄像头图像和麦克风音
- DirectShow完美环境配置
- DirectShow简单采集程序
- 神龙卡SDKDirectShow 版
- 《directshow实务精选》 光盘
- DirectShow +CameraDS
- DirectShow显示USB摄像头
- DirectX.Capture ffdshow摄像头录制视频拍照
- FFDShow MPEG-4 Video Decoder 2008 03.20
-
SimplePla
yer(DShow).zip - directshow实现的视频采集程序AVCap
- LEDshowtw2010
- 基于opencv的双摄像头读取程序含Dire
- 最简单的基于DirectShow的
- DirectShow的视频播放器.rar
- opencv 、directshow捕获摄像头实时播放
- OpenCV图像视频采集 DirectShow 64位32位库
- 使用DirectShow驱动H264/265格式输出的U
- qt+directshow usb摄像头及音频设备录制视
- LedshowTW2012(LED图文编辑软件) V12.1
- AMCap源代码DirectShow
- V7.1A文件包
- 使用DirectShow采集桌面、语音并实时进
- 虚拟摄像头Filter代码--VirtualCamFilter_
- 虚拟摄像头Filter,没有USB摄像头也可
- 仰邦软件LedshowTW2014
- amCap工具源码
- directshow9
- 基于directShow打造全能播放器系列之二
- DirectShow获取视频和音频数据
评论
共有 条评论