mirror of
https://github.com/mpromonet/v4l2rtspserver
synced 2024-11-13 13:10:31 +00:00
overide SETUP handler
This commit is contained in:
parent
d0da079177
commit
a75aebd4bd
@ -150,6 +150,12 @@ class HTTPServer : public RTSPServer
|
||||
FramedSource* m_Source;
|
||||
};
|
||||
|
||||
class HTTPClientSession : public RTSPServer::RTSPClientSession {
|
||||
public:
|
||||
HTTPClientSession(HTTPServer& ourServer, u_int32_t sessionId) : RTSPServer::RTSPClientSession(ourServer, sessionId) {}
|
||||
virtual void handleCmd_SETUP(RTSPServer::RTSPClientConnection* ourClientConnection, char const* urlPreSuffix, char const* urlSuffix, char const* fullRequestStr);
|
||||
};
|
||||
|
||||
public:
|
||||
static HTTPServer* createNew(UsageEnvironment& env, Port rtspPort, UserAuthenticationDatabase* authDatabase, unsigned reclamationTestSeconds, unsigned int hlsSegment, const std::string webroot)
|
||||
{
|
||||
@ -185,13 +191,16 @@ class HTTPServer : public RTSPServer
|
||||
}
|
||||
}
|
||||
|
||||
RTSPServer::RTSPClientConnection* createNewClientConnection(int clientSocket, struct SOCKETCLIENT clientAddr)
|
||||
virtual RTSPServer::ClientConnection* createNewClientConnection(int clientSocket, struct SOCKETCLIENT clientAddr)
|
||||
{
|
||||
return new HTTPClientConnection(*this, clientSocket, clientAddr);
|
||||
}
|
||||
|
||||
virtual RTSPServer::ClientSession* createNewClientSession(u_int32_t sessionId) {
|
||||
return new HTTPClientSession(*this, sessionId);
|
||||
}
|
||||
private:
|
||||
const unsigned int m_hlsSegment;
|
||||
std::string m_webroot;
|
||||
const unsigned int m_hlsSegment;
|
||||
std::string m_webroot;
|
||||
};
|
||||
|
||||
|
@ -369,6 +369,11 @@ void HTTPServer::HTTPClientConnection::handleHTTPCmd_StreamingGET(char const* ur
|
||||
}
|
||||
}
|
||||
|
||||
void HTTPServer::HTTPClientSession::handleCmd_SETUP(RTSPServer::RTSPClientConnection* ourClientConnection, char const* urlPreSuffix, char const* urlSuffix, char const* fullRequestStr) {
|
||||
envir() << "handleCmd_SETUP:" << fullRequestStr;
|
||||
RTSPServer::RTSPClientSession::handleCmd_SETUP(ourClientConnection, urlPreSuffix, urlSuffix, fullRequestStr);
|
||||
}
|
||||
|
||||
void HTTPServer::HTTPClientConnection::handleCmd_notFound() {
|
||||
std::ostringstream os;
|
||||
ServerMediaSessionIterator it(fOurServer);
|
||||
|
Loading…
Reference in New Issue
Block a user