mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-08-22 15:15:28 +00:00
Merge pull request #371 from stazio/fix_typos
Fixed the description of SDPs and refactor RTP_RTX packets
This commit is contained in:
@ -716,16 +716,22 @@ public:
|
||||
return totalSize - (getBody() - reinterpret_cast<char *>(this));
|
||||
}
|
||||
|
||||
[[nodiscard]] size_t getSize() const{
|
||||
return header.getSize() + sizeof(uint16_t);
|
||||
}
|
||||
|
||||
[[nodiscard]] RTP &getHeader() { return header; }
|
||||
|
||||
/*
|
||||
* Returns the new size of the packet
|
||||
*/
|
||||
size_t normalizePacket(size_t totalSize, SSRC originalSSRC, uint8_t originalPayloadType) {
|
||||
header.setSeqNumber(getOriginalSeqNo());
|
||||
header.setSsrc(originalSSRC);
|
||||
header.setPayloadType(originalPayloadType);
|
||||
// TODO, the -12 is the size of the header (which is variable!)
|
||||
memmove(header.getBody(), header.getBody() + sizeof(uint16_t),
|
||||
totalSize - 12 - sizeof(uint16_t));
|
||||
return totalSize - sizeof(uint16_t);
|
||||
memmove(header.getBody(), getBody(), totalSize - getSize());
|
||||
return totalSize - 2;
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -844,14 +844,7 @@ void Description::Media::addRTPMap(const Description::Media::RTPMap &map) {
|
||||
}
|
||||
|
||||
std::vector<uint32_t> Description::Media::getSSRCs() {
|
||||
std::vector<uint32_t> vec;
|
||||
for (auto &val : mAttributes) {
|
||||
PLOG_DEBUG << val;
|
||||
if (val.find("ssrc:") == 0) {
|
||||
vec.emplace_back(to_integer<uint32_t>(val.substr(5, val.find(" "))));
|
||||
}
|
||||
}
|
||||
return vec;
|
||||
return mSsrcs;
|
||||
}
|
||||
|
||||
std::map<int, Description::Media::RTPMap>::iterator Description::Media::beginMaps() {
|
||||
|
Reference in New Issue
Block a user