I'm looking for detailed information on what decides the formats of media that MediaElement
can play, I can't seem to find any definitive source. I've read somewhere that if it can be played in WMP then MediaElement
can play it. Is this true? If it is, then my next question is where can I find the capabilities and limitations of WMP? And where does the association lie between WPF's MediaElement
and WMP? I'm looking for a better understanding of these components and video playback in WPF and have so far struggled to find anything online.
views:
54answers:
1
A:
MediaElement internally uses the WMP ActiveX. In theory, MediaElement could/should be able to play anything WMP can, but it's not always the case, for example .vob files.
When you play a file in MediaElement, the Windows Media Player ActiveX is loaded. WMP will then decide to use DirectShow or MediaFoundation paths for playing the media. The types of media it can play depends largely on what kind of codecs (DirectShow or MF) are installed on your computer. Once a media path is chosen, WPF will provide a custom presenter for the Enhanced Video Renderer so each video frame will be rendered to a D3D surface, primed for presentation within the WPF composition engine.
Jeremiah Morrill
2010-08-08 05:21:06
This is great, thanks for the explanation. Two more questions though - 1) Is there a way to see what codecs are installed on a machine that are available to Directshow and MF? 2) Any idea on what criteria is checked to decide on Directshow vs MF playback?Thanks!
Sio
2010-08-09 04:47:13
The easiest way to see what codecs are available is to use GraphEdit in the bin directory of the Windows SDK. I don't think a similar utility exists yet for MF.I'm not sure what criteria is used for using MF or DShow. My only assumption is it trys MF first and then falls back to DShow. MF in Windows 7 will supports some flavors of MPEG4, like h264 and WMV (maybe WM7, 8 and VC1).
Jeremiah Morrill
2010-08-09 19:43:45