Log in

View Full Version : multiplexing / loopbacking video for windows source


pdx
25th March 2003, 15:13
hi all,

OS: Windows platforms

here's the deal:

AFAIK when an application hooks up to a video source (for capture) provided by a video for windows (vfw) or a WDM driver (say, a video-in card) then no other application can use that video source. this means a connection to such a vfw or WDM video source is exclusive.

now, i'd need to share the same video input (coming from a simple bt8x8 chipset-based pixelview tv-board) between a few applications (mostly simple live video feed encoders), but due to this exclusive locking i can't do that. ie. the first application starts, then the next application reports that there are either no available capture drivers or they're busy.

since i've been into computer aided music a long time, and i ran into kinda the same problem with MIDI connections, there was a great software called midi loopback driver that shared one MIDI input/output port for 4-5 applications.

_my question is_: is there a similar "loopback" driver for vfw or WDM? meaning: a virtual device driver that would yield 4-5 or more vfw or WDM sources which simply come from multiplexing one "real" source?

thanks,
-p

fellaw
25th March 2003, 16:22
With WDM, you won't need such a driver. There's a DirectShow filter called "SmartTee". It justs splits the video stream for two previews. You can hook several SmartTees in a row(that would give you +1 output per SmartTee). But that will consume much performance, depending on the number of filters. Maybe you could utilize that filter for your purposes. I've read somewhere that you shouldn't use the SmartTee with computers having a < 1 Ghz CPU. You can test that SmartTee with graphedit.

pdx
26th March 2003, 13:59
you mean that you can select the same WDM source for many applications?

fellaw
26th March 2003, 18:02
Maybe didn't you understand the functionality of that SmartTee. Only one app. can access a video source, you can't break that rule. What you can do is: Split the video stream of the source with the SmartTee filter. You get 2 identical streams. You can split those again, now you get 4 outputs of the same source instead of 1.
I've uploaded an example graph here (http://people.freenet.de/TC.Xan/images/st-example.png).
When I press play, I'm getting 4 active movie windows with identical videos. Instead of the AVI decompressors & Video Renderers, you can hook up other filters, e.g. a video compressor.
So what you have to this setting up a graph similar to this in your first app. It should be possible to remote connect to filters of that graph from other applications. Graphedit offers such an option.
I'm not into WDM programming, thus I don't know it exactly.