Basic Video Keeps Locking Computer
|
12-23-2012, 12:40 PM
Post: #1
|
|||
|
|||
Basic Video Keeps Locking Computer
I'm using Basic Video with Delphi 2010. In simple terms I've got one TVLDSVideoPlayer, one TVLImageDisplay and three Buttons. Each button triggers the display of a windows media file.
I'm having a hard time finding the correct sequence of Methods and Property calls to keep the application from freezing up. This seems to only happen when the buttons are clicked in rapid succession one after the other. I purposely have done this to simulate an end user trying to break the application. What steps and in what order do I need to perform as to prevent the application from locking up? Any help with be greatly appreciated. Here is the code for each of the three movie buttons: ---------------------------------------------------- procedure TfmMainScreen.MovieButton1Click(Sender: TObject); begin VLDSVideoPlayer1.Pause; VLDSVideoPlayer1.Stop; VLDSVideoPlayer1.Close; Application.ProcessMessages; VLImageDisplay1.Clear; VLDSVideoPlayer1.FileName := 'Movie01.wmv'; VLImageDisplay1.Visible := True; TrackBar1.Enabled := True; PauseButton.Enabled := True; StopButton.Enabled := True; // Make sure the component is not paused. TrackBar1.WindowProc := SliderWndProc; VLDSVideoPlayer1.Open; VLDSVideoPlayer1.Paused := False; VLDSVideoPlayer1.Start(); end; procedure TfmMainScreen.MovieButton2Click(Sender: TObject); begin VLDSVideoPlayer1.Pause; VLDSVideoPlayer1.Stop; VLDSVideoPlayer1.Close; Application.ProcessMessages; VLImageDisplay1.Clear; VLDSVideoPlayer1.FileName := 'Movie02.wmv'; VLImageDisplay1.Visible := True; TrackBar1.Enabled := True; PauseButton.Enabled := True; StopButton.Enabled := True; // Make sure the component is not paused. TrackBar1.WindowProc := SliderWndProc; VLDSVideoPlayer1.Open; VLDSVideoPlayer1.Paused := False; VLDSVideoPlayer1.Start(); end; procedure TfmMainScreen.MovieButton3Click(Sender: TObject); begin VLDSVideoPlayer1.Pause; VLDSVideoPlayer1.Stop; VLDSVideoPlayer1.Close; Application.ProcessMessages; VLImageDisplay1.Clear; VLDSVideoPlayer1.FileName := 'Movie03.wmv'; VLImageDisplay1.Visible := True; TrackBar1.Enabled := True; PauseButton.Enabled := True; StopButton.Enabled := True; // Make sure the component is not paused. TrackBar1.WindowProc := SliderWndProc; VLDSVideoPlayer1.Open; VLDSVideoPlayer1.Paused := False; VLDSVideoPlayer1.Start(); 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: 4 Guest(s)