CPU Usage (USB Cam) Directshow 12% vs MediaKit 45%

Mar 23, 2011 at 7:28 PM

First off, great job Jer. I am using MediaKit to display live video from a webcam. When I compare the performance of Mediakit to using Directshow directly in the app - I see a significant difference in CPU Usage as indicated in the subject. The graphs created by both methods are identical down to the mediatypes on the pins. This would put a major damper on my ability to use MediaKit.

 

Is this expected? Is there anything that can be done to improve this?

Mar 31, 2011 at 5:10 PM

I get similar results with a tv tuner (very identical code to webcam). I haven't been able to lock down a culprit either. Playing just the graph results in about half the cpu usage for me. Understandably there is alot going on and some WPF overhead but I've been wondering if there's something specific to USB tuner/cams that would degrade performance in mediakit? colorspace possibly?