Removed DTSC::Stream and DTSC::Ring classes - no longer in use anywhere.

This commit is contained in:
Thulinma 2016-01-28 11:27:26 +01:00
parent a39350f83e
commit 9631b79e86
6 changed files with 1 additions and 718 deletions

View file

@ -166,19 +166,6 @@ namespace DTSC {
unsigned int trackID;
};
/// A part from the DTSC::Stream ringbuffer.
/// Holds information about a buffer that will stay consistent
class Ring {
public:
Ring(livePos v);
livePos b;
//volatile unsigned int b; ///< Holds current number of buffer. May and is intended to change unexpectedly!
volatile bool waiting; ///< If true, this Ring is currently waiting for a buffer fill.
volatile bool starved; ///< If true, this Ring can no longer receive valid data.
volatile bool updated; ///< If true, this Ring should write a new header.
volatile int playCount;
};
///\brief Basic class for storage of data associated with single DTSC packets, a.k.a. parts.
class Part {
@ -374,49 +361,5 @@ namespace DTSC {
};
//FileWriter
/// Holds temporary data for a DTSC stream and provides functions to utilize it.
/// Optionally also acts as a ring buffer of a certain requested size.
/// If ring buffering mode is enabled, it will automatically grow in size to always contain at least one keyframe.
class Stream {
public:
Stream();
virtual ~Stream();
Stream(unsigned int buffers, unsigned int bufferTime = 0);
Meta metadata;
JSON::Value & getPacket();
JSON::Value & getPacket(livePos num);
datatype lastType();
std::string & lastData();
bool hasVideo();
bool hasAudio();
bool parsePacket(std::string & buffer);
bool parsePacket(Socket::Buffer & buffer);
std::string & outPacket();
std::string & outPacket(livePos num);
std::string & outHeader();
Ring * getRing();
unsigned int getTime();
void dropRing(Ring * ptr);
int canSeekms(unsigned int ms);
livePos msSeek(unsigned int ms, std::set<unsigned int> & allowedTracks);
void setBufferTime(unsigned int ms);
bool isNewest(DTSC::livePos & pos, std::set<unsigned int> & allowedTracks);
DTSC::livePos getNext(DTSC::livePos & pos, std::set<unsigned int> & allowedTracks);
void endStream();
void waitForMeta(Socket::Connection & sourceSocket, bool closeOnError = true);
void waitForPause(Socket::Connection & sourceSocket);
protected:
void cutOneBuffer();
void resetStream();
std::map<livePos, JSON::Value> buffers;
std::map<int, std::set<livePos> > keyframes;
virtual void addPacket(JSON::Value & newPack);
virtual void addMeta(JSON::Value & newMeta);
datatype datapointertype;
unsigned int buffercount;
unsigned int buffertime;
std::map<unsigned int, std::string> trackMapping;
virtual void deletionCallback(livePos deleting);
};
}