mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Tenfold: Connection support send rtcp packet
This commit is contained in:
parent
8c9935db44
commit
73eb60a9d5
2 changed files with 18 additions and 0 deletions
|
@ -2190,6 +2190,23 @@ srs_error_t SrsRtcConnection::notify(int type, srs_utime_t interval, srs_utime_t
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
srs_error_t SrsRtcConnection::send_rtcp(char *data, int nb_data)
|
||||||
|
{
|
||||||
|
srs_error_t err = srs_success;
|
||||||
|
|
||||||
|
int nb_buf = nb_data;
|
||||||
|
char protected_buf[kRtpPacketSize];
|
||||||
|
if ((err = transport_->protect_rtcp(data, protected_buf, nb_buf)) != srs_success) {
|
||||||
|
return srs_error_wrap(err, "protect rtcp");
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((err = sendonly_skt->sendto(protected_buf, nb_buf, 0)) != srs_success) {
|
||||||
|
return srs_error_wrap(err, "send");
|
||||||
|
}
|
||||||
|
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
void SrsRtcConnection::check_send_nacks(SrsRtpNackForReceiver* nack, uint32_t ssrc, uint32_t& sent_nacks)
|
void SrsRtcConnection::check_send_nacks(SrsRtpNackForReceiver* nack, uint32_t ssrc, uint32_t& sent_nacks)
|
||||||
{
|
{
|
||||||
// @see: https://tools.ietf.org/html/rfc4585#section-6.1
|
// @see: https://tools.ietf.org/html/rfc4585#section-6.1
|
||||||
|
|
|
@ -462,6 +462,7 @@ public:
|
||||||
virtual srs_error_t notify(int type, srs_utime_t interval, srs_utime_t tick);
|
virtual srs_error_t notify(int type, srs_utime_t interval, srs_utime_t tick);
|
||||||
public:
|
public:
|
||||||
// send rtcp
|
// send rtcp
|
||||||
|
srs_error_t send_rtcp(char *data, int nb_data);
|
||||||
void check_send_nacks(SrsRtpNackForReceiver* nack, uint32_t ssrc, uint32_t& sent_nacks);
|
void check_send_nacks(SrsRtpNackForReceiver* nack, uint32_t ssrc, uint32_t& sent_nacks);
|
||||||
srs_error_t send_rtcp_rr(uint32_t ssrc, SrsRtpRingBuffer* rtp_queue, const uint64_t& last_send_systime, const SrsNtp& last_send_ntp);
|
srs_error_t send_rtcp_rr(uint32_t ssrc, SrsRtpRingBuffer* rtp_queue, const uint64_t& last_send_systime, const SrsNtp& last_send_ntp);
|
||||||
srs_error_t send_rtcp_xr_rrtr(uint32_t ssrc);
|
srs_error_t send_rtcp_xr_rrtr(uint32_t ssrc);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue