VLC ActiveX Plugin v2 BUG stop() broken

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
maconsoft
New Cone
New Cone
Posts: 4
Joined: 22 Sep 2010 17:42

VLC ActiveX Plugin v2 BUG stop() broken

Postby maconsoft » 22 Sep 2010 18:08

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);

maharg
Blank Cone
Blank Cone
Posts: 14
Joined: 22 Sep 2006 09:42
VLC version: various
Operating System: Linux, Windows, OS X
Location: London
Contact:

Re: VLC ActiveX Plugin v2 BUG stop() broken

Postby maharg » 26 Jan 2011 16:50

Hi maconsoft,

Yes, at VLC 1.1.5. vlc.playlist.stop does appear to be badly broken.

I have got round this fairly reliably by using togglePause instead of stop :)

for example:

Code: Select all

procedure TfrmPlayermain.FormClose(Sender: TObject; var Action: TCloseAction); begin { n.b. as at VLC 1.1.5. pausing the playback is considerably more reliable when closing the form than stopping the playback, as calling playback.stop typically results in hung or zombied processes (check processes tab in Task Manager when testing !). GDL 26th January 2011 } LiveVLC.playlist.togglePause; repeat Application.ProcessMessages; // make sure the IPC gets done !!! until not LiveVLC.playlist.isPlaying; PostMessage(dmPlayer.ControlPanelHandle, dmPlayer.Msg_ChNotPlaying, dmPlayer.ChannelID, Application.Handle); LiveVLC.Free; end;
I've tested this about 30 times so far and it seems to be rock solid ! Lots more testing todo, but thought I'd share this promising avenue.

Let me know how you get on. I'm on Delphi 7 if that makes any difference...
--
you might think you know what you are doing

oelison
New Cone
New Cone
Posts: 1
Joined: 05 Feb 2011 23:51

Re: VLC ActiveX Plugin v2 BUG stop() broken

Postby oelison » 06 Feb 2011 00:03

Hello all.

I have the same problem with Stop() isn't working.
Pause isn't a good workaround when using streaming. It fills your memory until the programm crashes.
The same problem may apear at playitem(x). Somtimes it hung as stop().

Did't anybody know where the sourcecode is? I like to debug it.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: VLC ActiveX Plugin v2 BUG stop() broken

Postby Jean-Baptiste Kempf » 07 Feb 2011 23:59

Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 29 guests