AMCap源代码DirectShow
AMCap源码,使用VS2012和VS2015编译通过。可以参考博客http://blog.csdn.net/buynow123/article/details/49965493
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
..A..H. 25600 2015-11-21 14:53 AMCap.vsamcapv14.suo
文件 154683 2014-09-16 10:25 AMCapamcap.cpp
文件 4589 2005-01-24 19:15 AMCapamcap.h
文件 1078 2005-01-24 19:15 AMCapamcap.ico
文件 16801 2005-01-24 19:15 AMCapamcap.jpg
文件 6352 2005-01-24 19:15 AMCapamcap.rc
文件 52363264 2015-11-21 16:30 AMCapamcap.sdf
文件 1424 2014-09-16 10:14 AMCapamcap.sln
..A..H. 5120 2015-11-21 14:39 AMCapamcap.suo
..A..H. 33792 2015-11-21 16:30 AMCapamcap.v11.suo
..A..H. 18432 2014-09-16 12:49 AMCapamcap.v12.suo
文件 9349 2005-01-24 19:15 AMCapamcap.vcproj
文件 16037 2015-11-21 16:17 AMCapamcap.vcxproj
文件 2075 2015-11-21 14:05 AMCapamcap.vcxproj.filters
文件 165 2014-09-16 10:28 AMCapamcap.vcxproj.user
文件 1332 2005-01-24 19:15 AMCapBackupamcap.sln
文件 18363 2005-01-24 19:15 AMCapcrossbar.cpp
文件 2703 2005-01-24 19:15 AMCapcrossbar.h
文件 291 2015-11-21 16:17 AMCapDebugamcap.Build.CppClean.log
文件 368640 2015-11-21 16:17 AMCapDebugamcap.exe
文件 1468956 2015-11-21 16:17 AMCapDebugamcap.ilk
文件 84 2015-11-21 16:17 AMCapDebugamcap.lastbuildstate
文件 2515 2015-11-21 16:17 AMCapDebugamcap.log
文件 477741 2015-11-21 16:17 AMCapDebugamcap.obj
文件 3927040 2015-11-21 16:17 AMCapDebugamcap.pdb
文件 5236 2015-11-21 16:17 AMCapDebugamcap.res
文件 3988 2015-11-21 16:17 AMCapDebugcl.command.1.tlog
文件 142116 2015-11-21 16:17 AMCapDebugCL.read.1.tlog
文件 2660 2015-11-21 16:17 AMCapDebugCL.write.1.tlog
文件 104720 2015-11-21 16:17 AMCapDebugcrossbar.obj
............此处省略83个文件信息
//------------------------------------------------------------------------------
// File: AMCap.cpp
//
// Desc: Audio/Video Capture sample for DirectShow
//
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include se.h>
#include
#include “stdafx.h“
#include “amcap.h“
#include “status.h“
#include “crossbar.h“
#include “SampleCGB.h“
//------------------------------------------------------------------------------
// Macros
//------------------------------------------------------------------------------
#define ABS(x) (((x) > 0) ? (x) : -(x))
// An application can advertise the existence of its filter graph
// by registering the graph with a global Running object Table (ROT).
// The GraphEdit application can detect and remotely view the running
// filter graph allowing you to ‘spy‘ on the graph with GraphEdit.
//
// To enable registration in this sample define REGISTER_FILTERGRAPH.
//
#ifdef DEBUG
#define REGISTER_FILTERGRAPH
#endif
//------------------------------------------------------------------------------
// Global data
//------------------------------------------------------------------------------
HINSTANCE ghInstApp=0;
HACCEL ghAccel=0;
HFONT ghfontApp=0;
TEXTMETRIC gtm={0};
TCHAR gszAppName[]=TEXT(“AMCAP“);
HWND ghwndApp=0 ghwndStatus=0;
HDEVNOTIFY ghDevNotify=0;
PUnregisterDeviceNotification gpUnregisterDeviceNotification=0;
PRegisterDeviceNotification gpRegisterDeviceNotification=0;
DWORD g_dwGraphRegister=0;
struct _capstuff
{
TCHAR szCaptureFile[_MAX_PATH];
WORD wCapFileSize; // size in Meg
ISampleCaptureGraphBuilder *pBuilder;
IVideoWindow *pVW;
IMediaEventEx *pME;
IAMDroppedframes *pDF;
IAMVideoCompression *pVC;
IAMVfwCaptureDialogs *pDlg;
IAMStreamConfig *pASC; // for audio cap
IAMStreamConfig *pVSC; // for video cap
IbaseFilter *pRender;
IbaseFilter *pVCap *pACap;
IGraphBuilder *pFg;
IFileSinkFilter *pSink;
IConfigAviMux *pConfigAviMux;
int iMasterStream;
BOOL fCaptureGraphBuilt;
BOOL fPreviewGraphBuilt;
BOOL fCapturing;
BOOL fPreviewing;
BOOL fMPEG2;
BOOL fCapAudio;
BOOL fCapCC;
BOOL fCCAvail;
BOOL fCapAudioIsRelevant;
bool fDeviceMenuPopulated;
IMoniker *rgpmVideoMenu[10];
IMoniker *rgpmAudioMenu[10];
IMoniker *pmVideo;
IMoniker *pmAudio;
double frameRate;
BOOL fWantPreview;
long lCapStartTime;
long lCapStopTime;
WCHAR wachFriendlyName[120];
BOOL fUseTimeLimit;
BOOL fUseframeRate;
DWORD dwTimeLimit;
int iFormatDialogPos;
int iSourceDialogPos;
int iDisplayDialogPos
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
..A..H. 25600 2015-11-21 14:53 AMCap.vsamcapv14.suo
文件 154683 2014-09-16 10:25 AMCapamcap.cpp
文件 4589 2005-01-24 19:15 AMCapamcap.h
文件 1078 2005-01-24 19:15 AMCapamcap.ico
文件 16801 2005-01-24 19:15 AMCapamcap.jpg
文件 6352 2005-01-24 19:15 AMCapamcap.rc
文件 52363264 2015-11-21 16:30 AMCapamcap.sdf
文件 1424 2014-09-16 10:14 AMCapamcap.sln
..A..H. 5120 2015-11-21 14:39 AMCapamcap.suo
..A..H. 33792 2015-11-21 16:30 AMCapamcap.v11.suo
..A..H. 18432 2014-09-16 12:49 AMCapamcap.v12.suo
文件 9349 2005-01-24 19:15 AMCapamcap.vcproj
文件 16037 2015-11-21 16:17 AMCapamcap.vcxproj
文件 2075 2015-11-21 14:05 AMCapamcap.vcxproj.filters
文件 165 2014-09-16 10:28 AMCapamcap.vcxproj.user
文件 1332 2005-01-24 19:15 AMCapBackupamcap.sln
文件 18363 2005-01-24 19:15 AMCapcrossbar.cpp
文件 2703 2005-01-24 19:15 AMCapcrossbar.h
文件 291 2015-11-21 16:17 AMCapDebugamcap.Build.CppClean.log
文件 368640 2015-11-21 16:17 AMCapDebugamcap.exe
文件 1468956 2015-11-21 16:17 AMCapDebugamcap.ilk
文件 84 2015-11-21 16:17 AMCapDebugamcap.lastbuildstate
文件 2515 2015-11-21 16:17 AMCapDebugamcap.log
文件 477741 2015-11-21 16:17 AMCapDebugamcap.obj
文件 3927040 2015-11-21 16:17 AMCapDebugamcap.pdb
文件 5236 2015-11-21 16:17 AMCapDebugamcap.res
文件 3988 2015-11-21 16:17 AMCapDebugcl.command.1.tlog
文件 142116 2015-11-21 16:17 AMCapDebugCL.read.1.tlog
文件 2660 2015-11-21 16:17 AMCapDebugCL.write.1.tlog
文件 104720 2015-11-21 16:17 AMCapDebugcrossbar.obj
............此处省略83个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)