live555工程中testprogs作爲一個簡單的rtsp客戶端,默認採用udp進行音視頻數據的傳輸,
如果需要使用tcp進行數據的傳輸,可以進行如下代碼的修改:
testRTSPClient.cpp文件#define REQUEST_STREAMING_OVER_TCP True即可
源代碼
// By default, we request that the server stream its data using RTP/UDP.
// If, instead, you want to request that the server stream via RTP-over-TCP,
//change the following to True:
#define REQUEST_STREAMING_OVER_TCP True
VLC默認播放TCP音視頻流設置如下:
去複用器>RTP/RTSP>