Hello I’m makeing an application that shows 4 panels with a vlc player (AxAXVLC.AxVLCPlugin2) for each panel. Each player plays one picture(png;jpg;gif;etc) or a video(wmp;mov;etc) using this code:
Private Sub msReproducir(ByVal obj As Objeto, ByVal d As dsAlbum.dtContenidosRow)
Me.sem.WaitOne()
Try
Dim vlc As AxAXVLC.AxVLCPlugin2 = obj.obj
obj.pnl.BringToFront()
obj.pnl.Refresh()
Threading.Thread.Sleep(200)
If vlc.playlist IsNot Nothing AndAlso vlc.playlist.items.count > 0 Then
Try
If vlc.playlist IsNot Nothing Then
vlc.playlist.stop()
End If
vlc.playlist.items.clear()
Catch ex As Exception
End Try
End If
GC.Collect()
If My.Computer.FileSystem.FileExists(d.cUrlFinal) Then
vlc.playlist.add(d.cUrlFinal)
vlc.playlist.playItem(0)
Threading.Thread.Sleep(200)
End If
obj.pnl.SendToBack()
Catch ex As Exception
MsgI(ex.Message, "Reproducir")
Finally
Me.sem.ReleaseMutex()
End Try
End Sub
Where obj.pnl is a panel for hide the player while makes the change of the item to play. When play videos all going right but when I play images my application grows in memory and I don’t know if is a bug of the vlc player, or there is a function for release memory, or my code is not right. Please I need help urgently.
Thanks for all
Pedro Llanes (from spain).
Best regards.