RTP rework: added sorter class, updated RTSP input/output/analyser to be compatible with it
This commit is contained in:
parent
f926ceab0d
commit
e3886c8acf
9 changed files with 116 additions and 127 deletions
15
lib/rtp.h
15
lib/rtp.h
|
@ -78,6 +78,21 @@ namespace RTP{
|
|||
char *getData();
|
||||
};
|
||||
|
||||
class Sorter{
|
||||
public:
|
||||
Sorter();
|
||||
void addPacket(const char *dat, unsigned int len);
|
||||
void addPacket(const Packet & pack);
|
||||
void setCallback(uint64_t track, void (*callback)(const uint64_t track, const Packet &p));
|
||||
uint16_t rtpSeq;
|
||||
int32_t lostTotal, lostCurrent;
|
||||
uint32_t packTotal, packCurrent;
|
||||
private:
|
||||
uint64_t packTrack;
|
||||
std::map<uint16_t, Packet> packBuffer;
|
||||
void (*callback)(const uint64_t track, const Packet &p);
|
||||
};
|
||||
|
||||
class MPEGVideoHeader{
|
||||
public:
|
||||
MPEGVideoHeader(char * d);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue