mirror of
https://github.com/mii443/libdatachannel.git
synced 2025-08-22 23:25:33 +00:00
Fixed the description of SDPs
This commit is contained in:
@ -690,6 +690,10 @@ public:
|
|||||||
return totalSize - (getBody() - reinterpret_cast<char *>(this));
|
return totalSize - (getBody() - reinterpret_cast<char *>(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[nodiscard]] size_t getSize() const{
|
||||||
|
return header.getSize() + sizeof(uint16_t);
|
||||||
|
}
|
||||||
|
|
||||||
[[nodiscard]] RTP &getHeader() { return header; }
|
[[nodiscard]] RTP &getHeader() { return header; }
|
||||||
|
|
||||||
size_t normalizePacket(size_t totalSize, SSRC originalSSRC, uint8_t originalPayloadType) {
|
size_t normalizePacket(size_t totalSize, SSRC originalSSRC, uint8_t originalPayloadType) {
|
||||||
@ -697,9 +701,8 @@ public:
|
|||||||
header.setSsrc(originalSSRC);
|
header.setSsrc(originalSSRC);
|
||||||
header.setPayloadType(originalPayloadType);
|
header.setPayloadType(originalPayloadType);
|
||||||
// TODO, the -12 is the size of the header (which is variable!)
|
// TODO, the -12 is the size of the header (which is variable!)
|
||||||
memmove(header.getBody(), header.getBody() + sizeof(uint16_t),
|
memmove(header.getBody(), getBody(), totalSize - getSize());
|
||||||
totalSize - 12 - sizeof(uint16_t));
|
return totalSize - getSize();
|
||||||
return totalSize - sizeof(uint16_t);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -839,6 +839,7 @@ void Description::Media::addRTPMap(const Description::Media::RTPMap &map) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::vector<uint32_t> Description::Media::getSSRCs() {
|
std::vector<uint32_t> Description::Media::getSSRCs() {
|
||||||
|
return mSsrcs;
|
||||||
std::vector<uint32_t> vec;
|
std::vector<uint32_t> vec;
|
||||||
for (auto &val : mAttributes) {
|
for (auto &val : mAttributes) {
|
||||||
PLOG_DEBUG << val;
|
PLOG_DEBUG << val;
|
||||||
|
Reference in New Issue
Block a user