I have an application that receives video samples from a capture card through DirectShow. Then the application performs some processing and sends the video signal over the network. Now I want to duplicate this video signal, so that other software that supports DirectShow (for example, Skype) can also use the original input signal.
I know that you can create Tee filters in DirectShow, for example, the one used to split the video signal for recording and preview. However, as I understand it, this filter is useful only in one graph, i.e. I cannot use it to transfer videos from my process, for example, to Skype.
I also know that I can write my own video source, but this will work in the process of using the consumer application. The problem is that I cannot put the logic of my original application in such a video source filter.
The only solution I could think of was my application that writes frames to a shared memory block and a video source filter that reads from there. Synchronization will be performed using a common mutex or so. Could this work? I especially don't like the sync part?
And more importantly, is there a better solution to solve this problem?
source
share