ActiveX playlistClear/addTarget inconsistency

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
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:

ActiveX playlistClear/addTarget inconsistency

Postby maharg » 06 Oct 2006 18:33

Hello,

I'm putting together an application in Delphi using VLC via the ActiveX control. The code (paraphrased) looks something like this:

A procedure to play an arbitrary MRL:

Code: Select all

procedure TForm1.play(mrl: String); var Parameter: array of String; begin // set parameters setLength(Parameter, 2); Parameter[0] := 'vout-filter=deinterlace'; Parameter[1] := 'deinterlace-mode=bob'; // stop and clear playlist Form1.VLCPlugin1.stop; Form1.VLCPlugin1.playlistClear; // add the new mrl Form1.VLCPlugin1.addTarget( mrl, Parameter, VLCPlayListInsertAndGo, 0); // play Form1.VLCPlugin1.play; end;
An event procedure called when button 1 is clicked, causes a file to be played:

Code: Select all

procedure TForm1.button1Click(Sender: TObject); begin // play a transport stream from a file play('d:\video\somevideo.ts'); end;
An event procedure called when button 2 is clicked, causes a multicast udp stream to be played:

Code: Select all

procedure TForm1.button2Click(Sender: TObject); begin // play a udp multicast play('udp://@227.1.0.5:1234); end;
If I click on button 1 the file somevideo.ts plays as expected.

If I click button 2 before the playback of somevideo.ts completes, then VLC switches to playing the udp multicast as expected.

If, however, I click button 2 AFTER the playback of somevideo.ts completes, then VLC plays somevideo.ts again, before playing the udp multicast. In this case it seems that the playlist is not being cleared once it has fully played out.

thanks,

Graham
--
you might think you know what you are doing

DaLord
New Cone
New Cone
Posts: 1
Joined: 23 Oct 2006 02:14
Location: Munich

Re: ActiveX playlistClear/addTarget inconsistency

Postby DaLord » 23 Oct 2006 03:24

I've had the same problem... but using this

Code: Select all

const VLCPlayListInsertAndGo = $0009; ... VLCPlugin.PlaylistClear; VLCPlugin.AddTarget(URL, null, VLCPlayListInsertAndGo, 0);
it does what it is supposed to!

Cheers!

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:

Postby maharg » 23 Oct 2006 10:41

thanks DaLord, but that hasn't resolved the problem. If the playlist (in this case containing a single file mrl) plays through to completion, then the playlist is not cleared as it should be.
--
you might think you know what you are doing

Jaco
New Cone
New Cone
Posts: 6
Joined: 28 Aug 2010 21:04

Re: ActiveX playlistClear/addTarget inconsistency

Postby Jaco » 29 Aug 2010 12:06

Hey, Im having the same problems with playing a new item in the playlist. Ive tried stop and clearing playlist and after "addtarget(newitem)" the prev item is played...

I tried all the code on this topic. Im also using Delphi 7 and VLC 1.0.3

Any suggestions?


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 4 guests