初步实现hls播放器个数计数

This commit is contained in:
xiongziliang
2019-12-28 16:48:11 +08:00
parent 20d56b713f
commit 94806b2cd6
19 changed files with 111 additions and 59 deletions

View File

@@ -232,6 +232,14 @@ void FFmpegSource::onNoneReader(MediaSource &sender) {
}
}
int FFmpegSource::totalReaderCount(MediaSource &sender) {
auto listener = _listener.lock();
if(listener){
return listener->totalReaderCount(sender);
}
return 0;
}
void FFmpegSource::onGetMediaSource(const MediaSource::Ptr &src) {
_listener = src->getListener();
src->setListener(shared_from_this());