#include #include "input.h" #include #include namespace Mist { class inputBuffer : public Input { public: inputBuffer(Util::Config * cfg); ~inputBuffer(); private: unsigned int bufferTime; unsigned int cutTime; unsigned int segmentSize; /*LTS*/ unsigned int lastReTime; /*LTS*/ bool hasPush; /*LTS*/ bool resumeMode; /*LTS*/ protected: //Private Functions bool setup(); void updateMeta(); bool readHeader(); void getNext(bool smart = true); void updateTrackMeta(unsigned long tNum); void updateMetaFromPage(unsigned long tNum, unsigned long pageNum); void seek(int seekTime); void trackSelect(std::string trackSpec); bool removeKey(unsigned int tid); void removeUnused(); void eraseTrackDataPages(unsigned long tid); void finish(); void userCallback(char * data, size_t len, unsigned int id); std::set negotiatingTracks; std::set activeTracks; std::map lastUpdated; std::map negotiationTimeout; ///Maps trackid to a pagenum->pageData map std::map > bufferLocations; std::map pushLocation; inputBuffer * singleton; std::string recName;/*LTS*/ DTSC::Meta recMeta;/*LTS*/ std::ofstream recFile;/*LTS*/ long long int recBpos;/*LTS*/ //This is used for an ugly fix to prevent metadata from dissapearing in some cases. std::map initData; /* begin-roxlu */ int recordingPid; // pid of the process that does the recording. Currently only MP4 supported. /* end-roxlu */ }; } typedef Mist::inputBuffer mistIn;