NoticeCenter支持安全类型转换,解决监听者参数类型不一致导致的bug

This commit is contained in:
xia-chu
2023-09-02 10:52:07 +08:00
parent c35b5e9215
commit d286ac1d73
22 changed files with 43 additions and 46 deletions

View File

@@ -77,7 +77,7 @@ void WebRtcPlayer::onDestory() {
if (_reader && getSession()) {
WarnL << "RTC播放器(" << _media_info.shortUrl() << ")结束播放,耗时(s):" << duration;
if (bytes_usage >= iFlowThreshold * 1024) {
NoticeCenter::Instance().emitEvent(Broadcast::kBroadcastFlowReport, _media_info, bytes_usage, duration, true, static_cast<SockInfo &>(*getSession()));
NOTICE_EMIT(BroadcastFlowReportArgs, Broadcast::kBroadcastFlowReport, _media_info, bytes_usage, duration, true, *getSession());
}
}
WebRtcTransportImp::onDestory();