Page 1 of 1

Calling procedure playlist.stop never returns

Posted: 22 Apr 2015 20:07
by wultna
Hi there,

im new here so I first want to say hello.
My name is Robert, i'm 27 years old and live in Germany.

At first I would like to say that I'm searching for a solution of my problem since a couple of hours. There are some threads about this issue already, but I've never read about a solution for it. Maybe there isn't a solution but a workaround.

Windows: Windows 7 X64 SP1
Programming Laguage: Delphi (Embarcardero Delphi XE4)
VLC-Version: 2.2.0, 32 bit


I write a little programm which is capable of showing multiple (2) network streams (surveillance cameras). It is also connected with the ActiveX-Plugin of the SIP-Client "Phoner". In case of a telephone call depending on the incoming phone number my program has to open the video stream of the designated camera. If there is no call in proceed, the program should play all streams. The program is made for door station use.

My simple problem is that when a phone call occours and the program does call the playlist.stop-procedure to stop the other streams the procedure never returns and freezes the whole thread. No Exception, no debug message.

opening and formating the stream:

Code: Select all

FVideoStation11.VLCPlugin.Visible := true; FVideoStation11.VLCPlugin.Show; FVideoStation11.VLCPlugin.playlist.add(Form1.FStation1.VideoURL2, Form1.FStation1.VideoURL2, '--VLCPlayListReplace :network-caching=' + Form1.FStation1.CacheLength); FVideoStation11.VLCPlugin.Height := 360; FVideoStation11.VLCPlugin.Width := ((Screen.Width - 41) div 2) + ((Screen.Width - 41) mod 2) - 1; FVideoStation11.VLCPlugin.Left := 0; FVideoStation11.VLCPlugin.playlist.play;
buggy sequence:

Code: Select all

FVideoStation11.VLCPlugin.playlist.stop; FVideoStation11.VLCPlugin.playlist.clear; FVideoStation11.VLCPlugin.Visible := false; FVideoStation11.Visible := false;
All ActiveX-Calls are made from one thread to never get in trouble with self-caused deadlocks. The Service Thread uses CoInitialize.

First I directly placed the Display on the main form of my program. This caused the issue on every time I called the procedure so I contained every VLC-ActiveX-Object in an own frame. Better, but on every 3 - 6 call of the procedure freezes anyway. Is there any workaround or fix to solve that problem? Pausing the Stream is not helpful because the paused stream persists in playlist an is buffering until running out of memory.

I would be very grateful if someone could tell me a solution.

Kind regards,


Robert

Maybe there is a way to interrupt the call hard if a timer runs out?

Re: Calling procedure playlist.stop never returns

Posted: 02 May 2015 20:12
by Jean-Baptiste Kempf
What format of streams is it?