47 #ifdef RTP_SUPPORT_SENDAPP 49 #endif // RTP_SUPPORT_SENDAPP 61 rtprnd(GetRandomNumberGenerator(r)),
63 packetbuilder(*rtprnd),
64 rtcpsched(sources, *rtprnd),
65 rtcpbuilder(sources, packetbuilder)
212 std::size_t buflen = 1024;
213 std::string forcedcname = sessparams.
GetCNAME();
215 if (forcedcname.length() == 0)
228 strncpy((
char * )buf, forcedcname.c_str(), buflen);
230 buflen = strlen((
char *) buf);
312 std::list<RTCPCompoundPacket *>::const_iterator it;
329 stoptime += maxwaittime;
358 if (curtime >= stoptime)
390 std::list<RTCPCompoundPacket *>::const_iterator it;
541 #ifdef RTP_SUPPORT_SENDAPP 567 std::size_t owncnamelen = 0;
576 if ((status = pb.
AddAPPPacket(subtype, ssrc, name, appdata, appdatalen)) < 0)
592 #endif // RTP_SUPPORT_SENDAPP 1148 buffer[*bufferlength - 1] = 0;
1150 std::size_t offset = strlen((
const char *) buffer);
1151 if (offset < (*bufferlength - 1))
1152 buffer[offset] = (
uint8_t)
'@';
1155 std::size_t buflen2 = *bufferlength - offset;
1157 QString hostnameStr = QHostInfo::localHostName();
1158 int hostnameSize = hostnameStr.size();
1160 strncpy((
char * )(buffer + offset), hostnameStr.toStdString().c_str(), buflen2);
1161 *bufferlength = offset + hostnameSize;
1192 void *pSendData = 0;
1193 std::size_t sendLen = 0;
1214 void *pSendData = 0;
1215 std::size_t sendLen = 0;
int SetSenderBandwidthFraction(double fraction)
int IncrementTimestamp(uint32_t inc)
RTPTransmitter::ReceiveMode GetReceiveMode() const
bool DetectedOwnCollision() const
bool IsUsingPollThread() const
int SetMaximumPacketSize(std::size_t s)
int SendRTPData(const void *data, std::size_t len)
RTPTime GetReceiveTime() const
void SetHeaderOverhead(std::size_t numbytes)
void SetRequestImmediateBYE(bool v)
virtual int SendRTPData(const void *data, std::size_t len)=0
int Init(unsigned int maxpacksize)
bool GotoPreviousSource()
int SetDefaultMark(bool m)
uint16_t GetSequenceNumber() const
int Create(const RTPSessionParams &sessparams, RTPTransmitter *transmitter)
RTCPSchedulerParams GetParameters() const
RTPTimeInitializerObject timeinit
std::size_t GetMaximumPacketSize() const
int SendPacketEx(const void *data, std::size_t len, uint16_t hdrextID, const void *hdrextdata, std::size_t numhdrextwords)
virtual RTPRawPacket * GetNextPacket()=0
void BYEDestroy(const RTPTime &maxwaittime, const void *reason, std::size_t reasonlength)
double GetOwnTimestampUnit() const
RTPSourceData * GetSourceInfo(uint32_t ssrc)
int BuildBYEPacket(RTCPCompoundPacket **pack, const void *reason, std::size_t reasonlength, bool useSRifpossible=true)
int SetLocalNote(const void *s, std::size_t len)
int SetLocalNote(const void *s, std::size_t len)
double GetControlTrafficFraction() const
int SetLocalPhone(const void *s, std::size_t len)
int CreateCNAME(uint8_t *buffer, std::size_t *bufferlength, bool resolve)
void SetNoteInterval(int count)
int DeleteFromAcceptList(const RTPAddress &addr)
int SetLocalPhone(const void *s, std::size_t len)
int SetRTCPBandwidth(double bw)
void SetUseHalfAtStartup(bool usehalf)
int SetMinimumTransmissionInterval(const RTPTime &t)
int DeleteDestination(const RTPAddress &addr)
int SetReceiveMode(RTPTransmitter::ReceiveMode m)
double GetSenderTimeoutMultiplier() const
void DeletePacket(RTPPacket *p)
bool GotoPreviousSource()
int IncrementTimestamp(uint32_t inc)
RTPPacketBuilder packetbuilder
#define RTCP_BYE_MAXREASONLENGTH
void MultipleTimeouts(const RTPTime &curtime, const RTPTime &sendertimeout, const RTPTime &byetimeout, const RTPTime &generaltimeout, const RTPTime ¬etimeout)
double GetCollisionTimeoutMultiplier() const
int AddToAcceptList(const RTPAddress &addr)
int SetLocalTool(const void *s, std::size_t len)
uint8_t * GetCompoundPacketData()
uint16_t GetNextSequenceNumber() const
int AddAPPPacket(uint8_t subtype, uint32_t ssrc, const uint8_t name[4], const void *appdata, std::size_t appdatalen)
double GetSessionBandwidth() const
int SendRTCPAPPPacket(uint8_t subtype, const uint8_t name[4], const void *appdata, std::size_t appdatalen)
int LeaveMulticastGroup(const RTPAddress &addr)
int InitBuild(std::size_t maxpacketsize)
virtual int SendRTCPData(const void *data, std::size_t len)=0
RTCPPacketBuilder rtcpbuilder
RTPSourceData * GetCurrentSourceInfo()
bool GetUsePredefinedSSRC() const
bool GotoNextSourceWithData()
virtual void DeleteTransmissionInfo(RTPTransmissionInfo *inf)=0
RTPPacket * GetNextPacket()
virtual int DeleteDestination(const RTPAddress &addr)=0
int SetDefaultTimestampIncrement(uint32_t timestampinc)
int AddToIgnoreList(const RTPAddress &addr)
virtual int DeleteFromAcceptList(const RTPAddress &addr)=0
#define ERR_RTP_SESSION_MAXPACKETSIZETOOSMALL
int JoinMulticastGroup(const RTPAddress &addr)
#define ERR_RTP_SESSION_NOTCREATED
bool GetResolveLocalHostname() const
bool GetSenderReportForBYE() const
RTPTransmissionInfo * GetTransmissionInfo()
void ScheduleBYEPacket(std::size_t packetsize)
int DeleteFromIgnoreList(const RTPAddress &addr)
RTPSessionSources sources
void SetNameInterval(int count)
double GetBYETimeoutMultiplier() const
bool GotoPreviousSourceWithData()
#define RTCP_SDES_MAXITEMLENGTH
int ProcessRawPacket(RTPRawPacket *rawpack, RTPTransmitter *trans, bool acceptownpackets)
virtual int AddToIgnoreList(const RTPAddress &addr)=0
std::size_t GetCompoundPacketLength()
std::string GetCNAME() const
int BuildPacket(const void *data, unsigned int len)
int BuildNextPacket(RTCPCompoundPacket **pack)
int AddSDESSource(uint32_t ssrc)
int InternalCreate(const RTPSessionParams &sessparams)
void SetToolInterval(int count)
int AddDestination(const RTPAddress &addr)
int SetLocalName(const void *s, std::size_t len)
void SetToolInterval(int count)
int SendRTCPData(const void *data, std::size_t len)
#define ERR_RTP_SESSION_ALREADYCREATED
virtual int DeleteFromIgnoreList(const RTPAddress &addr)=0
int SetMaximumPacketSize(std::size_t maxpacksize)
bool m_changeOutgoingData
#define RTP_MINPACKETSIZE
RTPCollisionList collisionlist
bool GotoFirstSourceWithData()
virtual void ClearAcceptList()=0
RTPSession(RTPRandom *rnd=0)
void SetEMailInterval(int count)
int SetSessionBandwidth(double bw)
RTPSourceData * GetSourceInfo(uint32_t ssrc)
int SetLocalEMail(const void *s, std::size_t len)
virtual void OnSentRTPOrRTCPData(void *senddata, std::size_t sendlen, bool isrtp)
double GetSourceTimeoutMultiplier() const
void SetNoteInterval(int count)
bool GetUseHalfRTCPIntervalAtStartup() const
int SetDefaultPayloadType(uint8_t pt)
int UpdateAddress(const RTPAddress *addr, const RTPTime &receivetime, bool *created)
int CreateOwnSSRC(uint32_t ssrc)
int SetTimestampUnit(double tsunit)
int SetDefaultPayloadType(uint8_t pt)
RTPTransmitter * rtptrans
bool GotoNextSourceWithData()
unsigned int GetPacketLength()
virtual int SetMaximumPacketSize(std::size_t s)=0
bool GotoPreviousSourceWithData()
int SetLocalTool(const void *s, std::size_t len)
virtual int JoinMulticastGroup(const RTPAddress &addr)=0
int SetLocalLocation(const void *s, std::size_t len)
void SetEMailInterval(int count)
RTPRandom * GetRandomNumberGenerator(RTPRandom *r)
virtual int LeaveMulticastGroup(const RTPAddress &addr)=0
void Timeout(const RTPTime ¤ttime, const RTPTime &timeoutdelay)
virtual int SetReceiveMode(RTPTransmitter::ReceiveMode m)=0
int SetLocalEMail(const void *s, std::size_t len)
virtual bool OnChangeIncomingData(RTPRawPacket *rawpack)
void SetLocationInterval(int count)
int SetDefaultTimestampIncrement(uint32_t timestampinc)
std::list< RTCPCompoundPacket * > byepackets
virtual int OnChangeRTPOrRTCPData(const void *origdata, std::size_t origlen, bool isrtp, void **senddata, std::size_t *sendlen)
void AdjustSSRC(uint32_t s)
int SetTimestampUnit(double u)
bool AcceptOwnPackets() const
int SetLocalLocation(const void *s, std::size_t len)
void SetParameters(const RTCPSchedulerParams ¶ms)
void SetPhoneInterval(int count)
int IncrementTimestampDefault()
static void Wait(const RTPTime &delay)
int SendRawData(const void *data, std::size_t len, bool usertpchannel)
bool GetRequestImmediateBYE() const
double collisionmultiplier
int StartReceiverReport(uint32_t senderssrc)
const RTPAddress & GetSenderAddress() const
int SetPreTransmissionDelay(const RTPTime &delay)
bool SupportsMulticasting()
static RTPRandom * CreateDefaultRandomNumberGenerator()
static RTPTime CurrentTime()
virtual bool SupportsMulticasting()=0
RTPTime GetMinimumRTCPTransmissionInterval() const
virtual void ClearIgnoreList()=0
virtual std::size_t GetHeaderOverhead()=0
void SetPhoneInterval(int count)
void AnalyseOutgoing(RTCPCompoundPacket &rtcpcomppack)
virtual void OnSendRTCPCompoundPacket(RTCPCompoundPacket *pack)
double GetNoteTimeoutMultiplier() const
int Init(std::size_t maxpacksize, double timestampunit, const void *cname, std::size_t cnamelen)
virtual void ClearDestinations()=0
RTPSourceData * GetCurrentSourceInfo()
int SetPreTransmissionDelay(const RTPTime &delay)
virtual int AddToAcceptList(const RTPAddress &addr)=0
int BuildPacketEx(const void *data, unsigned int len, uint16_t hdrextID, const void *hdrextdata, unsigned int numhdrextwords)
void ClearOwnCollisionFlag()
double GetSenderControlBandwidthFraction() const
uint32_t GetPredefinedSSRC() const
RTPTime GetTransmissionDelay()
uint8_t * GetLocalCNAME(std::size_t *len) const
int IncrementTimestampDefault()
RTPPacket * GetNextPacket()
bool GotoFirstSourceWithData()
int SetLocalName(const void *s, std::size_t len)
void DeleteTransmissionInfo(RTPTransmissionInfo *inf)
bool m_changeIncomingData
virtual int AddDestination(const RTPAddress &addr)=0
void SetNameInterval(int count)
int SendPacket(const void *data, std::size_t len)
int SetDefaultMark(bool m)
int SetMaximumPacketSize(unsigned int maxpacksize)
void SetLocationInterval(int count)
virtual RTPTransmissionInfo * GetTransmissionInfo()=0
RTPTime CalculateDeterministicInterval(bool sender=false)
int AddSDESNormalItem(RTCPSDESPacket::ItemType t, const void *itemdata, uint8_t itemlength)