mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #307, zero copy for RTP FUA packet
This commit is contained in:
parent
aa81b47c9a
commit
ca027ca5cb
5 changed files with 147 additions and 109 deletions
|
@ -121,6 +121,27 @@ public:
|
|||
virtual srs_error_t encode(SrsBuffer* buf);
|
||||
};
|
||||
|
||||
class SrsRtpFUAPayload : public ISrsEncoder
|
||||
{
|
||||
public:
|
||||
// The NRI in NALU type.
|
||||
SrsAvcNaluType nri;
|
||||
// The FUA header.
|
||||
bool start;
|
||||
bool end;
|
||||
SrsAvcNaluType nalu_type;
|
||||
// The NALU samples.
|
||||
// @remark We only refer to the memory, user must free its bytes.
|
||||
std::vector<SrsSample*> nalus;
|
||||
public:
|
||||
SrsRtpFUAPayload();
|
||||
virtual ~SrsRtpFUAPayload();
|
||||
// interface ISrsEncoder
|
||||
public:
|
||||
virtual int nb_bytes();
|
||||
virtual srs_error_t encode(SrsBuffer* buf);
|
||||
};
|
||||
|
||||
class SrsRtpSharedPacket
|
||||
{
|
||||
private:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue