0
我使用Live555從遠程連接上的IP攝像頭提取數據。有時會有短暫的中斷(這可能是網絡QOS問題),但是,每次發生這種情況而不是成功地重新啓動連接時,live555都會死亡。調試輸出是這樣的:停止Live555重新使用會話
Closing session, because we stopped receiving packets.itrate=N/A speed=1.37x
Created new TCP socket 3 for connection
Connecting to 10.8.1.14, port 10111 on socket 3...
...remote connection opened
Sending request: PLAY rtsp://mycamera.test/live/ch0/ RTSP/1.0
CSeq: 6
User-Agent: /bin/openRTSP (LIVE555 Streaming Media v2017.07.18)
Session: 1487641045855494467
Range: npt=0.000-
Received 199 new bytes of response data.
Received a complete PLAY response:
RTSP/1.0 500 Internal Server Error
Server: DSS/6.0.3 (Build/526.3; Platform/Linux; Release/Darwin Streaming Server; State/Development;)
Cseq: 6
Session: 1487641045855494467
Connection: Close
Failed to start playing session: 500 Internal Server Error
Created new TCP socket 3 for connection
Connecting to 10.8.1.14, port 10111 on socket 3...
...remote connection opened
Sending request: TEARDOWN rtsp://mycamera.test/live/ch0/ RTSP/1.0
CSeq: 7
User-Agent: /bin/openRTSP (LIVE555 Streaming Media v2017.07.18)
Session: 1487641045855494467
Received 180 new bytes of response data.
Received a complete TEARDOWN response:
RTSP/1.0 200 OK
Server: DSS/6.0.3 (Build/526.3; Platform/Linux; Release/Darwin Streaming Server; State/Development;)
Cseq: 7
Session: 1487641045855494467
Connection: Close
這似乎是live555是原因撈出是因爲相機試圖重新啓動流爲現有會話時拋出一個500錯誤。既然開始一個新的會話有效,有沒有什麼辦法可以告訴live555放棄現有的會話並重新開始,而不是放棄?我有一個cron作業,可以檢測live555何時停止並重新啓動它,但是當我這樣做時會出現問題,因此如果我能夠說服live555來彌補相機固件中的錯誤,它會更加乾淨。
我很高興修補live555代碼,並在必要時重建!