添加媒体生成源信息

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

@@ -1105,6 +1105,18 @@ int RtspSession::totalReaderCount(MediaSource &sender) {
return _push_src ? _push_src->totalReaderCount() : sender.readerCount();
}
MediaOriginType RtspSession::getOriginType(MediaSource &sender) const{
return MediaOriginType::rtsp_push;
}
string RtspSession::getOriginUrl(MediaSource &sender) const {
return _media_info._full_url;
}
std::shared_ptr<SockInfo> RtspSession::getOriginSock(MediaSource &sender) const {
return const_cast<RtspSession *>(this)->shared_from_this();
}
inline void RtspSession::onSendRtpPacket(const RtpPacket::Ptr &pkt){
#if RTSP_SERVER_SEND_RTCP
int track_index = getTrackIndexByTrackType(pkt->type);