Log in

View Full Version : Windows Media Player SDK issue


briwei
17th March 2010, 23:22
Sorry if this is the wrong place, but this looked like the most likely forum for player related issues. If it is better suited to "Programming and Hacking-> Development" let me know and I'll move it.

I have embedded a WMP 11 control in a .Net application. It is compiled and run locally. It's not web based. The application is intended as a playback test tool for stress testing WMP using different codecs. When the source file is ASP content in an AVI file, it plays fine. When the source content is AVC content in an MKV file, all I get is a black window. The progress bar moves as though it is playing back and it exits when
done. The same MKV file can be played in the regular desktop version of WMP 11. A version check shows the same version number for WMP 11 and my .Net component (AxWindowsMediaPlayer).

Anyone have any thoughts on where I could look? I've done quite a few searches on Google with a wide assortment of keywords, but have come up with nothing applicable. I expected AxWindowsMediaPlayer to behave exactly as the desktop WMP does, so I am at something of a loss.

Thanks in advance for any guidance you can provide,
Brian

briwei
18th March 2010, 18:18
Self-replying because a bit of trial and error seems to have solved it.

There is a property on the AxWindowsMediaPlayer object that seems like it changes the renderer behind the scenes. I'm not sure of the exact mechanics, but let's say your instance of the AxWindowsMediaPlayer is wmpObject. In that case, changing the value of wmpObject.windowless video from TRUE to FALSE resolves the issue.

The only documentation in the SDK on this property is:

Property Value

A System.Boolean value indicating whether the Windows Media Player control renders video in windowless mode. The default value is false.

Remarks

By default, an embedded Windows Media Player control renders video in its own window within the client area. When windowlessVideo is set to true, the Windows Media Player object renders video directly in the client area, so you can apply special effects or layer the video with text.

So, if anyone was curious, but didn't have the answer, now we do. Sort of.

Thanks,
Bri