mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
parent
3ffb0980f5
commit
b21f92f97a
12 changed files with 62 additions and 67 deletions
|
@ -92,6 +92,21 @@ void SrsEncoder::on_unpublish()
|
|||
}
|
||||
|
||||
int SrsEncoder::cycle()
|
||||
{
|
||||
int ret = do_cycle();
|
||||
|
||||
// kill ffmpeg when finished and it alive
|
||||
std::vector<SrsFFMPEG*>::iterator it;
|
||||
|
||||
for (it = ffmpegs.begin(); it != ffmpegs.end(); ++it) {
|
||||
SrsFFMPEG* ffmpeg = *it;
|
||||
ffmpeg->stop();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int SrsEncoder::do_cycle()
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
|
@ -118,17 +133,6 @@ int SrsEncoder::cycle()
|
|||
return ret;
|
||||
}
|
||||
|
||||
void SrsEncoder::on_thread_stop()
|
||||
{
|
||||
// kill ffmpeg when finished and it alive
|
||||
std::vector<SrsFFMPEG*>::iterator it;
|
||||
|
||||
for (it = ffmpegs.begin(); it != ffmpegs.end(); ++it) {
|
||||
SrsFFMPEG* ffmpeg = *it;
|
||||
ffmpeg->stop();
|
||||
}
|
||||
}
|
||||
|
||||
void SrsEncoder::clear_engines()
|
||||
{
|
||||
std::vector<SrsFFMPEG*>::iterator it;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue