VLCKit/libVLC on tvOS deadlocks
Posted: 09 Feb 2016 11:23
Hi,
I am still working on my tvOS to play video streams vom Set Top Boxes (VU+, Dreambox) via OpenWebIF.
I still get many complaints, that playback is jittering.
I also have seen with Live-TV streams (720p like ARD HD) that playback runs into a deadlock.
I changed my App code in a way to keep it responsive, so the user can close the playback window. In that case the media player gets stopped and (after idling to wait for the mediaPlayer.playing property to turn to NO and abort after about half a second) I set the media to nil, set the mediaPlayer to nil and finally get all stuff deallocated. At least - the user can then start a new stream.
What I have seen in the Debug Inspector, when libVLC runs into this deadlock, it keeps the socket despite the fact, that I deallocate all instances as far as possible via VLCKit. The socket is kept open forever with no traffic. By time - eventually - I may have "leaking" sockets open, which eats up system resources and may stop the set top box to go into deep sleep power state.
Any hints, how I can force to close all sockets? Which is the best way to close a stream in deadlock?
Well - of course - best would be, that the App never runs into this deadlock...
I am still working on my tvOS to play video streams vom Set Top Boxes (VU+, Dreambox) via OpenWebIF.
I still get many complaints, that playback is jittering.
I also have seen with Live-TV streams (720p like ARD HD) that playback runs into a deadlock.
I changed my App code in a way to keep it responsive, so the user can close the playback window. In that case the media player gets stopped and (after idling to wait for the mediaPlayer.playing property to turn to NO and abort after about half a second) I set the media to nil, set the mediaPlayer to nil and finally get all stuff deallocated. At least - the user can then start a new stream.
What I have seen in the Debug Inspector, when libVLC runs into this deadlock, it keeps the socket despite the fact, that I deallocate all instances as far as possible via VLCKit. The socket is kept open forever with no traffic. By time - eventually - I may have "leaking" sockets open, which eats up system resources and may stop the set top box to go into deep sleep power state.
Any hints, how I can force to close all sockets? Which is the best way to close a stream in deadlock?
Well - of course - best would be, that the App never runs into this deadlock...