I am writing a multi-thread application in C# to process webcam input concurrently. Is there any code project that can create a duplicate of the webcam as a new device, so each thread can take either the real device or the virtual device and not interfere with each other?
Many software claimed to "split" webcam (used for effect and filter), but once the device they created is being used, there is no way to open the real device.
In other words, I need the webcam to act as two, and with each one of them being access at the same time.
Video capture devices are typically "exclusive mode" use resources. If someone is working with video capture, the device is no longer available for concurrent use, for objective reasons. If you need to share the incoming video feed, you need to take care of this yourself. Software that splits through virtual devices typically adds processing overhead and limits flexibility, that is is significantly worse compared to talking to real device, which is the price of being able to split the live feed at all.
来源:https://stackoverflow.com/questions/25190503/is-there-a-way-to-create-a-duplicate-device-of-webcam