mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
RTC: Update stat for recv track
This commit is contained in:
parent
b3212a12de
commit
a035d312f9
1 changed files with 8 additions and 0 deletions
|
@ -1649,6 +1649,10 @@ srs_error_t SrsRtcAudioRecvTrack::on_rtp(SrsRtcStream* source, SrsRtpPacket2* pk
|
||||||
// connection level statistic
|
// connection level statistic
|
||||||
session_->stat_->nn_in_audios++;
|
session_->stat_->nn_in_audios++;
|
||||||
|
|
||||||
|
// track level statistic
|
||||||
|
statistic_->packets++;
|
||||||
|
statistic_->bytes += pkt->nb_bytes();
|
||||||
|
|
||||||
if (source) {
|
if (source) {
|
||||||
if ((err = source->on_rtp(pkt)) != srs_success) {
|
if ((err = source->on_rtp(pkt)) != srs_success) {
|
||||||
return srs_error_wrap(err, "source on rtp");
|
return srs_error_wrap(err, "source on rtp");
|
||||||
|
@ -1680,6 +1684,10 @@ srs_error_t SrsRtcVideoRecvTrack::on_rtp(SrsRtcStream* source, SrsRtpPacket2* pk
|
||||||
// connection level statistic
|
// connection level statistic
|
||||||
session_->stat_->nn_in_videos++;
|
session_->stat_->nn_in_videos++;
|
||||||
|
|
||||||
|
// track level statistic
|
||||||
|
statistic_->packets++;
|
||||||
|
statistic_->bytes += pkt->nb_bytes();
|
||||||
|
|
||||||
pkt->frame_type = SrsFrameTypeVideo;
|
pkt->frame_type = SrsFrameTypeVideo;
|
||||||
|
|
||||||
if (source) {
|
if (source) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue