Basic Video Keeps Locking Computer
|
12-24-2012, 03:45 AM
Post: #5
|
|||
|
|||
RE: Basic Video Keeps Locking Computer
(12-24-2012 01:07 AM)Dave Wrote: Which versions are you using? (lab and compiler)Delphi 2010 Professional I'm using a special version of Lab that Boian created for Delphi 2010 to allows the VLImageDisplay to display a smooth output when stretched. The VLImageDisplay includes RenderModes: rmCubic, rmFast, rmLankzos, rmLinear, rmNearestNeighbor, rmSuper I think I mave have been able to get this to work by setting the VLDSVideoPlayer1.CurrentFrame := (VLDSVideoPlayer1.FramesCount -4) before calling the VLDSVideoPlayer1.Stop method. I'm using an Int64 variable called VideoFrames to set the VLDSVideoPlayer1.CurrentFrame property. Here is the code I'm using. I know you mentioned that Pause and Paused are practically obsolete, but I have a Pause/Play toggle button that makes use of them. Please let me know if anything glares at you. ---------------------------------------------------------------- procedure TfmMainScreen.MovieButton1Click(Sender: TObject); begin MovieButton1.Enabled := False; Image321.BringToFront; DisableMovieButtons; if VideoFrames > 0 then begin VLDSVideoPlayer1.CurrentFrame := VideoFrames-4; Application.ProcessMessages; end; VLDSVideoPlayer1.Stop; StatusBarUpdate(1); VLDSVideoPlayer1.FileName := 'Movie01.wmv'; VideoFrames := VLDSVideoPlayer1.FramesCount; VLImageDisplay1.Visible := True; TrackBar1.Enabled := True; PauseButton.Enabled := True; StopButton.Enabled := True; // Make sure the component is not paused. TrackBar1.WindowProc := SliderWndProc; VLImageDisplay1.BringToFront; VLDSVideoPlayer1.Open; VLDSVideoPlayer1.Paused := False; VLDSVideoPlayer1.Start(); EnableMovieButtons(0); end; ---------------------------------------------------------------- procedure TfmMainScreen.MovieButton2Click(Sender: TObject); begin MovieButton1.Enabled := False; Image321.BringToFront; DisableMovieButtons; if VideoFrames > 0 then begin VLDSVideoPlayer1.CurrentFrame := VideoFrames-4; Application.ProcessMessages; end; VLDSVideoPlayer1.Stop; StatusBarUpdate(2); VLDSVideoPlayer1.FileName := 'Movie02.wmv'; VideoFrames := VLDSVideoPlayer1.FramesCount; VLImageDisplay1.Visible := True; TrackBar1.Enabled := True; PauseButton.Enabled := True; StopButton.Enabled := True; // Make sure the component is not paused. TrackBar1.WindowProc := SliderWndProc; VLImageDisplay1.BringToFront; VLDSVideoPlayer1.Open; VLDSVideoPlayer1.Paused := False; VLDSVideoPlayer1.Start(); EnableMovieButtons(0); end; ---------------------------------------------------------------- procedure TfmMainScreen.MovieButton3Click(Sender: TObject); begin MovieButton1.Enabled := False; Image321.BringToFront; DisableMovieButtons; if VideoFrames > 0 then begin VLDSVideoPlayer1.CurrentFrame := VideoFrames-4; Application.ProcessMessages; end; VLDSVideoPlayer1.Stop; StatusBarUpdate(3); VLDSVideoPlayer1.FileName := 'Movie03.wmv'; VideoFrames := VLDSVideoPlayer1.FramesCount; VLImageDisplay1.Visible := True; TrackBar1.Enabled := True; PauseButton.Enabled := True; StopButton.Enabled := True; // Make sure the component is not paused. TrackBar1.WindowProc := SliderWndProc; VLImageDisplay1.BringToFront; VLDSVideoPlayer1.Open; VLDSVideoPlayer1.Paused := False; VLDSVideoPlayer1.Start(); EnableMovieButtons(0); end; ---------------------------------------------------------------- |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Basic Video Keeps Locking Computer - CapeCodGunny - 12-23-2012, 12:40 PM
RE: Basic Video Keeps Locking Computer - Dave - 12-23-2012, 09:30 PM
RE: Basic Video Keeps Locking Computer - CapeCodGunny - 12-23-2012, 11:57 PM
RE: Basic Video Keeps Locking Computer - Dave - 12-24-2012, 01:07 AM
RE: Basic Video Keeps Locking Computer - CapeCodGunny - 12-24-2012 03:45 AM
RE: Basic Video Keeps Locking Computer - Dave - 12-24-2012, 05:20 AM
RE: Basic Video Keeps Locking Computer - CapeCodGunny - 12-24-2012, 01:55 PM
|
User(s) browsing this thread: 1 Guest(s)