00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _RTSP_SERVER_SUPPORTING_HTTP_STREAMING_HH
00022 #define _RTSP_SERVER_SUPPORTING_HTTP_STREAMING_HH
00023
00024 #ifndef _RTSP_SERVER_HH
00025 #include "RTSPServer.hh"
00026 #endif
00027 #ifndef _BYTE_STREAM_MEMORY_BUFFER_SOURCE_HH
00028 #include "ByteStreamMemoryBufferSource.hh"
00029 #endif
00030 #ifndef _TCP_STREAM_SINK_HH
00031 #include "TCPStreamSink.hh"
00032 #endif
00033
00034 class RTSPServerSupportingHTTPStreaming: public RTSPServer {
00035 public:
00036 static RTSPServerSupportingHTTPStreaming* createNew(UsageEnvironment& env, Port rtspPort = 554,
00037 UserAuthenticationDatabase* authDatabase = NULL,
00038 unsigned reclamationTestSeconds = 65);
00039
00040 Boolean setHTTPPort(Port httpPort) { return setUpTunnelingOverHTTP(httpPort); }
00041
00042 protected:
00043 RTSPServerSupportingHTTPStreaming(UsageEnvironment& env,
00044 int ourSocket, Port ourPort,
00045 UserAuthenticationDatabase* authDatabase,
00046 unsigned reclamationTestSeconds);
00047
00048 virtual ~RTSPServerSupportingHTTPStreaming();
00049
00050 protected:
00051 virtual RTSPClientSession* createNewClientSession(unsigned sessionId, int clientSocket, struct sockaddr_in clientAddr);
00052
00053 public:
00054 class RTSPClientSessionSupportingHTTPStreaming: public RTSPServer::RTSPClientSession {
00055 public:
00056 RTSPClientSessionSupportingHTTPStreaming(RTSPServer& ourServer, unsigned sessionId,
00057 int clientSocket, struct sockaddr_in clientAddr);
00058 virtual ~RTSPClientSessionSupportingHTTPStreaming();
00059
00060 protected:
00061 virtual void handleHTTPCmd_StreamingGET(char const* urlSuffix, char const* fullRequestStr);
00062
00063 protected:
00064 static void afterStreaming(void* clientData);
00065
00066 private:
00067 ByteStreamMemoryBufferSource* fPlaylistSource;
00068 TCPStreamSink* fTCPSink;
00069 };
00070 };
00071
00072 #endif