When I heard about the new, high-performance WriteableBitmap coming in .NET 3.5 my ears perked a bit. Could this be what us video nuts need to dump the WPF MediaBridge once and for all? Maybe...but probably not. The new WriteableBitmap lets you write directly to the pixel buffer and tell WPF which areas are dirty. I queried some folks who are "in the know", and it was said that the new WriteableBitmap isn't optimized for video and may not have the performance people seek in this scenario.
So I wanted to plan for the worst...and what better way than to keep on hackin'. I wanted to create an easier API than that of the WPF MediaBridge. Something where the developer does not have to know a lick of DirectShow, but can use it if they need to. Here's the plan (and the crudely done Visio diagram):
Simply put, I am going to create a WPF control. As a consumer of the control's API, you would just have to initialize it with a video width, height and color space (RGB24, YUY2, etc). Next a developer would simply send some video bytes to the control and the control would handle the rest. Voila! High performance video.
The "magic" will mostly be done behind the scenes. When the control is initialized, it will load up the "BridgeFilter", using the MediaElement. The BridgeFilter would then make a callback to the WPF application, passing the BridgeFilter's reference. When video bytes are passed to the control, the control will pass those bytes to the BridgeFilter, which in turn passes them to the EVR renderer and ultimately WPF!
I haven't begun on this project, but if anyone has any suggestions, let me know sooner than later ;).
-Jer