Werbung: SecurityConsole.de verwaltet Ihre Computer mit Security Essentails aus der Cloud!
30 Tage kostenfrei testen und 20% Rabatt für Ihre Bestellung mit Promocode: WBF2685582
(Promocode gültig bis 31.12.2011)

Group:  English: Entertainment » microsoft.public.windowsmedia.sdk
Thread: How to trigger an event on reaching specific media position?

HTVi
TV Discussion Newsgroups

How to trigger an event on reaching specific media position?
wk <saurabh9[ at ]gmail.com> 5/3/2007 3:26:43 AM
Hi,
I need to create a plugin for stand alone windows media player 10 or
11(preferably 11). I need to reposition the movie current position,
once it reaches say time position 01:28:32, so is there an effecient
way for the player sdk to raise an even when this time is reached, so
that I can do a seek to the new position?

The video might be AVI or MPG.

Please help.

Please note I do not need to do this for an embedded player control.

Re: How to trigger an event on reaching specific media position?
RickH <passport[ at ]windcrestsoftware.com> 5/10/2007 3:20:14 PM
On May 2, 10:26 pm, wk <saura...[ at ]gmail.com> wrote:
[Quoted Text]
> Hi,
> I need to create a plugin for stand alone windows media player 10 or
> 11(preferably 11). I need to reposition the movie current position,
> once it reaches say time position 01:28:32, so is there an effecient
> way for the player sdk to raise an even when this time is reached, so
> that I can do a seek to the new position?
>
> The video might be AVI or MPG.
>
> Please help.
>
> Please note I do not need to do this for an embedded player control.


You can physically add a marker to the media file (using an SDK
downloadable from Microsoft), then add a handler for the marker events
in your code.

Or you can do what I do and imbed WMP in my application and have a
separate service timer kick off every 500ms to check the current
positon of the player every half second.

Unfortunately both ways are "klugy" unless/until WMP has some sort of
"marker collection" that could be populated at run time with your
milestones. Currently there is no way to on-the-fly add markers on a
"per play" basis, (that I know of), you have to physically modify the
media file itself and imbed the markers (arghhhhh). (Maybe if I'm not
the only one asking Microsoft to add a markers collection to the
interface they will do it in the next version)


Re: How to trigger an event on reaching specific media position?
"Alessandro Angeli" <nobody[ at ]nowhere.in.the.net> 5/10/2007 4:16:23 PM
From: "RickH"

[Quoted Text]
> You can physically add a marker to the media file (using
> an SDK downloadable from Microsoft), then add a handler
> for the marker events in your code.

Markers do not cause any event to be fired, they are just
jump targets. What you want are scripts (ASF scripts
strings, not actual scripting programs).

--
// Alessandro Angeli
// MVP :: DirectShow / MediaFoundation
// mvpnews at riseoftheants dot com
// http://www.riseoftheants.com/mmx/faq.htm


Re: How to trigger an event on reaching specific media position?
"AUGE_OHR" <AUGE_OHR_NOSPAM_[ at ]CSI.COM> 5/10/2007 4:48:40 PM
hi,

[Quoted Text]
> I need to create a plugin for stand alone windows media player 10 or
> 11(preferably 11). I need to reposition the movie current position,
> once it reaches say time position 01:28:32, so is there an effecient
> way for the player sdk to raise an even when this time is reached, so
> that I can do a seek to the new position?
>
> Please note I do not need to do this for an embedded player control.

i do not know how to write a plugin, but with ActiveX you just have to
ask for oPlayer:Controls:CurrentPosition(). (SDK 9/10)
when reached just :pause() it, set new oPlayer:Controls:CurrentPosition()
and :play() again.

greetings by OHR
Jimmy


Re: How to trigger an event on reaching specific media position?
RickH <passport[ at ]windcrestsoftware.com> 5/10/2007 7:14:59 PM
On May 10, 11:16 am, "Alessandro Angeli" <nob...[ at ]nowhere.in.the.net>
wrote:
[Quoted Text]
> From: "RickH"
>
> > You can physically add a marker to the media file (using
> > an SDK downloadable from Microsoft), then add a handler
> > for the marker events in your code.
>
> Markers do not cause any event to be fired, they are just
> jump targets. What you want are scripts (ASF scripts
> strings, not actual scripting programs).
>
> --
> // Alessandro Angeli
> // MVP :: DirectShow / MediaFoundation
> // mvpnews at riseoftheants dot com
> //http://www.riseoftheants.com/mmx/faq.htm


I was referring to using the MarkerHit event:


http://msdn2.microsoft.com/en-us/library/bb262020.aspx


[Visual Basic]
Private Sub player_MarkerHit(
sender As Object,
e As _WMPOCXEvents_MarkerHitEvent
) Handles player.MarkerHit

[C#]
private void player_MarkerHit(
object sender,
_WMPOCXEvents_MarkerHitEvent e
)


But it appears the OP wants to write a new plug in for stand alone
WMP, not use the activeX control.




Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net
Suche nach Orten, Städten, Postleitzahlen, Vorwahlen, Kfz-Kennzeichen