mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refactor the logs.
This commit is contained in:
parent
1b08fb6b6e
commit
6fbd41cff4
2 changed files with 11 additions and 1 deletions
|
@ -1563,6 +1563,8 @@ SrsRtcPublisher::SrsRtcPublisher(SrsRtcSession* session)
|
||||||
source = NULL;
|
source = NULL;
|
||||||
nn_simulate_nack_drop = 0;
|
nn_simulate_nack_drop = 0;
|
||||||
nack_enabled_ = false;
|
nack_enabled_ = false;
|
||||||
|
|
||||||
|
nn_audio_frames = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SrsRtcPublisher::~SrsRtcPublisher()
|
SrsRtcPublisher::~SrsRtcPublisher()
|
||||||
|
@ -2094,6 +2096,11 @@ srs_error_t SrsRtcPublisher::on_audio_frame(SrsRtpPacket2* frame)
|
||||||
// TODO: FIXME: Check error.
|
// TODO: FIXME: Check error.
|
||||||
source->on_rtc_audio(&msg);
|
source->on_rtc_audio(&msg);
|
||||||
|
|
||||||
|
if (nn_audio_frames++ == 0) {
|
||||||
|
SrsRtpHeader* h = &frame->rtp_header;
|
||||||
|
srs_trace("RTC got Opus seq=%u, ssrc=%u, ts=%u, %d bytes", h->get_sequence(), h->get_ssrc(), h->get_timestamp(), payload->nn_payload);
|
||||||
|
}
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2217,7 +2224,9 @@ srs_error_t SrsRtcPublisher::on_video_frame(SrsRtpPacket2* frame)
|
||||||
|
|
||||||
if (frame->nalu_type == SrsAvcNaluTypeIDR) {
|
if (frame->nalu_type == SrsAvcNaluTypeIDR) {
|
||||||
buf.write_1bytes(0x17); // Keyframe.
|
buf.write_1bytes(0x17); // Keyframe.
|
||||||
srs_trace("RTC got IDR %d bytes", nn_payload);
|
|
||||||
|
SrsRtpHeader* h = &frame->rtp_header;
|
||||||
|
srs_trace("RTC got IDR seq=%u, ssrc=%u, ts=%u, %d bytes", h->get_sequence(), h->get_ssrc(), h->get_timestamp(), nn_payload);
|
||||||
} else {
|
} else {
|
||||||
buf.write_1bytes(0x27); // Not-Keyframe.
|
buf.write_1bytes(0x27); // Not-Keyframe.
|
||||||
}
|
}
|
||||||
|
|
|
@ -273,6 +273,7 @@ class SrsRtcPublisher : virtual public ISrsHourGlass, virtual public ISrsRtpPack
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
SrsHourGlass* report_timer;
|
SrsHourGlass* report_timer;
|
||||||
|
uint64_t nn_audio_frames;
|
||||||
private:
|
private:
|
||||||
SrsRtcSession* session_;
|
SrsRtcSession* session_;
|
||||||
uint32_t video_ssrc;
|
uint32_t video_ssrc;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue