Have a look at
DShowPlayer[
^]
The SDK includes a debug tool called GraphEdit - you can build a dshow graph with that and then understand what code you're going to have to write to achieve it
You're going to have to understand FilterGraphs and how to use COM - there are no short cuts