是否可以伪造视频流作为在Skype,Lync等中可见的虚拟摄像头?

时间:2011-08-31 03:22:39

标签: c# c++ wpf webcam directshow

我正在尝试为我的应用程序构建一个关键部分,我需要能够伪造虚拟凸轮视频流。我想伪造成虚拟网络摄像头的视频流通过我的PC进行流式传输,在那里我可以从我的网络摄像头或我硬盘的某个地方设置视频源。总而言之,我可以在WPF中将其设置为MediaElement.SourceProperty or Image.Source

我见过Vivek's Vcam, a directshow filter here in tmhare.com这似乎与我正在寻找的东西非常相关。但我找不到用VS2010编译它的方法,我也不知道如何处理它。我想我需要更改输入引脚但是怎么做?

无论如何,总而言之,我正在尝试构建一个需要像ManyCam的小版本一样工作的部分代码。我正在构建一个WPF应用程序,我从64位PC流式传输源代码。

我也很欣赏过滤器的一些示例代码,因为我几乎忘记了所有关于C ++的知识,因为DirectShow过滤器需要用C ++编写......

感谢您的一切!


编辑:

enter image description here

我得到的错误;

1   IntelliSense: identifier "REFERENCE_TIME" is undefined  c:\program files (x86)\microsoft sdks\windows\v7.0a\include\dvdmedia.h  307 5 // and 6 more
6   IntelliSense: not a class or struct name    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.h  8   22  Filters
7   IntelliSense: identifier "CUnknown" is undefined    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.h  14  12  Filters
8   IntelliSense: identifier "IFilterGraph" is undefined    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.h  17  5   Filters
9   IntelliSense: not a class or struct name    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.h  23  28  Filters
10  IntelliSense: not a class or struct name    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.h  23  50  Filters
11  IntelliSense: not a class or struct name    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.h  23  74  Filters
12  IntelliSense: identifier "IBaseFilter" is undefined c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.h  37  25  Filters
13  IntelliSense: identifier "Quality" is undefined c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.h  37  48  Filters
14  IntelliSense: identifier "AM_MEDIA_TYPE" is undefined   c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.h  42  41  Filters // and 7 more
17  IntelliSense: identifier "IMediaSample" is undefined    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.h  60  24  Filters
18  IntelliSense: identifier "IMemAllocator" is undefined   c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.h  61  30  Filters
19  IntelliSense: identifier "ALLOCATOR_PROPERTIES" is undefined    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.h  61  57  Filters
20  IntelliSense: identifier "CMediaType" is undefined  c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.h  62  34  Filters
21  IntelliSense: identifier "CMediaType" is undefined  c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.h  63  41  Filters
22  IntelliSense: identifier "CMediaType" is undefined  c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.h  64  32  Filters 69  5   Filters
24  IntelliSense: identifier "CCritSec" is undefined    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.h  71  5   Filters
25  IntelliSense: identifier "IReferenceClock" is undefined c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.h  72  5   Filters
26  IntelliSense: cannot open source file "streams.h"   c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    4   1   Filters
27  IntelliSense: identifier "CUnknown" is undefined    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    13  1   Filters
28  IntelliSense: identifier "ASSERT" is undefined  c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    15  5   Filters
29  IntelliSense: identifier "CUnknown" is undefined    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    16  5   Filters
30  IntelliSense: identifier "punk" is undefined    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    16  15  Filters
31  IntelliSense: "CSource" is not a nonstatic data member or base class of class "CVCam"   c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    21  5   Filters
32  IntelliSense: identifier "NAME" is undefined    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    21  13  Filters
33  IntelliSense: expected a ')'    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    21  32  Filters
34  IntelliSense: identifier "ASSERT" is undefined  c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    23  5   Filters
35  IntelliSense: identifier "CAutoLock" is undefined   c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    24  5   Filters
36  IntelliSense: identifier "m_cStateLock" is undefined    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    24  26  Filters
37  IntelliSense: identifier "m_paStreams" is undefined c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    26  5   Filters
38  IntelliSense: identifier "CSourceStream" is undefined   c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    26  20  Filters
39  IntelliSense: expected an expression    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    26  36  Filters
40  IntelliSense: expected a ';'    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    26  38  Filters
41  IntelliSense: identifier "IAMStreamConfig" is undefined c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    33  24  Filters
42  IntelliSense: identifier "IKsPropertySet" is undefined  c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    33  60  Filters
43  IntelliSense: identifier "m_paStreams" is undefined c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    34  16  Filters
44  IntelliSense: name followed by '::' must be a class or namespace name   c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    36  16  Filters
45  IntelliSense: identifier "IMediaSample" is undefined    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    74  33  Filters
46  IntelliSense: identifier "IBaseFilter" is undefined c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    99  34  Filters
47  IntelliSense: identifier "Quality" is undefined c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    99  57  Filters
48  IntelliSense: identifier "CMediaType" is undefined  c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    107 41  Filters // and 3 more
51  IntelliSense: identifier "IMemAllocator" is undefined   c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    166 39  Filters
52  IntelliSense: identifier "ALLOCATOR_PROPERTIES" is undefined    c:\users\umutto\desktop\projects\src\directshowwizardinstaller\vcam\vcam\filters\filters.cpp    166 62  Filters

1 个答案:

答案 0 :(得分:1)

要使用directshow过滤器,您需要安装Windows SDK并编写BaseClasses解决方案。 看看:C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\multimedia\directshow\baseclasses

之后,您需要将BaseClasses头文件和libs目录添加到项目属性中。

现在您的项目将知道DirectShow类,您可以开始更改VCam源过滤器引脚。