37 #ifndef RTCPSDESPACKET_H 39 #define RTCPSDESPACKET_H 52 class RTCPCompoundPacket;
86 int GetChunkCount()
const;
92 bool GotoFirstChunk();
108 bool GotoFirstItem();
120 std::size_t GetItemLength()
const;
125 #ifdef RTP_SUPPORT_SDESPRIV 129 std::size_t GetPRIVPrefixLength()
const;
139 std::size_t GetPRIVValueLength()
const;
145 #endif // RTP_SUPPORT_SDESPRIV 159 return ((
int) hdr->
count);
164 if (GetChunkCount() == 0)
179 if (currentchunk == 0)
181 if (curchunknum == GetChunkCount())
184 std::size_t offset =
sizeof(
uint32_t);
187 while (sdeshdr->
sdesid != 0)
190 offset += (std::size_t)(sdeshdr->
length);
194 if ((offset & 0x03) != 0)
195 offset += (4 - (offset & 0x03));
196 currentchunk += offset;
206 if (currentchunk == 0)
209 return m_endian.qToHost(*ssrc);
216 if (currentchunk == 0)
229 if (currentchunk == 0)
236 std::size_t offset = itemoffset;
238 offset += (std::size_t)(sdeshdr->
length);
250 if (currentchunk == 0)
283 if (currentchunk == 0)
288 return (std::size_t)(sdeshdr->
length);
295 if (currentchunk == 0)
303 #ifdef RTP_SUPPORT_SDESPRIV 308 if (currentchunk == 0)
316 std::size_t prefixlength = (std::size_t)(*preflen);
317 if (prefixlength > (std::size_t)((sdeshdr->
length) - 1))
326 if (currentchunk == 0)
334 std::size_t prefixlength = (std::size_t)(*preflen);
335 if (prefixlength > (std::size_t)((sdeshdr->
length) - 1))
337 if (prefixlength == 0)
346 if (currentchunk == 0)
354 std::size_t prefixlength = (std::size_t)(*preflen);
355 if (prefixlength > (std::size_t)((sdeshdr->
length) - 1))
357 return ((std::size_t)(sdeshdr->
length)) - prefixlength - 1;
364 if (currentchunk == 0)
372 std::size_t prefixlength = (std::size_t)(*preflen);
373 if (prefixlength > (std::size_t)((sdeshdr->
length) - 1))
375 std::size_t valuelen = ((std::size_t)(sdeshdr->
length)) - prefixlength - 1;
378 return (currentchunk + itemoffset +
sizeof(
RTCPSDESHeader) + 1 + prefixlength);
381 #endif // RTP_SUPPORT_SDESPRIV 385 #endif // RTCPSDESPACKET_H
#define RTCP_SDES_ID_EMAIL
#define RTCP_SDES_ID_LOCATION
std::size_t GetPRIVValueLength() const
std::size_t GetItemLength() const
std::size_t GetPRIVPrefixLength() const
#define RTCP_SDES_ID_NOTE
uint32_t GetChunkSSRC() const
uint8_t * GetPRIVPrefixData()
ItemType GetItemType() const
#define RTCP_SDES_ID_TOOL
int GetChunkCount() const
#define RTCP_SDES_ID_CNAME
#define RTCP_SDES_ID_NAME
#define RTCP_SDES_ID_PHONE
uint8_t * GetPRIVValueData()
#define RTCP_SDES_ID_PRIVATE