Dynamically determine audio, video, and control ports from RTSP DESCRIBE response

This commit is contained in:
Cameron Gutman
2021-07-01 23:45:33 -05:00
parent 2660a05084
commit 56ccd99cc7
6 changed files with 101 additions and 16 deletions

View File

@@ -3,7 +3,6 @@
#define FIRST_FRAME_MAX 1500
#define FIRST_FRAME_TIMEOUT_SEC 10
#define RTP_PORT 47998
#define FIRST_FRAME_PORT 47996
#define RTP_RECV_BUFFER (512 * 1024)
@@ -48,7 +47,7 @@ static void VideoPingThreadProc(void* context) {
LC_SOCKADDR saddr;
memcpy(&saddr, &RemoteAddr, sizeof(saddr));
SET_PORT(&saddr, RTP_PORT);
SET_PORT(&saddr, VideoPortNumber);
while (!PltIsThreadInterrupted(&udpPingThread)) {
// We do not check for errors here. Socket errors will be handled