00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef _MPEG2_TRANSPORT_FILE_SERVER_MEDIA_SUBSESSION_HH
00023 #define _MPEG2_TRANSPORT_FILE_SERVER_MEDIA_SUBSESSION_HH
00024
00025 #ifndef _FILE_SERVER_MEDIA_SUBSESSION_HH
00026 #include "FileServerMediaSubsession.hh"
00027 #endif
00028 #ifndef _MPEG2_TRANSPORT_STREAM_INDEX_FILE_HH
00029 #include "MPEG2TransportStreamIndexFile.hh"
00030 #endif
00031
00032 class ClientTrickPlayState;
00033
00034 class MPEG2TransportFileServerMediaSubsession: public FileServerMediaSubsession{
00035 public:
00036 static MPEG2TransportFileServerMediaSubsession*
00037 createNew(UsageEnvironment& env,
00038 char const* dataFileName, char const* indexFileName,
00039 Boolean reuseFirstSource);
00040
00041 protected:
00042 MPEG2TransportFileServerMediaSubsession(UsageEnvironment& env,
00043 char const* fileName,
00044 MPEG2TransportStreamIndexFile* indexFile,
00045 Boolean reuseFirstSource);
00046
00047 virtual ~MPEG2TransportFileServerMediaSubsession();
00048
00049 private:
00050
00051
00052
00053
00054 virtual void startStream(unsigned clientSessionId, void* streamToken,
00055 TaskFunc* rtcpRRHandler,
00056 void* rtcpRRHandlerClientData,
00057 unsigned short& rtpSeqNum,
00058 unsigned& rtpTimestamp);
00059 virtual void pauseStream(unsigned clientSessionId, void* streamToken);
00060 virtual void seekStream(unsigned clientSessionId, void* streamToken, double seekNPT);
00061 virtual void setStreamScale(unsigned clientSessionId, void* streamToken, float scale);
00062 virtual void deleteStream(unsigned clientSessionId, void*& streamToken);
00063
00064
00065 virtual FramedSource* createNewStreamSource(unsigned clientSessionId,
00066 unsigned& estBitrate);
00067 virtual RTPSink* createNewRTPSink(Groupsock* rtpGroupsock,
00068 unsigned char rtpPayloadTypeIfDynamic,
00069 FramedSource* inputSource);
00070
00071 virtual void testScaleFactor(float& scale);
00072 virtual float duration() const;
00073
00074 private:
00075 ClientTrickPlayState* lookupClient(unsigned clientSessionId);
00076
00077 private:
00078 MPEG2TransportStreamIndexFile* fIndexFile;
00079 float fDuration;
00080 HashTable* fClientSessionHashTable;
00081 };
00082
00083 #endif