Discussion:
Problems with mkv playback in .Net embedded WMP 11
(too old to reply)
briwei
2010-03-16 22:10:50 UTC
Permalink
Sorry if this is a n00b type question, but I have been digging and
have come up empty thus far. I have embedded a WMP 11 control in
a .Net application. 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 expected
AxWindowsMediaPlayer to behave exactly as the desktop WMP does, so I
am at something of a loss.

And if you don't have an answer, can you point me in the direction of
someone who might?

Thanks in advance!
Brian
briwei
2010-03-18 17:21:45 UTC
Permalink
Post by briwei
Sorry if this is a n00b type question, but I have been digging and
have come up empty thus far. I have embedded a WMP 11 control in
a .Net application. 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 expected
AxWindowsMediaPlayer to behave exactly as the desktop WMP does, so I
am at something of a loss.
And if you don't have an answer, can you point me in the direction of
someone who might?
Thanks in advance!
Brian
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
Alessandro Angeli
2010-03-18 17:40:48 UTC
Permalink
From: "briwei"
Post by briwei
There is a property on the AxWindowsMediaPlayer object
that seems like it changes the renderer behind the
scenes.
It doesn't change the renderer but the renderer's mode of
operation.
Post by briwei
I'm not sure of the exact mechanics, but let's
If you are interested:
http://msdn.microsoft.com/en-us/library/dd390956.aspx.
Post by briwei
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 default is false so, if it it were set to true, you
changed it yourself. Besides the fact that windowless mode
is more or less broken in WMP, if you are testing it, it is
not a good idea to test it in non-default conditions that
99% of the users will never see.

This goes further: an embedded WMP behaves somewhat
differently with respect to codecs than the stand-alone WMP
so, to test it reliably, you should test the stand-alone
application (unless you are interested in the behavior of
the embedded control).
Isn't the remark section clear enough?
--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm
Loading...