From 0d40bf9272cdc1cf82b249d5591e1dc016b51c1c Mon Sep 17 00:00:00 2001 From: renlu Date: Wed, 7 Dec 2022 08:52:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=BB=B6=E6=97=B630s?= =?UTF-8?q?=E5=86=8D=E5=88=A0=E9=99=A4=E7=9B=B4=E6=92=AD=E7=9A=84ts?= =?UTF-8?q?=E7=9A=84=E6=93=8D=E4=BD=9C=E3=80=82=E4=BB=8E=E7=9B=B4=E6=92=AD?= =?UTF-8?q?=E5=88=B0=E5=BD=95=E5=83=8F=E7=9B=B4=E6=8E=A5=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=9B=B4=E6=92=AD=E7=9A=848=E4=B8=AAts=E5=88=87=E7=89=87?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Record/HlsMakerSub.cpp | 11 ++++++----- src/Record/HlsMakerSub.h | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/Record/HlsMakerSub.cpp b/src/Record/HlsMakerSub.cpp index 7ebf99b6..361aeb33 100644 --- a/src/Record/HlsMakerSub.cpp +++ b/src/Record/HlsMakerSub.cpp @@ -30,7 +30,7 @@ HlsMakerSub::HlsMakerSub(float seg_duration, uint32_t seg_number, bool seg_keep) _seg_duration = seg_duration; _seg_keep = seg_keep; _is_record = false; - _poller = EventPollerPool::Instance().getPoller(); + //_poller = EventPollerPool::Instance().getPoller(); } HlsMakerSub::~HlsMakerSub() { @@ -53,10 +53,11 @@ void HlsMakerSub::startRecord(bool isRecord) { count ++; if (count < delete_file_paths.size()) { auto ts_path = it.second; - _poller->doDelayTask(30 * 1000, [ts_path]() { - File::delete_file(ts_path.data()); - return 0; - }); + File::delete_file(ts_path.data()); + //_poller->doDelayTask(30 * 1000, [ts_path]() { + // File::delete_file(ts_path.data()); + // return 0; + //}); } } } diff --git a/src/Record/HlsMakerSub.h b/src/Record/HlsMakerSub.h index 3904c358..622f1b5b 100644 --- a/src/Record/HlsMakerSub.h +++ b/src/Record/HlsMakerSub.h @@ -131,7 +131,7 @@ private: bool _is_record = false; bool _is_close_stream = false; std::string _m3u8_file_path; - toolkit::EventPoller::Ptr _poller; + //toolkit::EventPoller::Ptr _poller; public: std::map _segment_file_paths;