Page 1 of 1

Plugin v2 BUG when STOP()

Posted: 22 Sep 2010 23:47
by maconsoft
This is code work OK.
1. press button "Button1" - start play
2. press button "Button2" - stop play
3. press button "Button2" - destroy TVLCPlugin2

Code: Select all

procedure TForm1.Button1Click(Sender: TObject); begin vlc:=TVLCPlugin2.Create(self); vlc.Parent:=Self; vlc.Top:=0; vlc.Left:=0; vlc.Width:=300; vlc.Height:=200; vlc.Visible:=true; vlc.playlist.add('udp://@224.100.0.1:1234','udp://@224.100.0.1:1234',null); vlc.playlist.playItem(0); end; procedure TForm1.Button2Click(Sender: TObject); begin vlc.playlist.stop; vlc.playlist.clear; end; procedure TForm1.Button3Click(Sender: TObject); begin vlc.Destroy; {or FreeAndNil(vlc);} end;
This is code not working! why?

Code: Select all

procedure TForm1.Button1Click(Sender: TObject); begin vlc:=TVLCPlugin2.Create(self); vlc.Parent:=Self; vlc.Top:=0; vlc.Left:=0; vlc.Width:=300; vlc.Height:=200; vlc.Visible:=true; vlc.playlist.add('udp://@224.100.0.1:1234','udp://@224.100.0.1:1234',null); vlc.playlist.playItem(0); end; procedure TForm1.Button2Click(Sender: TObject); begin vlc.playlist.stop; vlc.playlist.clear; sleep(10000); vlc.Destroy; {or FreeAndNil(vlc);} end;
I play clips by circle.
Sequence of actions:
1. stop playing clip
2. clear playlist
3. add new clip to playlist
4. start play clip.

At a playing stop periodically VLC broken.

How correctly to stop play?
How correctly to destroy object?

Code: Select all

vlc.playlist.stop; vlc.playlist.clear; vlc.playlist.add('udp://@224.100.0.1:1234','udp://@224.100.0.1:1234',null); vlc.playlist.playItem(0);

Re: Plugin v2 BUG when STOP()

Posted: 23 Sep 2010 13:10
by maconsoft
This code works:

Code: Select all

showmessage('stop'); /// modal message VLC.playlist.stop; VLC.playlist.items.clear; VLC.Visible:=false;
This code don't works:

Code: Select all

sleep(1000); VLC.playlist.stop; VLC.playlist.items.clear; VLC.Visible:=false;

Re: Plugin v2 BUG when STOP()

Posted: 05 Oct 2010 10:39
by maconsoft
The BUG in the ActiveX VLC ver. 1.1.4 when the stop playing.
Problem not regular, Problem casual.

Can play 10 clips and hang on the stoping clip #10 .
Аnd hang on the stoping clip #20.

Install ver. 1.0.0 and no have BUG when the stoping playing.