From the prior post about getting thumbnails from a video in .Net, it was just prototype code and wasn’t properly abstracted. Now it is time to fix it. We’ll create a class called VideoScreenShot. This class will function in both an asynchronous and synchronous mode. This still could be improved by queuing up work but this is a nice refactoring.
To get access to the tester app, head over to codeplex and source code can be found there too!
public delegate void CaptureWorkerDelegate(BitmapFrame frame, object state);
public static void CaptureScreenAsync(Uri source, TimeSpan timeSpan, object state,
CaptureWorkerDelegate finalWorkerPrimary)
{
CaptureScreenAsync(source, timeSpan, -1,
state, finalWorkerPrimary, null);
}
public static void...