mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
parent
fc380fe48d
commit
44f542f77f
7 changed files with 28 additions and 151 deletions
|
@ -26,74 +26,6 @@
|
|||
#include <srs_kernel_error.hpp>
|
||||
#include <srs_kernel_log.hpp>
|
||||
|
||||
ISrsEndlessThreadHandler::ISrsEndlessThreadHandler()
|
||||
{
|
||||
}
|
||||
|
||||
ISrsEndlessThreadHandler::~ISrsEndlessThreadHandler()
|
||||
{
|
||||
}
|
||||
|
||||
void ISrsEndlessThreadHandler::on_thread_start()
|
||||
{
|
||||
}
|
||||
|
||||
int ISrsEndlessThreadHandler::on_before_cycle()
|
||||
{
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
int ISrsEndlessThreadHandler::on_end_cycle()
|
||||
{
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
|
||||
void ISrsEndlessThreadHandler::on_thread_stop()
|
||||
{
|
||||
}
|
||||
|
||||
SrsEndlessThread::SrsEndlessThread(const char* n, ISrsEndlessThreadHandler* h)
|
||||
{
|
||||
handler = h;
|
||||
pthread = new internal::SrsThread(n, this, 0, false);
|
||||
}
|
||||
|
||||
SrsEndlessThread::~SrsEndlessThread()
|
||||
{
|
||||
pthread->stop();
|
||||
srs_freep(pthread);
|
||||
}
|
||||
|
||||
int SrsEndlessThread::start()
|
||||
{
|
||||
return pthread->start();
|
||||
}
|
||||
|
||||
int SrsEndlessThread::cycle()
|
||||
{
|
||||
return handler->cycle();
|
||||
}
|
||||
|
||||
void SrsEndlessThread::on_thread_start()
|
||||
{
|
||||
handler->on_thread_start();
|
||||
}
|
||||
|
||||
int SrsEndlessThread::on_before_cycle()
|
||||
{
|
||||
return handler->on_before_cycle();
|
||||
}
|
||||
|
||||
int SrsEndlessThread::on_end_cycle()
|
||||
{
|
||||
return handler->on_end_cycle();
|
||||
}
|
||||
|
||||
void SrsEndlessThread::on_thread_stop()
|
||||
{
|
||||
handler->on_thread_stop();
|
||||
}
|
||||
|
||||
ISrsOneCycleThreadHandler::ISrsOneCycleThreadHandler()
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue