mirror of
https://github.com/ossrs/srs.git
synced 2025-02-13 11:51:57 +00:00
RTC: Use error pithy print for RTP packet error
This commit is contained in:
parent
cf9a8c7dcb
commit
250a703588
2 changed files with 5 additions and 8 deletions
|
@ -544,10 +544,7 @@ srs_error_t SrsUdpMuxListener::cycle()
|
|||
if (err != srs_success) {
|
||||
if (pp_pkt_handler_err->can_print(err)) {
|
||||
// Append more information.
|
||||
if (true) {
|
||||
char* data = skt.data(); int size = skt.size();
|
||||
err = srs_error_wrap(err, "size=%u, data=[%s]", size, srs_string_dumps_hex(data, size, 8).c_str());
|
||||
}
|
||||
err = srs_error_wrap(err, "size=%u, data=[%s]", skt.size(), srs_string_dumps_hex(skt.data(), skt.size(), 8).c_str());
|
||||
srs_warn("handle udp pkt, count=%u, err: %s", pp_pkt_handler_err->nn_count, srs_error_desc(err).c_str());
|
||||
}
|
||||
srs_freep(err);
|
||||
|
|
|
@ -459,6 +459,7 @@ srs_error_t SrsRtcPlayStream::cycle()
|
|||
srs_trace("RTC: start play url=%s, source_id=[%d][%s], realtime=%d, mw_msgs=%d", req_->get_stream_url().c_str(),
|
||||
::getpid(), cid.c_str(), realtime, mw_msgs);
|
||||
|
||||
SrsErrorPithyPrint epp;
|
||||
SrsPithyPrint* pprint = SrsPithyPrint::create_rtc_play();
|
||||
SrsAutoFree(SrsPithyPrint, pprint);
|
||||
|
||||
|
@ -499,12 +500,11 @@ srs_error_t SrsRtcPlayStream::cycle()
|
|||
if (true) {
|
||||
err = send_packets(source, pkts, info);
|
||||
|
||||
// TODO: FIXME: Use pithy print to show more smart information.
|
||||
if (err != srs_success) {
|
||||
err = srs_error_wrap(err, "RTP, SSRC=%u, SEQ=%u", pkt->header.get_ssrc(), pkt->header.get_sequence());
|
||||
if (epp.can_print(err)) {
|
||||
err = srs_error_wrap(err, "RTP packets=%u, SSRC=%u, SEQ=%u", pkts.size(), pkt->header.get_ssrc(), pkt->header.get_sequence());
|
||||
srs_warn("play send packets, err: %s", srs_error_desc(err).c_str());
|
||||
srs_freep(err);
|
||||
}
|
||||
srs_freep(err);
|
||||
|
||||
for (int i = 0; i < msg_count; i++) {
|
||||
SrsRtpPacket2* pkt = pkts[i];
|
||||
|
|
Loading…
Reference in a new issue