mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Cache the RTP payload objects
This commit is contained in:
parent
d5b210abc8
commit
bffe9c5f4b
4 changed files with 38 additions and 19 deletions
|
@ -394,12 +394,6 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
// For RTP packets cache.
|
||||
extern SrsRtpObjectCacheManager<SrsRtpPacket2>* _srs_rtp_cache;
|
||||
|
||||
// For RTP packet shared messages cache.
|
||||
extern SrsRtpObjectCacheManager<SrsSharedPtrMessage>* _srs_rtp_msg_cache;
|
||||
|
||||
// Single payload data.
|
||||
class SrsRtpRawPayload : public ISrsRtpPayloader
|
||||
{
|
||||
|
@ -411,6 +405,8 @@ public:
|
|||
public:
|
||||
SrsRtpRawPayload();
|
||||
virtual ~SrsRtpRawPayload();
|
||||
public:
|
||||
bool reset() { return true; }
|
||||
// interface ISrsRtpPayloader
|
||||
public:
|
||||
virtual uint64_t nb_bytes();
|
||||
|
@ -509,6 +505,8 @@ public:
|
|||
public:
|
||||
SrsRtpFUAPayload2();
|
||||
virtual ~SrsRtpFUAPayload2();
|
||||
public:
|
||||
bool reset() { return true; }
|
||||
// interface ISrsRtpPayloader
|
||||
public:
|
||||
virtual uint64_t nb_bytes();
|
||||
|
@ -517,4 +515,12 @@ public:
|
|||
virtual ISrsRtpPayloader* copy();
|
||||
};
|
||||
|
||||
// For RTP packets cache.
|
||||
extern SrsRtpObjectCacheManager<SrsRtpPacket2>* _srs_rtp_cache;
|
||||
extern SrsRtpObjectCacheManager<SrsRtpRawPayload>* _srs_rtp_raw_cache;
|
||||
extern SrsRtpObjectCacheManager<SrsRtpFUAPayload2>* _srs_rtp_fua_cache;
|
||||
|
||||
// For RTP packet shared messages cache.
|
||||
extern SrsRtpObjectCacheManager<SrsSharedPtrMessage>* _srs_rtp_msg_cache;
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue