mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-15 04:25:58 +08:00
整理媒体事件相关代码,删除无须重载时的多余代码逻辑
This commit is contained in:
@@ -592,7 +592,7 @@ MediaSource::Ptr MediaSource::createFromMP4(const string &schema, const string &
|
||||
/////////////////////////////////////MediaSourceEvent//////////////////////////////////////
|
||||
|
||||
void MediaSourceEvent::onReaderChanged(MediaSource &sender, int size){
|
||||
if (size || totalReaderCount(sender)) {
|
||||
if (size || sender.totalReaderCount()) {
|
||||
//还有人观看该视频,不触发关闭事件
|
||||
_async_close_timer = nullptr;
|
||||
return;
|
||||
@@ -736,7 +736,6 @@ toolkit::EventPoller::Ptr MediaSourceEventInterceptor::getOwnerPoller(MediaSourc
|
||||
return EventPollerPool::Instance().getPoller();
|
||||
}
|
||||
|
||||
|
||||
bool MediaSourceEventInterceptor::setupRecord(MediaSource &sender, Recorder::type type, bool start, const string &custom_path, size_t max_second) {
|
||||
auto listener = _listener.lock();
|
||||
if (!listener) {
|
||||
|
||||
Reference in New Issue
Block a user