完善线程安全设计

This commit is contained in:
xiongziliang
2022-08-27 10:17:06 +08:00
parent 8b0bd2d224
commit c2ab45f78d
15 changed files with 89 additions and 59 deletions

View File

@@ -139,6 +139,10 @@ int RtpSession::totalReaderCount(MediaSource &sender) {
return _process ? _process->getTotalReaderCount() : sender.totalReaderCount();
}
toolkit::EventPoller::Ptr RtpSession::getOwnerPoller(MediaSource &sender) {
return getPoller();
}
static const char *findSSRC(const char *data, ssize_t len, uint32_t ssrc) {
//rtp前面必须预留两个字节的长度字段
for (ssize_t i = 2; i <= len - 4; ++i) {