mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refactor the RTP packet.
This commit is contained in:
parent
47df22df9e
commit
15955b6cdd
4 changed files with 4 additions and 15 deletions
|
@ -287,7 +287,6 @@ SrsRtpPacket2::SrsRtpPacket2()
|
|||
cache_payload = 0;
|
||||
|
||||
original_bytes = NULL;
|
||||
nn_original_bytes = 0;
|
||||
nn_original_payload = 0;
|
||||
}
|
||||
|
||||
|
@ -355,12 +354,6 @@ void SrsRtpPacket2::set_decode_handler(ISrsRtpPacketDecodeHandler* h)
|
|||
decode_handler = h;
|
||||
}
|
||||
|
||||
void SrsRtpPacket2::set_original_bytes(char* buf, int nn_buf)
|
||||
{
|
||||
original_bytes = buf;
|
||||
nn_original_bytes = nn_buf;
|
||||
}
|
||||
|
||||
int SrsRtpPacket2::nb_bytes()
|
||||
{
|
||||
if (!cache_payload) {
|
||||
|
|
|
@ -114,6 +114,7 @@ public:
|
|||
int padding;
|
||||
// Decoder helper.
|
||||
public:
|
||||
// TODO: FIXME: Move to video decoder queue SrsRtpVideoQueue.
|
||||
// Helper information for video decoder only.
|
||||
bool video_is_first_packet;
|
||||
bool video_is_last_packet;
|
||||
|
@ -122,11 +123,8 @@ public:
|
|||
SrsAvcNaluType nalu_type;
|
||||
// The original payload bytes length.
|
||||
int nn_original_payload;
|
||||
// Decoder helper.
|
||||
private:
|
||||
// The original bytes for decoder only, we will free it.
|
||||
char* original_bytes;
|
||||
int nn_original_bytes;
|
||||
// Fast cache for performance.
|
||||
private:
|
||||
// Cache frequently used payload for performance.
|
||||
|
@ -151,8 +149,6 @@ public:
|
|||
SrsRtpFUAPayload2* reuse_fua();
|
||||
// Set the decode handler.
|
||||
void set_decode_handler(ISrsRtpPacketDecodeHandler* h);
|
||||
// Set the original bytes.
|
||||
void set_original_bytes(char* buf, int nn_buf);
|
||||
// interface ISrsEncoder
|
||||
public:
|
||||
virtual int nb_bytes();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue