为我的虚拟网络摄像头提供输入 [英] Provide input to my virtual webcam

查看:87
本文介绍了为我的虚拟网络摄像头提供输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我编译这个项目,创建一个包含随机数据的虚拟网络摄像头:

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.


  1. CSource 是过滤器的基类,并实现
    IBaseFilter 界面。
  2. CSourceStream 是输出引脚的基类,并实现
    IPin interface。
  1. CSource is the base class for the filter and implements the IBaseFilter interface.
  2. 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 / dd377481%28VS.85%29.aspx?f = 255& MSPPError = -2147217396

https://msdn.microsoft.com/en-us/library/dd757807(v=vs.85).aspx

希望这可以帮到你。

最好的问候,

Sera Yu

Best Regards,
Sera Yu


这篇关于为我的虚拟网络摄像头提供输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆