Read USB camera's input edit and send the output to a virtual camera on Windows

强颜欢笑 提交于 2021-01-28 10:35:53

问题


I am working on project where I need to read a USB camera's input, put some effects on it and then send that data to a virtual camera so it can be accessed by skype etc.

I have compiled and used the vcam filter. I was also able to make a few changes in FillBuffer method. I now need to know that is it possible to send data to vcam filter from another application or do I need to write another filter.


回答1:


The vcam project you currently have as a template is the interface to other video consuming applications like Skype, those which use DirectShow API to access video capture devices and match in platform/bitness with your filter.

You are responsible for developing the rest of the supposed filter: you either access real device right in your filter (simplifying the task greatly, this is what you fill your FillBuffer with, the code that generates video from another source), or alternatively you are to implement interprocess communication so that FillBuffer implementation could transfer data from another application.

Nethier vcam nor any of standard DriectShow samples offer functionality to cover interprocess communication, and you might also need to deal with other complications: one application and multiple instances of filters to consume video, platform mismatch etc.

See also:

  • How to implement a "source filter" for splitting camera video based on Vivek's vcam?


来源:https://stackoverflow.com/questions/47015788/read-usb-cameras-input-edit-and-send-the-output-to-a-virtual-camera-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!