rtcp: Rename sender report and receiver report variables
The r_frame and s_frame are not as clear as rr_frame and sr_frame.
This commit is contained in:
parent
9f65174be9
commit
4b97303271
|
@ -67,8 +67,8 @@ namespace uvgrtp {
|
|||
|
||||
/* Save the latest RTCP packets received from this participant
|
||||
* Users can query these packets using the SSRC of participant */
|
||||
uvgrtp::frame::rtcp_sender_report *s_frame = nullptr;
|
||||
uvgrtp::frame::rtcp_receiver_report *r_frame = nullptr;
|
||||
uvgrtp::frame::rtcp_sender_report *sr_frame = nullptr;
|
||||
uvgrtp::frame::rtcp_receiver_report *rr_frame = nullptr;
|
||||
uvgrtp::frame::rtcp_sdes_packet *sdes_frame = nullptr;
|
||||
uvgrtp::frame::rtcp_app_packet *app_frame = nullptr;
|
||||
};
|
||||
|
|
|
@ -176,8 +176,8 @@ rtp_error_t uvgrtp::rtcp::add_participant(uint32_t ssrc)
|
|||
}
|
||||
num_receivers_++;
|
||||
|
||||
participants_[ssrc]->r_frame = nullptr;
|
||||
participants_[ssrc]->s_frame = nullptr;
|
||||
participants_[ssrc]->rr_frame = nullptr;
|
||||
participants_[ssrc]->sr_frame = nullptr;
|
||||
participants_[ssrc]->sdes_frame = nullptr;
|
||||
participants_[ssrc]->app_frame = nullptr;
|
||||
|
||||
|
|
|
@ -8,8 +8,8 @@ uvgrtp::frame::rtcp_receiver_report *uvgrtp::rtcp::get_receiver_packet(uint32_t
|
|||
if (participants_.find(ssrc) == participants_.end())
|
||||
return nullptr;
|
||||
|
||||
auto frame = participants_[ssrc]->r_frame;
|
||||
participants_[ssrc]->r_frame = nullptr;
|
||||
auto frame = participants_[ssrc]->rr_frame;
|
||||
participants_[ssrc]->rr_frame = nullptr;
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
@ -52,8 +52,8 @@ rtp_error_t uvgrtp::rtcp::handle_receiver_report_packet(uint8_t *packet, size_t
|
|||
}
|
||||
|
||||
/* Deallocate previous frame from the buffer if it exists, it's going to get overwritten */
|
||||
if (participants_[frame->ssrc]->r_frame)
|
||||
delete participants_[frame->ssrc]->r_frame;
|
||||
if (participants_[frame->ssrc]->rr_frame)
|
||||
delete participants_[frame->ssrc]->rr_frame;
|
||||
|
||||
for (int i = 0; i < frame->header.count; ++i) {
|
||||
uvgrtp::frame::rtcp_report_block report;
|
||||
|
@ -72,7 +72,7 @@ rtp_error_t uvgrtp::rtcp::handle_receiver_report_packet(uint8_t *packet, size_t
|
|||
if (receiver_hook_)
|
||||
receiver_hook_(frame);
|
||||
else
|
||||
participants_[frame->ssrc]->r_frame = frame;
|
||||
participants_[frame->ssrc]->rr_frame = frame;
|
||||
|
||||
return RTP_OK;
|
||||
}
|
||||
|
|
|
@ -8,8 +8,8 @@ uvgrtp::frame::rtcp_sender_report *uvgrtp::rtcp::get_sender_packet(uint32_t ssrc
|
|||
if (participants_.find(ssrc) == participants_.end())
|
||||
return nullptr;
|
||||
|
||||
auto frame = participants_[ssrc]->s_frame;
|
||||
participants_[ssrc]->s_frame = nullptr;
|
||||
auto frame = participants_[ssrc]->sr_frame;
|
||||
participants_[ssrc]->sr_frame = nullptr;
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
@ -42,8 +42,8 @@ rtp_error_t uvgrtp::rtcp::handle_sender_report_packet(uint8_t *packet, size_t si
|
|||
}
|
||||
|
||||
/* Deallocate previous frame from the buffer if it exists, it's going to get overwritten */
|
||||
if (participants_[frame->ssrc]->s_frame)
|
||||
delete participants_[frame->ssrc]->s_frame;
|
||||
if (participants_[frame->ssrc]->sr_frame)
|
||||
delete participants_[frame->ssrc]->sr_frame;
|
||||
|
||||
frame->sender_info.ntp_msw = ntohl(*(uint32_t *)&packet[ 8]);
|
||||
frame->sender_info.ntp_lsw = ntohl(*(uint32_t *)&packet[12]);
|
||||
|
@ -73,7 +73,7 @@ rtp_error_t uvgrtp::rtcp::handle_sender_report_packet(uint8_t *packet, size_t si
|
|||
if (sender_hook_)
|
||||
sender_hook_(frame);
|
||||
else
|
||||
participants_[frame->ssrc]->s_frame = frame;
|
||||
participants_[frame->ssrc]->sr_frame = frame;
|
||||
|
||||
return RTP_OK;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue