[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework

.NET 3.5 MediaPlayer object

Logan Greenlee

4/6/2008 5:00:00 PM

I have been using the media player object for the last few weeks. I've found
several undocumented behaviors and was wondering if anyone could help.

I have a windows service that run in MTA mode. Within this service I have a
class that instantiates a MediaPlayer() object on a STA thread then opens a
video file and creates a thumbnail image of a frame closest to a time x by
using the seek position.

In theory this should work fine but it does not.

The events such as MediaOpened do not fire when the player is hosted this
way. As a result there is no way to determine when the media player has real
frame of video. I have also tried looping on certain properties that are only
set when the video is loaded such as NaturalVideoHeight. This does not work
reliably - this property can be set before the actual frame of video is
loaded within the player.

So my first question is, why are the events not fired?