添加媒体生成源信息

This commit is contained in:
xiongziliang
2020-09-27 11:32:49 +08:00
parent 2cf66594e8
commit 5cd8e8ae1c
20 changed files with 249 additions and 12 deletions

View File

@@ -543,6 +543,18 @@ int RtmpSession::totalReaderCount(MediaSource &sender) {
return _publisher_src ? _publisher_src->totalReaderCount() : sender.readerCount();
}
MediaOriginType RtmpSession::getOriginType(MediaSource &sender) const{
return MediaOriginType::rtmp_push;
}
string RtmpSession::getOriginUrl(MediaSource &sender) const {
return _media_info._full_url;
}
std::shared_ptr<SockInfo> RtmpSession::getOriginSock(MediaSource &sender) const {
return const_cast<RtmpSession *>(this)->shared_from_this();
}
void RtmpSession::setSocketFlags(){
GET_CONFIG(int, merge_write_ms, General::kMergeWriteMS);
if (merge_write_ms > 0) {