rss
 
comment(s)

archives
J|F|M|A|M|J|J|A|S|O|N|D
(20##) 10 9 8 7 6 5 4 3 2 1 0 <
 
DesktopWeb FormText   DirectShow and MPEG-2 (in C#)Sat, 11 Mar 2006 16:49:34 GMT # 

starting to take baby steps with DirectShow. i've downloaded a number of C# code samples for working with TV tuners, but they all fail for me at a call to RenderStream(), which should use intelligent connect to auto build the graph. it seems that the problem is because my TV tuner outputs MPEG-2, so everything breaks down at that point. now i'm trying to extend those samples to add the MPEG-2 Demultiplexer filter before calling RenderFile(). i'm assuming that i need to create the output pins and map the stream data as well. anyway, this is all just guess work at the moment.

it looks like there is a sample PSI filter with DirectShow that handles the stream mapping. i'm not comfortable enough with DS at the moment to start relying on sample filters. and i'm assuming Media Center doesn't mess with that? anyway, it seems to me like the MPEG-2 Demultiplexer filter is only half baked.

and i flat out don't know COM (was doing J2EE when that was cool), so i'm using a DirectShow wrapper on SourceForge. it has alot of tested interfaces, as well as some that are untested. just so happens the MPEG-2 crap falls in the untested category. so i basically hold my breath everytime a call is made. and there is no sample code to be found. i'm at the point where i've added the pins and need to map the streams. problem is i don't see how the managed wrapper allows me to query for interfaces on pins? and source forge is undergoing maintainence at the moment :(

so now that i'm starting to pick up a little DS, its not clear to me why MS did not provide a better wrapper. of course they threw out the performance card, but most of the code i'm seeing is people that are just trying to work with graphs ... which definitely isn't a perf problem. i think MS should have provided a managed wrapper for building graphs, and then could have played the performance card for custom filters.