37 #ifndef RTPPACKETBUILDER_H 39 #define RTPPACKETBUILDER_H 68 int Init(
unsigned int maxpacksize);
86 return numpayloadbytes;
90 int SetMaximumPacketSize(
unsigned int maxpacksize);
106 int BuildPacket(
const void *data,
unsigned int len);
113 int BuildPacket(
const void *data,
unsigned int len,
uint8_t pt,
bool mark,
uint32_t timestampinc);
122 int BuildPacketEx(
const void *data,
unsigned int len,
uint16_t hdrextID,
const void *hdrextdata,
unsigned int numhdrextwords);
131 int BuildPacketEx(
const void *data,
unsigned int len,
uint8_t pt,
bool mark,
uint32_t timestampinc,
uint16_t hdrextID,
const void *hdrextdata,
unsigned int numhdrextwords);
150 int SetDefaultPayloadType(
uint8_t pt);
153 int SetDefaultMark(
bool m);
156 int SetDefaultTimestampIncrement(
uint32_t timestampinc);
164 int IncrementTimestamp(
uint32_t inc);
173 int IncrementTimestampDefault();
220 return lastwallclocktime;
228 return lastrtptimestamp;
240 int PrivateBuildPacket(
245 bool gotextension,
uint16_t hdrextID = 0,
246 const void *hdrextdata = 0,
247 unsigned int numhdrextwords = 0);
281 defaultpayloadtype = pt;
299 defaulttimestampinc = timestampinc;
317 timestamp += defaulttimestampinc;
323 #endif // RTPPACKETBUILDER_H int SetDefaultMark(bool m)
uint16_t GetSequenceNumber() const
RTPTime GetPacketTime() const
RTPTime lastwallclocktime
int IncrementTimestamp(uint32_t inc)
#define ERR_RTP_PACKBUILD_DEFAULTTSINCNOTSET
uint32_t GetPayloadOctetCount()
uint32_t GetPacketCount()
int SetDefaultTimestampIncrement(uint32_t timestampinc)
#define ERR_RTP_PACKBUILD_NOTINIT
uint32_t defaulttimestampinc
uint32_t GetTimestamp() const
int SetDefaultPayloadType(uint8_t pt)
unsigned int GetPacketLength()
uint32_t GetPacketTimestamp() const
uint8_t defaultpayloadtype
unsigned int packetlength
void AdjustSSRC(uint32_t s)
uint32_t prevrtptimestamp
uint32_t lastrtptimestamp
int IncrementTimestampDefault()