I'm working on a C code which interacts with hardware (an external USB device) and outputs video frames in realtime, which is eventually built as a DLL file:
int get_frame() {
// interacts with hardware and
// generates video frames
}
Are there specific functions to export in the DLL such that it can be used in Chrome as a video source, and if so, how to load this DLL into Chrome?
How to get this code recognized as a video source / webcam in Chrome, such that I can integrate it in a HTML page containing a <video>
element?
navigator.mediaDevices.getUserMedia({ video: true }).then(stream => { $("#cam").srcObject = stream; });
Linked topics:
Writing a virtual webcam?, Virtual webcam input as byte stream.