mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refactor RTC video queue, extract RTP video packet
This commit is contained in:
parent
899dddb624
commit
c4b93b8a38
4 changed files with 85 additions and 58 deletions
|
@ -277,17 +277,12 @@ SrsRtpPacket2::SrsRtpPacket2()
|
|||
payload = NULL;
|
||||
decode_handler = NULL;
|
||||
|
||||
video_is_first_packet = false;
|
||||
video_is_last_packet = false;
|
||||
video_is_idr = false;
|
||||
nalu_type = SrsAvcNaluTypeReserved;
|
||||
original_bytes = NULL;
|
||||
|
||||
cache_raw = new SrsRtpRawPayload();
|
||||
cache_fua = new SrsRtpFUAPayload2();
|
||||
cache_payload = 0;
|
||||
|
||||
original_bytes = NULL;
|
||||
nn_original_payload = 0;
|
||||
}
|
||||
|
||||
SrsRtpPacket2::~SrsRtpPacket2()
|
||||
|
@ -408,7 +403,6 @@ srs_error_t SrsRtpPacket2::decode(SrsBuffer* buf)
|
|||
// If user set the decode handler, call it to set the payload.
|
||||
if (decode_handler) {
|
||||
decode_handler->on_before_decode_payload(this, buf, &payload);
|
||||
nn_original_payload = buf->left();
|
||||
}
|
||||
|
||||
// By default, we always use the RAW payload.
|
||||
|
|
|
@ -114,15 +114,8 @@ 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;
|
||||
bool video_is_idr;
|
||||
// The first byte as nalu type, for video decoder only.
|
||||
SrsAvcNaluType nalu_type;
|
||||
// The original payload bytes length.
|
||||
int nn_original_payload;
|
||||
// The original bytes for decoder only, we will free it.
|
||||
char* original_bytes;
|
||||
// Fast cache for performance.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue