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;
Code: Select all
procedure TForm1.button1Click(Sender: TObject);
begin
// play a transport stream from a file
play('d:\video\somevideo.ts');
end;
Code: Select all
procedure TForm1.button2Click(Sender: TObject);
begin
// play a udp multicast
play('udp://@227.1.0.5:1234);
end;
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