vlc got my program stuck

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
1234yess
New Cone
New Cone
Posts: 2
Joined: 21 Jul 2016 09:35

vlc got my program stuck

Postby 1234yess » 21 Jul 2016 09:46

Hello,

I am using vlc version 2.2.4 in vb.net (axvlcplugin2)
I making a small program that taking 4 videos and streaming them, the program replacing the videos every 30 second

I played the media via this code:

Code: Select all

Dim uri = New Uri("C:\Users\xxx\Desktop\der\60\checkVlcnews\The Boys.mp4") AxVLCPlugin21.playlist.add(uri.AbsoluteUri) AxVLCPlugin21.playlist.play()
And stop the media via this code:

Code: Select all

If (AxVLCPlugin21.playlist.isPlaying = True) Then AxVLCPlugin21.playlist.stop() End If AxVLCPlugin21.playlist.items.remove(0) AxVLCPlugin21.playlist.items.clear()
This is the code for all the vlc objects.

The problem is that after some time my program got stuck in the command: "AxVLCPlugin21.playlist.stop()" and it doesn't responding-and it cause a deadlock.
This problem can occur after a few hours (about 3 hours) ,I tried to reboot my computer and then it worked for about 23 hour but in the second run it worked as always (for about 4-3 hours)

I tried to find the cause for this problem –but I didn’t found any.
I searched in my windows resource and I found that the cpu is very high –about 80% ,can it be that the problem is because the cpu?

I hope you can help me and tell me if you know about this problem and what is the solution
Thanks in advance

da2424
Cone that earned his stripes
Cone that earned his stripes
Posts: 310
Joined: 16 Apr 2013 16:57

Re: vlc got my program stuck

Postby da2424 » 21 Jul 2016 22:27

No idea what is the exact cause, but yes, the high CPU usage could be a cause.
You could try to add the videos only once, afterwards you can switch through the playlist via AxVLCPlugin21.playlist.next() or AxVLCPlugin21.playlist.playItem(idx). Maybe this will be more performant.

Btw, if you use AxVLCPlugin21.playlist.items.clear(), you don't need AxVLCPlugin21.playlist.items.remove(0).

1234yess
New Cone
New Cone
Posts: 2
Joined: 21 Jul 2016 09:35

Re: vlc got my program stuck

Postby 1234yess » 24 Jul 2016 07:06

I know about the other way that you mention, but I cant use this way because I am letting the user to add medias to the vlc and to remove medias whenever he want (this is the point of my application).
Do you know what can I do about this problem if the problem is really the high CPU usage?

thank you for your help

scottgeigel
New Cone
New Cone
Posts: 1
Joined: 24 Sep 2018 21:36

Re: vlc got my program stuck

Postby scottgeigel » 24 Sep 2018 21:38

I know this is an old thread, but I'm having a similar problem in my C# application.

On a whim, I tried running the vlc operations that were getting stuck in a Task/Thread. It seems to have stopped.
Don't know if that'll help, and I have no clue why this seems to fix the problem.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 13 guests