完善日志

This commit is contained in:
xiongziliang
2019-10-23 12:00:53 +08:00
parent 7e1e735203
commit a739bd7304
4 changed files with 36 additions and 14 deletions

View File

@@ -44,13 +44,17 @@ RtmpSession::~RtmpSession() {
}
void RtmpSession::onError(const SockException& err) {
WarnP(this) << err.what();
bool isPlayer = !_pPublisherSrc;
WarnP(this) << (isPlayer ? "播放器(" : "推流器(")
<< _mediaInfo._vhost << "/"
<< _mediaInfo._app << "/"
<< _mediaInfo._streamid
<< ")断开:" << err.what();
//流量统计事件广播
GET_CONFIG(uint32_t,iFlowThreshold,General::kFlowThreshold);
if(_ui64TotalBytes > iFlowThreshold * 1024){
bool isPlayer = !_pPublisherSrc;
NoticeCenter::Instance().emitEvent(Broadcast::kBroadcastFlowReport,
_mediaInfo,
_ui64TotalBytes,