Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Delphi Misc > TMediaPlayer pr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 6052 of 6114
Post > Topic >>

TMediaPlayer problem

by MaHi <nospam@[EMAIL PROTECTED] > May 13, 2008 at 02:37 PM

Hello,


I'm working on a simple programs that has to play WMV videos based on
a Time Schedule. 

If a WMV length is less than the play time fixed in the schedule I
have to replay the video till the end time in the Schedule.

My problem is that sometimes TMediaPlayes stops from replaying my
video.

To implement the replay function I use the OnNotify event in
TMediaPlayer. The code is:

  If TraceEnabled Then WriteLn( FDebug, ' OnNotify:
['+TimeToStr(Now)+'] NotifyValue = ' + NVToStr(MP.NotifyValue) + ',
OnPlay = ' +  BoolToStr(TimeSchedule.OnPlay) + ', IsVideo = ' +
BoolToStr(TimeSchedule.IsVideo) + ', Loop = ' +
BoolToStr(TimeSchedule.OnPlay) );

  If (MP.NotifyValue = nvSuccessful)And(TimeSchedule.OnPlay)
    And(TimeSchedule.IsVideo)And(TimeSchedule.Loop) Then
   Begin
    If TraceEnabled Then WriteLn( FDebug, ' OnNotify:
['+TimeToStr(Now)+'] Re-Play del video appena concluso');
    MP.Play;
    MP.Notify := True;
   End;

TraceEnabled isa a Boolean that is TRUE if I want debug infos saved on
a text file.

For example this is the trace that i've got for a scheduel that has to
replay a video from 10:35 to 11:00 :

 OnNotify: [10.35.01] NotifyValue = nvAborted, OnPlay = -1, IsVideo =
-1, Loop = -1
 OnNotify: [10.35.01] NotifyValue = nvSuccessful, OnPlay = -1, IsVideo
= -1, Loop = -1
 OnNotify: [10.35.01] Re-Play del video appena concluso
 OnNotify: [10.35.01] NotifyValue = nvSuperseded, OnPlay = -1, IsVideo
= -1, Loop = -1
 OnNotify: [10.37.52] NotifyValue = nvSuccessful, OnPlay = -1, IsVideo
= -1, Loop = -1
 OnNotify: [10.37.52] Re-Play del video appena concluso
 OnNotify: [10.37.52] NotifyValue = nvAborted, OnPlay = -1, IsVideo =
-1, Loop = -1
 OnNotify: [10.40.44] NotifyValue = nvSuccessful, OnPlay = -1, IsVideo
= -1, Loop = -1
 OnNotify: [10.40.44] Re-Play del video appena concluso
 OnNotify: [10.40.44] NotifyValue = nvAborted, OnPlay = -1, IsVideo =
-1, Loop = -1
 OnNotify: [10.40.44] NotifyValue = nvAborted, OnPlay = -1, IsVideo =
-1, Loop = -1

the video playback restart at 10:35 , 10:37 and 10:40 and then stops.

I can't understand NotifyValue different from "nvSuccessful" (why
nvAborted? why nvSuperseded? ) but it seems that the double
"nvAborted" stops the replay.

Does anyone has some suggestion?


Thank you

LUCA
 




 1 Posts in Topic:
TMediaPlayer problem
MaHi <nospam@[EMAIL PR  2008-05-13 14:37:22 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 0:34:29 CDT 2008.