1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

RTC: Refactor code

This commit is contained in:
winlin 2020-05-19 17:49:34 +08:00
parent 23ddcbdaed
commit e3d010113f
5 changed files with 47 additions and 25 deletions

View file

@ -36,6 +36,11 @@ SrsRtcpCommon::~SrsRtcpCommon()
{
}
const uint8_t SrsRtcpCommon::type() const
{
return header_.type;
}
srs_error_t SrsRtcpCommon::decode_header(SrsBuffer *buffer)
{
buffer->read_bytes((char*)(&header_), sizeof(SrsRtcpHeader));
@ -84,6 +89,11 @@ SrsRtcpApp::~SrsRtcpApp()
{
}
const uint8_t SrsRtcpApp::type() const
{
return SrsRtcpType_app;
}
const uint32_t SrsRtcpApp::get_ssrc() const
{
return ssrc_;
@ -200,7 +210,16 @@ SrsRtcpSR::SrsRtcpSR()
SrsRtcpSR::~SrsRtcpSR()
{
}
const uint8_t SrsRtcpSR::get_rc() const
{
return header_.rc;
}
const uint8_t SrsRtcpSR::type() const
{
return SrsRtcpType_sr;
}
const uint32_t SrsRtcpSR::get_sender_ssrc() const
@ -314,6 +333,11 @@ SrsRtcpRR::~SrsRtcpRR()
{
}
const uint8_t SrsRtcpRR::type() const
{
return SrsRtcpType_rr;
}
const uint32_t SrsRtcpRR::get_rb_ssrc() const
{
return rb_.ssrc;