• 大小: 11.89MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-28
  • 语言: 其他
  • 标签: AMCap  

资源简介

AMCap源码,使用VS2012和VS2015编译通过。可以参考博客http://blog.csdn.net/buynow123/article/details/49965493

资源截图

代码片段和文件信息

//------------------------------------------------------------------------------
// 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\.vs\amcap\v14\.suo

     文件     154683  2014-09-16 10:25  AMCap\amcap.cpp

     文件       4589  2005-01-24 19:15  AMCap\amcap.h

     文件       1078  2005-01-24 19:15  AMCap\amcap.ico

     文件      16801  2005-01-24 19:15  AMCap\amcap.jpg

     文件       6352  2005-01-24 19:15  AMCap\amcap.rc

     文件   52363264  2015-11-21 16:30  AMCap\amcap.sdf

     文件       1424  2014-09-16 10:14  AMCap\amcap.sln

    ..A..H.      5120  2015-11-21 14:39  AMCap\amcap.suo

    ..A..H.     33792  2015-11-21 16:30  AMCap\amcap.v11.suo

    ..A..H.     18432  2014-09-16 12:49  AMCap\amcap.v12.suo

     文件       9349  2005-01-24 19:15  AMCap\amcap.vcproj

     文件      16037  2015-11-21 16:17  AMCap\amcap.vcxproj

     文件       2075  2015-11-21 14:05  AMCap\amcap.vcxproj.filters

     文件        165  2014-09-16 10:28  AMCap\amcap.vcxproj.user

     文件       1332  2005-01-24 19:15  AMCap\Backup\amcap.sln

     文件      18363  2005-01-24 19:15  AMCap\crossbar.cpp

     文件       2703  2005-01-24 19:15  AMCap\crossbar.h

     文件        291  2015-11-21 16:17  AMCap\Debug\amcap.Build.CppClean.log

     文件     368640  2015-11-21 16:17  AMCap\Debug\amcap.exe

     文件    1468956  2015-11-21 16:17  AMCap\Debug\amcap.ilk

     文件         84  2015-11-21 16:17  AMCap\Debug\amcap.lastbuildstate

     文件       2515  2015-11-21 16:17  AMCap\Debug\amcap.log

     文件     477741  2015-11-21 16:17  AMCap\Debug\amcap.obj

     文件    3927040  2015-11-21 16:17  AMCap\Debug\amcap.pdb

     文件       5236  2015-11-21 16:17  AMCap\Debug\amcap.res

     文件       3988  2015-11-21 16:17  AMCap\Debug\cl.command.1.tlog

     文件     142116  2015-11-21 16:17  AMCap\Debug\CL.read.1.tlog

     文件       2660  2015-11-21 16:17  AMCap\Debug\CL.write.1.tlog

     文件     104720  2015-11-21 16:17  AMCap\Debug\crossbar.obj

............此处省略83个文件信息

评论

共有 条评论