2015-07-13, 17:27
A bug in the DVBViewer Recording Service could result in HTTP requests (e.g. timerlist.html, status.html) taking a very long time. The problem with KODI is that this also interrupts the live stream until a timeout occurs:
I then played the UPnP/HTTP stream within VLC and made HTTP requests to the DVBViewer Recording Service using a browser. The response also took very long due to the bug, but the stream was not interrupted, suggesting that KODI does not properly decouple HTTP requests from streaming.
I don't really know whose job it really is, whether it is a "problem" of the Core, the PVR or the PVR Add-On. But I don't think that it is a good idea that the stream is interrupted because of a failing/delayed HTTP request.
I assume that the KODI Core/PVR relies on the circumstance that calls to the PVR Add-On do not block for too long. So maybe retrieving timerlist.html/status.html should be done timer-based in a separate thread, storing the data in some shared memory, where the info can quickly be copied from when being queried by the Core/PVR. The DVBViewer Add-On is leaving the KODI process and maybe even the "client device" (over LAN) and maybe even the LAN (over internet). We should not expect a fast reply.
Code:
ERROR: AddOnLog: DVBViewer Client: Unable to parse timers. Error: Error document empty...
ERROR: CCurlFile::Open failed with code 0 for http://127.0.0.1:8080/api/timerlist.html...
ERROR: CCurlFile::FillBuffer - Failed: Timeout was reached(28)
I then played the UPnP/HTTP stream within VLC and made HTTP requests to the DVBViewer Recording Service using a browser. The response also took very long due to the bug, but the stream was not interrupted, suggesting that KODI does not properly decouple HTTP requests from streaming.
I don't really know whose job it really is, whether it is a "problem" of the Core, the PVR or the PVR Add-On. But I don't think that it is a good idea that the stream is interrupted because of a failing/delayed HTTP request.
I assume that the KODI Core/PVR relies on the circumstance that calls to the PVR Add-On do not block for too long. So maybe retrieving timerlist.html/status.html should be done timer-based in a separate thread, storing the data in some shared memory, where the info can quickly be copied from when being queried by the Core/PVR. The DVBViewer Add-On is leaving the KODI process and maybe even the "client device" (over LAN) and maybe even the LAN (over internet). We should not expect a fast reply.