72 Scan(
char * pointer,
size_t len);
73 operator bool()
const;
74 std::string toPrettyString(
unsigned int indent = 0);
75 bool hasMember(std::string indice);
76 bool hasMember(
const char * indice,
const unsigned int ind_len);
77 Scan getMember(std::string indice);
78 Scan getMember(
const char * indice);
79 Scan getMember(
const char * indice,
const unsigned int ind_len);
80 Scan getIndice(
unsigned int num);
81 std::string getIndiceName(
unsigned int num);
82 unsigned int getSize();
87 std::string asString();
88 void getString(
char *& result,
unsigned int & len);
104 Packet(
const char * data_,
unsigned int len,
bool noCopy =
false);
107 void operator = (
const Packet & rhs);
108 operator bool()
const;
110 void reInit(
const char * data_,
unsigned int len,
bool noCopy =
false);
111 void genericFill(
long long packTime,
long long packOffset,
long long packTrack,
const char * packData,
long long packDataSize,
long long packBytePos,
bool isKeyframe);
112 void getString(
const char * identifier,
char *& result,
unsigned int & len)
const;
113 void getString(
const char * identifier, std::string & result)
const;
114 void getInt(
const char * identifier,
int & result)
const;
115 int getInt(
const char * identifier)
const;
116 void getFlag(
const char * identifier,
bool & result)
const;
117 bool getFlag(
const char * identifier)
const;
118 bool hasMember(
const char * identifier)
const;
119 long long unsigned int getTime()
const;
120 long int getTrackId()
const;
121 char * getData()
const;
122 int getDataLen()
const;
123 int getPayloadLen()
const;
125 Scan getScan()
const;
129 void resize(
unsigned int size);
131 unsigned int bufferLen;
132 unsigned int dataLen;
176 Ivec(
long long int iVec);
177 void setIvec(
long long int iVec);
178 void setIvec(std::string iVec);
179 void setIvec(
const char * iVec,
int len);
180 long long int asInt();
194 void setSize(
long newSize);
196 void setDuration(
short newDuration);
198 void setOffset(
long newOffset);
200 void toPrettyString(std::ostream & str,
int indent = 0);
215 unsigned long long getBpos();
216 void setBpos(
unsigned long long newBpos);
217 unsigned long getLength();
218 void setLength(
unsigned long newLength);
219 unsigned long getNumber();
220 void setNumber(
unsigned long newNumber);
221 unsigned short getParts();
222 void setParts(
unsigned short newParts);
223 unsigned long long getTime();
224 void setTime(
unsigned long long newTime);
226 void toPrettyString(std::ostream & str,
int indent = 0);
229 #define PACKED_KEY_SIZE 25 238 #define PACKED_KEY_SIZE 16 253 unsigned long getDuration();
254 void setDuration(
unsigned long newDuration);
256 void setLength(
char newLength);
257 unsigned long getNumber();
258 void setNumber(
unsigned long newNumber);
259 unsigned long getSize();
260 void setSize(
unsigned long newSize);
262 void toPrettyString(std::ostream & str,
int indent = 0);
265 #define PACKED_FRAGMENT_SIZE 13 273 #define PACKED_FRAGMENT_SIZE 11 289 Track(Scan & trackRef);
291 inline operator bool()
const {
292 return (parts.size() && keySizes.size() && (keySizes.size() == keys.size()));
297 void update(
long long packTime,
long long packOffset,
long long packDataSize,
long long packBytePos,
bool isKeyframe,
long long packSendSize,
unsigned long segment_size = 5000,
const char * iVec = 0);
300 void writeTo(
char *& p);
302 std::deque<Fragment> fragments;
303 std::deque<Key> keys;
304 std::deque<unsigned long> keySizes;
305 std::deque<Part> parts;
306 std::deque<Ivec> ivecs;
307 Key & getKey(
unsigned int keyNum);
308 unsigned int timeToKeynum(
unsigned int timestamp);
309 unsigned int timeToFragnum(
unsigned int timestamp);
311 void toPrettyString(std::ostream & str,
int indent = 0,
int verbosity = 0);
314 std::string getIdentifier();
315 std::string getWritableIdentifier();
317 unsigned long long firstms;
318 unsigned long long lastms;
333 std::string cachedIdent;
344 inline operator bool()
const {
348 void update(
DTSC::Packet & pack,
unsigned long segment_size = 5000);
349 void updatePosOverride(
DTSC::Packet & pack,
unsigned long bpos);
350 void update(
JSON::Value & pack,
unsigned long segment_size = 5000);
354 void update(
long long packTime,
long long packOffset,
long long packTrack,
long long packDataSize,
long long packBytePos,
bool isKeyframe,
long long packSendSize = 0,
unsigned long segment_size = 5000,
const char * iVec = 0);
355 unsigned int getSendLen();
357 void writeTo(
char * p);
360 void toPrettyString(std::ostream & str,
int indent = 0,
int verbosity = 0);
362 std::map<unsigned int, Track> tracks;
366 long long int moreheader;
367 long long int bufferWindow;
375 File(std::string filename,
bool create =
false);
376 File & operator = (
const File & rhs);
377 operator bool()
const;
380 long long int getLastReadPos();
381 bool writeHeader(std::string & header,
bool force =
false);
382 long long int addHeader(std::string & header);
383 long int getBytePosEOF();
384 long int getBytePos();
389 bool seek_time(
unsigned int ms);
390 bool seek_time(
unsigned int ms,
unsigned int trackNo,
bool forceSeek =
false);
391 bool seek_bpos(
int bpos);
392 void rewritePacket(std::string & newPacket,
int bytePos);
393 void writePacket(std::string & newPacket);
396 void selectTracks(std::set<unsigned long> & tracks);
399 void readHeader(
int pos);
403 std::map<unsigned int, std::string> trackMapping;
404 long long int currtime;
405 long long int lastreadpos;
408 unsigned long headerSize;
411 std::set<seekPos> currentPositions;
412 std::set<unsigned long> selectedTracks;
long long unsigned int bytePos
Stores the byteposition of the DTSC packet referenced by this structure.
Definition: dtsc.h:56
A simple structure used for ordering byte seek positions.
Definition: dtsc.h:136
packType
Definition: dtsc.h:60
unsigned int trackID
Stores the track the DTSC packet referenced by this structure is associated with. ...
Definition: dtsc.h:57
#define PACKED_KEY_SIZE
Definition: dtsc.h:238
A simple structure used for ordering byte seek positions.
Definition: dtsc.h:39
Stream Audio data.
Definition: dtsc.h:26
Pause marker.
Definition: dtsc.h:29
A JSON::Value is either a string or an integer, but may also be an object, array or null...
Definition: json.h:21
This class allows scanning through raw binary format DTSC data.
Definition: dtsc.h:69
unsigned int trackID
Definition: dtsc.h:166
Stream Metadata.
Definition: dtsc.h:28
long long unsigned int seekTime
Definition: dtsc.h:165
datatype
This enum holds all possible datatypes for DTSC packets.
Definition: dtsc.h:25
Basic class supporting initialization Vectors.
Definition: dtsc.h:173
Modified header data.
Definition: dtsc.h:30
Stream Video data.
Definition: dtsc.h:27
char Magic_Packet2[]
The magic bytes for a DTSC packet version 2.
Definition: dtsc.h:36
#define PACKED_FRAGMENT_SIZE
Definition: dtsc.h:273
long long unsigned int seekTime
Stores the timestamp of the DTSC packet referenced by this structure.
Definition: dtsc.h:55
Canvas prototype resize
Definition: jquery.flot.min.js:1
char Magic_Header[]
The magic bytes for a DTSC header.
Definition: dtsc.h:34
Basic class for storage of data associated with keyframes.
Definition: dtsc.h:213
function init(plot)
Definition: jquery.flot.time.min.js:1
Basic class for storage of data associated with single DTSC packets, a.k.a. parts.
Definition: dtsc.h:191
A simple wrapper class that will open a file and allow easy reading/writing of DTSC data from/to it...
Definition: dtsc.h:371
char Magic_Packet[]
The magic bytes for a DTSC packet.
Definition: dtsc.h:35
livePos()
Definition: dtsc.h:137
Anything else or no data available.
Definition: dtsc.h:31
plot version
Definition: jquery.flot.min.js:2
mist send(function(){$(window).trigger("hashchange")},{},{timeout:5, hide:!0})})
This class is for easy communicating through sockets, either TCP or Unix.
Definition: socket.h:47
bool operator<(const seekPos &rhs) const
Less-than comparison for seekPos structures.
Definition: dtsc.h:43
DTSC::Packets can currently be three types: DTSC_HEAD packets are the "DTSC" header string...
Definition: dtsc.h:100
livePos(const livePos &rhs)
Definition: dtsc.h:141