Re: Want to display the last frame of the media in the playlist

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Tue, 8 Nov 2005 08:12:12 -0800, "John"
<John@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

>I am using the ActiveX component in Delphi for the WindowsMediaPlayer 10. I
>have created the playlist that is needed and play the file. I am trying to
>have the video stop on the last frame in the file.

You should be able to set
WindowsMediaPlayer1.settings.Set_Mode("showframe", TRUE)

(Or whatever the equivalent syntax is in Delphi, which I have no idea
!)

> Should markers be put in
>the wpl file and go to the marker? I have set the currentposition to the end
>time (duration) but it seems to either keep playing to the next file in the
>playlist (I want to play one file at a time) or goes to the wrong frame(maybe
>due to keyframes). I am using a playlist(wpl file) using wmv files within
>the playlist. The playlist is used since a very noticeable lag time occurred
>when playing the files separately.
>
>Will using markers have the last frame show in the video? If so how are the
>markers set? Is there a different approach with a setting to keep the last
>frame displayed after playing the media?
>
>WPL file:
><?wpl version="1.0"?>
><smil>
> <head>
> <meta name="Generator" content="Microsoft Windows Media Player --
>10.0.0.3802"/>
> <author/>
> <title>All</title>
> </head>
> <body>
> <seq>
> <media src="\\..\35569.wmv"
>tid="{B8AF3018-D023-442C-873A-3D64CEA184EA}"/>
> <media src="\\..\35570.wmv"
>tid="{8E80668B-FDF3-4F32-9AEF-D8BE9C4AF14F}"/>
> </seq>
> </body>
></smil>
>
>
>Some code follows:
>
> WindowsMediaPlayer1.currentPlaylist := WMPPlaylist ;
> For i := 0 To WindowsMediaPlayer1.currentplaylist.Count -1 Do
> Begin
> If WindowsMediaPlayer1.currentplaylist.item[i].name = sName Then
> Begin
> bLock := TRUE ;
> WindowsMediaPlayer1.Perform(wm_SetRedraw,0,0) ;
>
> WindowsMediaPlayer1.controls.stop ;
>
>
>WindowsMediaPlayer1.controls.Set_currentItem(WindowsMediaPlayer1.currentPlayList.Item[i]) ;
>
> WindowsMediaPlayer1.controls.play ;
>
> While (WindowsMediaPlayer1.playState <> wmppsReady) and
> (WindowsMediaPlayer1.controls.CurrentPosition { in seconds } <
>WindowsMediaPlayer1.currentMedia.duration { HH:MM:SS.fract } ) Do
> Begin
> { Unlock as soon as the mediaplayer starts playing }
> If bLock and (WindowsMediaPlayer1.playState = wmppsPlaying) Then
> Begin
> bLock := FALSE ;
> WindowsMediaPlayer1.Perform(wm_SetRedraw,1,0) ;
> End ;
>
> If bStop or bMisRec Then
> Begin
> WindowsMediaPlayer1.settings.mute := TRUE ;
> WindowsMediaPlayer1.controls.pause ;
> WindowsMediaPlayer1.controls.CurrentPosition :=
>WindowsMediaPlayer1.currentMedia.duration -1 ;
> WindowsMediaPlayer1.controls.play ;
>
> WindowsMediaPlayer1.controls.currentMarker := 1 ;
>
> End ;
>
> Application.HandleMessage ;
> End ;
>
> { Pause on the last frame }
> WindowsMediaPlayer1.controls.pause ;
> While WindowsMediaPlayer1.controls.CurrentPosition <>
>WindowsMediaPlayer1.currentMedia.duration Do
> Begin
> WindowsMediaPlayer1.controls.CurrentPosition :=
>WindowsMediaPlayer1.currentMedia.duration ;
> WindowsMediaPlayer1.controls.pause ;
> RedrawWindow( Handle, nil, 0,
> RDW_ERASE or RDW_INVALIDATE or RDW_ERASENOW or RDW_UPDATENOW or
> RDW_ALLCHILDREN );
>
> Application.HandleMessage ;
> Invalidate ;
>
> If FloatToStr(WindowsMediaPlayer1.controls.CurrentPosition) =
>FloatToStr(WindowsMediaPlayer1.currentMedia.duration) Then
> Break ;
> End ;

.



Relevant Pages

  • Want to display the last frame of the media in the playlist
    ... have created the playlist that is needed and play the file. ... when playing the files separately. ... Will using markers have the last frame show in the video? ...
    (microsoft.public.windowsmedia.sdk)
  • Re: Modify frame rate of avi and asf file using Windows Media Obje
    ... for capture from a capture device but chose to use WMP for its relative ease ... when the frame is actually painted, ... Assuming you are using WindowsMediaPlayer to play the files, ... but it has no way of knowing with AVI files. ...
    (microsoft.public.windowsmedia.sdk)
  • Re: Adjusting headset preload
    ... fiber fork with CF steerer tube on a frame with a King headset ... As loose as possible with zero play - there's probably about as much ... ground and frame held in a way where play can be felt. ... Lift the whole bike up without holding the fork/bars, ...
    (rec.bicycles.tech)
  • Re: animated gifs wont play at the correct speed!
    ... when I play the file in PowerPoint 2003 and in Windows Media Player 9. ... suspect that they just can't handle the frame rate that you have set. ... > I've set the frame durations to various lengths. ...
    (microsoft.public.powerpoint)
  • Re: The Electric Upright
    ... joint if you show up with a violin/viola/cello/2xb with markers. ... They will point to those things and said: only 5 yearsold have those on their instruments, and we ALL know that it only take "a while" to play and figure out the intonation. ...
    (rec.music.makers.builders)