views:

1108

answers:

2

I am evaluating WPF and Silverlight for a Project. I find WPF to be most suited for our purpose since we require performance, graphics support, Office compatibility and the ability to support ActiveX controls. It is also a Desktop application. However there is one area where i find Silverlight to be superior - Media support. I would like to have the WPF mediaelement control to support MPEG4 (H.264) codec. Can anyone please suggest if this is feasible somehow and if support for the same is in the roadmap of WPF?

A: 

I have some experience with WPF media element but it has some performance hit. so if u have to show image and video you can use D3DImage of WPF in SP1 of .NET 3.5 that is new control of WPF for DirectX interaction and it has better performance over media element. more on D3DImage

Firoz
Thanks for the response. The following msdn pages seem to have a more elaborate walkthrough for using D3DImage.http://msdn.microsoft.com/en-us/library/cc656785.aspxhttp://msdn.microsoft.com/en-us/library/cc656716.aspxLet me try and revert back.Thanks
Balakrishnan
I did try with D3DImage. While i could make some headway with the help of examples, i couldn't really figure out how to play Video elements using it let alone using it as a replacement of MediaElement. Any pointers to this?
Balakrishnan
http://www.codeplex.com/WPFMediaKit here is the example of playing video, DVD, Webcam and lot more using D3DImage.
Firoz
+1  A: 

The WPF MediaElement uses DirectShow under the convers (well it uses WMP, but WMP uses DShow), so as long as you have an h264 codec installed (Windows 7 comes with them), your MediaElement should be able to play h264 video.

Jeremiah Morrill