为我的虚拟网络摄像头提供输入 [英] Provide input to my virtual webcam
问题描述
你好,
我编译这个项目,创建一个包含随机数据的虚拟网络摄像头:
I compile this project which creates a virtual webcam with random data in it:
https://github.com/rdp/open-source-directshow-video-capture-demo-filter/tree/master/vcam_vs_2010_demo_video_capture_project/vcam_vs_2010
https://github.com/rdp/open-source-directshow-video-capture-demo-filter/tree/master/vcam_vs_2010_demo_video_capture_project/vcam_vs_2010
我想要修改项目以便能够"提供"虚拟网络摄像头带有来自opencv图像的字节流数据。
I want to modify the project to be able to "feed" the virtual webcam with my byte stream data from opencv image.
有人可以给我一些示例或提示吗?
Can someone give a me examples or tips to start?
推荐答案
你好bird12358,
Hi bird12358,
感谢您在这里发帖。
>>我想修改项目以便能够"提供"虚拟网络摄像头带有来自opencv图像的字节流数据。
有人可以给我一些示例或提示吗?
对于这种情况,我建议你使用DirectShow。
For this case, I will suggest you use DirectShow.
DirectShow基类包括两个支持推送源的类:
CSource 和
CSourceStream 。
The DirectShow base classes include two classes that support push sources: CSource and CSourceStream.
- CSource 是过滤器的基类,并实现
IBaseFilter 界面。
- CSourceStream 是输出引脚的基类,并实现
IPin interface。
- CSource is the base class for the filter and implements the IBaseFilter interface.
- CSourceStream is the base class for the output pins, and implements the IPin interface.
以下是一些文件供您参考。
Here are some documents for you as references.
https://msdn.microsoft.com/en-us/library/dd757807(v=vs.85).aspx
希望这可以帮到你。
最好的问候,
Sera Yu
Best Regards,
Sera Yu
这篇关于为我的虚拟网络摄像头提供输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!