mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-24 01:42:22 +08:00
添加媒体生成源信息
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -69,9 +69,17 @@ private:
|
||||
sendResponse(MSG_CMD, invoke.data());
|
||||
}
|
||||
|
||||
//MediaSourceEvent override
|
||||
bool close(MediaSource &sender,bool force) override ;
|
||||
///////MediaSourceEvent override///////
|
||||
// 关闭
|
||||
bool close(MediaSource &sender, bool force) override;
|
||||
// 播放总人数
|
||||
int totalReaderCount(MediaSource &sender) override;
|
||||
// 获取媒体源类型
|
||||
MediaOriginType getOriginType(MediaSource &sender) const override;
|
||||
// 获取媒体源url或者文件路径
|
||||
string getOriginUrl(MediaSource &sender) const override;
|
||||
// 获取媒体源客户端相关信息
|
||||
std::shared_ptr<SockInfo> getOriginSock(MediaSource &sender) const override;
|
||||
|
||||
void setSocketFlags();
|
||||
string getStreamId(const string &str);
|
||||
|
||||
Reference in New Issue
Block a user