Playing a Media File

Naturally one would have to use COM interop in having to use DirectShow. This creates a burden for the developer of a multimedia application. MediaFramework strives to remove that burden from the developer so the developer can concentrate on other parts of the application. COM interop can still be used just in case MediaFramework has not implemented a feature.

To play a media file with MediaFramework in C# requires only three lines of code to be typed by the developer.

GraphBuilder graphBuilder = new GraphBuilder();

This is simpler for developers than having to deal with COM interop and dealing with error handling as MediaFramework converts the HRESULTs into .NET exceptions with the proper error messages.