mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine async DVR manager.
This commit is contained in:
parent
b4774d02cc
commit
7c6bd0ce5c
4 changed files with 8 additions and 5 deletions
|
@ -566,8 +566,6 @@ string SrsDvrAsyncCallOnDvr::to_string()
|
|||
return ss.str();
|
||||
}
|
||||
|
||||
extern SrsAsyncCallWorker* _srs_dvr_async;
|
||||
|
||||
SrsDvrPlan::SrsDvrPlan()
|
||||
{
|
||||
req = NULL;
|
||||
|
|
|
@ -253,5 +253,7 @@ public:
|
|||
virtual srs_error_t on_video(SrsSharedPtrMessage* shared_video, SrsFormat* format);
|
||||
};
|
||||
|
||||
extern SrsAsyncCallWorker* _srs_dvr_async;
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <srs_kernel_error.hpp>
|
||||
#include <srs_protocol_st.hpp>
|
||||
#include <srs_app_utility.hpp>
|
||||
#include <srs_app_dvr.hpp>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -174,6 +175,11 @@ srs_error_t SrsHybridServer::initialize()
|
|||
return srs_error_wrap(err, "start timer");
|
||||
}
|
||||
|
||||
// Start the DVR async call.
|
||||
if ((err = _srs_dvr_async->start()) != srs_success) {
|
||||
return srs_error_wrap(err, "dvr async");
|
||||
}
|
||||
|
||||
// Register some timers.
|
||||
timer20ms_->subscribe(clock_monitor_);
|
||||
timer5s_->subscribe(this);
|
||||
|
|
|
@ -421,9 +421,6 @@ srs_error_t srs_thread_initialize()
|
|||
|
||||
// Create global async worker for DVR.
|
||||
_srs_dvr_async = new SrsAsyncCallWorker();
|
||||
if ((err = _srs_dvr_async->start()) != srs_success) {
|
||||
return srs_error_wrap(err, "dvr async");
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue