views:

38

answers:

1

Is looking for a way of rendering a byte stream using DirectShow. IGraphBuilder.RenderFile already does the heavy lifing when the stream is in a file on disk, but I can't seem to find a good example of how to provide the data myself using a stream into the filter graph. I'm a total newbie to DirectShow, so from my point I have a stream that I would like to push in as source to the rendering graph instead of having it read from a file.

(As a side note, I'm ultimately trying to get this to work on WindowsCE using the port of DirectShowNet for CompactFramework, see here, but I guess part one is just trying to figure out how it works on the full framework. On CE I basically get an open stream and nowhere to save it to, so I just have to stream directly to DirectShow)

A: 

In order to provide media samples to a graph from a socket, you must build your own source filter. The source filter must do the job of connecting/authenticating with a stream server, then turn the TCP/UDP stream into discrete media samples that can be passed downstream via your filters output pin(s).

For the sake of performance, you may consider implementing your filter in C++ (Microsoft don't provide a managed API for DirectShow for a reason...)

freefallr