mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Refine audio to RTP packet base.
This commit is contained in:
parent
588d17c09d
commit
54d8c36905
7 changed files with 129 additions and 190 deletions
|
@ -280,6 +280,7 @@ SrsRtpPacket2::SrsRtpPacket2()
|
|||
|
||||
nalu_type = SrsAvcNaluTypeReserved;
|
||||
original_bytes = NULL;
|
||||
frame_type = SrsFrameTypeReserved;
|
||||
|
||||
cache_raw = new SrsRtpRawPayload();
|
||||
cache_fua = new SrsRtpFUAPayload2();
|
||||
|
@ -350,6 +351,11 @@ void SrsRtpPacket2::set_decode_handler(ISrsRtpPacketDecodeHandler* h)
|
|||
decode_handler = h;
|
||||
}
|
||||
|
||||
bool SrsRtpPacket2::is_audio()
|
||||
{
|
||||
return frame_type == SrsFrameTypeAudio;
|
||||
}
|
||||
|
||||
int SrsRtpPacket2::nb_bytes()
|
||||
{
|
||||
if (!cache_payload) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue