b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | From f0f04b7315f59b3a9b814c13c705d4354d0c0626 Mon Sep 17 00:00:00 2001 |
| 2 | From: mpromonet <michel.promonet@free.fr> |
| 3 | Date: Fri, 27 Nov 2020 19:36:43 +0100 |
| 4 | Subject: [PATCH] fix #216: allow to build with live555 newer than 2020.11.27 |
| 5 | (2020.11.25 & 2020.11.26 doesnot build) |
| 6 | |
| 7 | --- |
| 8 | inc/HTTPServer.h | 9 +++++++-- |
| 9 | 1 file changed, 7 insertions(+), 2 deletions(-) |
| 10 | |
| 11 | --- a/inc/HTTPServer.h |
| 12 | +++ b/inc/HTTPServer.h |
| 13 | @@ -113,13 +113,18 @@ class TCPSink: public MediaSink { |
| 14 | // --------------------------------------------------------- |
| 15 | // Extend RTSP server to add support for HLS and MPEG-DASH |
| 16 | // --------------------------------------------------------- |
| 17 | +#if LIVEMEDIA_LIBRARY_VERSION_INT < 1606435200 |
| 18 | +#define SOCKETCLIENT sockaddr_in |
| 19 | +#else |
| 20 | +#define SOCKETCLIENT sockaddr_storage |
| 21 | +#endif |
| 22 | class HTTPServer : public RTSPServer |
| 23 | { |
| 24 | |
| 25 | class HTTPClientConnection : public RTSPServer::RTSPClientConnection |
| 26 | { |
| 27 | public: |
| 28 | - HTTPClientConnection(RTSPServer& ourServer, int clientSocket, struct sockaddr_in clientAddr) |
| 29 | + HTTPClientConnection(RTSPServer& ourServer, int clientSocket, struct SOCKETCLIENT clientAddr) |
| 30 | : RTSPServer::RTSPClientConnection(ourServer, clientSocket, clientAddr), m_TCPSink(NULL), m_StreamToken(NULL), m_Subsession(NULL), m_Source(NULL) { |
| 31 | } |
| 32 | virtual ~HTTPClientConnection(); |
| 33 | @@ -165,7 +170,7 @@ class HTTPServer : public RTSPServer |
| 34 | } |
| 35 | } |
| 36 | |
| 37 | - RTSPServer::RTSPClientConnection* createNewClientConnection(int clientSocket, struct sockaddr_in clientAddr) |
| 38 | + RTSPServer::RTSPClientConnection* createNewClientConnection(int clientSocket, struct SOCKETCLIENT clientAddr) |
| 39 | { |
| 40 | return new HTTPClientConnection(*this, clientSocket, clientAddr); |
| 41 | } |