mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 03:41:55 +00:00
RTC: Refine comments for SrsRtpPacket2
This commit is contained in:
parent
d6c16a7e23
commit
f2d0c34244
2 changed files with 5 additions and 1 deletions
|
@ -1040,6 +1040,7 @@ srs_error_t SrsRtpPacket2::decode(SrsBuffer* buf)
|
|||
nalu_type = SrsAvcNaluType((uint8_t)(buf->head()[0] & kNalTypeMask));
|
||||
}
|
||||
|
||||
// TODO: FIXME: We should keep payload to NULL and return if buffer is empty.
|
||||
// If user set the decode handler, call it to set the payload.
|
||||
if (decode_handler) {
|
||||
decode_handler->on_before_decode_payload(this, buf, &payload_, &payload_type_);
|
||||
|
|
|
@ -294,8 +294,10 @@ private:
|
|||
private:
|
||||
// The original shared message, all RTP packets can refer to its data.
|
||||
// Note that the size of shared msg, is not the packet size, it's a larger aligned buffer.
|
||||
// @remark Note that it may point to the whole RTP packet(for RTP parser, which decode RTP packet from buffer),
|
||||
// and it may point to the RTP payload(for RTMP to RTP, which build RTP header and payload).
|
||||
SrsSharedPtrMessage* shared_buffer_;
|
||||
// The size of original packet.
|
||||
// The size of RTP packet or RTP payload.
|
||||
int actual_buffer_size_;
|
||||
// Helper fields.
|
||||
public:
|
||||
|
@ -333,6 +335,7 @@ public:
|
|||
// Parse the TWCC extension, ignore by default.
|
||||
void enable_twcc_decode() { header.enable_twcc_decode(); } // SrsRtpPacket2::enable_twcc_decode
|
||||
// Get and set the payload of packet.
|
||||
// @remark Note that return NULL if no payload.
|
||||
void set_payload(ISrsRtpPayloader* p, SrsRtpPacketPayloadType pt) { payload_ = p; payload_type_ = pt; }
|
||||
ISrsRtpPayloader* payload() { return payload_; }
|
||||
// Set the padding of RTP packet.
|
||||
|
|
Loading…
Reference in a new issue