2019-05-03, 09:20 PM
I m using Kodi as the frontend for NPVR. I am having issues where the tuners are not being released when I stop playback of live TV. I have experienced the issue with bot HD-PVR2 and HDHomerun tuners. Typically I have to restart the recording service to correct but sometimes I can correct it by starting, stopping, or changing channels several times on live tv as is shown in the attached logs from both NPVR and Kodi. Below I started live TV the stopped but the tuner wasn't released. I then selected the same channel and started live TV again and upon stopping the tuner still wasn't released. On the the third try I switched to a different channel and when I stopped the tuner was released. I kind of pieced the 3 logs together below to give a timeline. These instances were within a few minutes so I could capture a short log but I have seen the tuner stay locked for hours after live TV was stopped.
Code:
[color=#FF0000]started live TV [/color]
kodi.log
2019-05-03 15:12:46.213 T:7008 DEBUG: PVR::CPVRClient::OpenLiveStream::<lambda_e4c47f7dc4b2b4e2eb3bf84fa6a4f5a4>::operator (): Opening live stream for channel 'KXAS'
web.log
2019-05-03 15:12:46.214 [DEBUG][23] Got Web Request (::ffff:192.168.20.3): /live channeloid=29436&mode=liveshift&client=XBMC-74b5e0f479854569ab2e0151bafb7227
npvr.log
2019-05-03 15:12:46.239 [DEBUG][8] StartStream(29436:KXAS)
[color=#FF0000]stop liveTV[/color]
kodi.log
2019-05-03 15:13:30.290 T:7008 DEBUG: AddOnLog: NextPVR PVR Client: CloseLiveStream
2019-05-03 15:13:30.290 T:7008 DEBUG: Previous line repeats 1 times.
2019-05-03 15:13:30.290 T:7008 DEBUG: AddOnLog: NextPVR PVR Client: TimeshiftBuffer::Close()
2019-05-03 15:13:30.290 T:7736 DEBUG: AddOnLog: NextPVR PVR Client: CONSUMER THREAD IS EXITING!!!
[color=#FF0000]started live TV [/color]
kodi.log
2019-05-03 15:14:06.796 T:7912 DEBUG: PVR::CPVRClient::OpenLiveStream::<lambda_e4c47f7dc4b2b4e2eb3bf84fa6a4f5a4>::operator (): Opening live stream for channel 'KXAS'
web.log
2019-05-03 15:14:06.796 [DEBUG][22] Got Web Request (::ffff:192.168.20.3): /live channeloid=29436&mode=liveshift&client=XBMC-74b5e0f479854569ab2e0151bafb7227
npvr.log
2019-05-03 15:14:06.797 [DEBUG][8] StartStream(29436:KXAS)
2019-05-03 15:14:06.797 [DEBUG][8] stopping previous handle
2019-05-03 15:14:06.797 [INFO][8] HDPVRRecorder.StopStream(1)
[color=#FF0000]stop liveTV[/color]
kodi.log
2019-05-03 15:14:28.917 T:7912 DEBUG: AddOnLog: NextPVR PVR Client: CloseLiveStream
2019-05-03 15:14:28.917 T:7912 DEBUG: Previous line repeats 1 times.
2019-05-03 15:14:28.917 T:7912 DEBUG: AddOnLog: NextPVR PVR Client: TimeshiftBuffer::Close()
2019-05-03 15:14:28.917 T:2708 DEBUG: AddOnLog: NextPVR PVR Client: CONSUMER THREAD IS EXITING!!!
[color=#FF0000]started live TV [/color]
kodi.log
2019-05-03 15:15:22.372 T:5288 DEBUG: PVR::CPVRClient::OpenLiveStream::<lambda_e4c47f7dc4b2b4e2eb3bf84fa6a4f5a4>::operator (): Opening live stream for channel 'KDFW'
web.log
2019-05-03 15:15:22.372 [DEBUG][19] Got Web Request (::ffff:192.168.20.3): /live channeloid=29435&mode=liveshift&client=XBMC-74b5e0f479854569ab2e0151bafb7227
npvr.log
2019-05-03 15:15:22.376 [DEBUG][24] StartStream(29435:KDFW)
2019-05-03 15:15:22.377 [DEBUG][24] stopping previous handle
2019-05-03 15:15:22.377 [INFO][24] HDPVRRecorder.StopStream(2)
[color=#FF0000]stop liveTV[/color]
kodi.log
2019-05-03 15:15:44.745 T:5288 DEBUG: AddOnLog: NextPVR PVR Client: CloseLiveStream
2019-05-03 15:15:44.745 T:5288 DEBUG: Previous line repeats 1 times.
2019-05-03 15:15:44.745 T:5288 DEBUG: AddOnLog: NextPVR PVR Client: TimeshiftBuffer::Close()
2019-05-03 15:15:44.745 T:6852 DEBUG: AddOnLog: NextPVR PVR Client: CONSUMER THREAD IS EXITING!!!
web.log
2019-05-03 15:15:45.299 [ERROR][19] Unexpected error streaming channel: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
2019-05-03 15:15:46.806 [DEBUG][19] StopStream() done
2019-05-03 15:15:46.806 [DEBUG][19] Previous Files:
2019-05-03 15:15:46.806 [DEBUG][19] - e:\gbpvr\livebuffer\live-kdfw-7872-3.ts
2019-05-03 15:15:46.806 [DEBUG][19] RollingFile.Close()
npvr.log
2019-05-03 15:15:46.299 [INFO][24] HDPVRRecorder.StopStream(3)