int SrsEncoder::cycle() { int ret = ERROR_SUCCESS; std::vector<SrsFFMPEG*>::iterator it; for (it = ffmpegs.begin(); it != ffmpegs.end(); ++it) { SrsFFMPEG* ffmpeg = *it; // start all ffmpegs. if ((ret = ffmpeg->start()) != ERROR_SUCCESS) { srs_error("transcode ffmpeg start failed. ret=%d", ret); return ret; } // check ffmpeg status. if ((ret = ffmpeg->cycle()) != ERROR_SUCCESS) { srs_error("transcode ffmpeg cycle failed. ret=%d", ret); return ret; } } // pithy print encoder(); pithy_print->elapse(); return ret; }
int SrsEncoder::cycle() { int ret = ERROR_SUCCESS; // start all ffmpegs. std::vector<SrsFFMPEG*>::iterator it; for (it = ffmpegs.begin(); it != ffmpegs.end(); ++it) { SrsFFMPEG* ffmpeg = *it; if ((ret = ffmpeg->start()) != ERROR_SUCCESS) { srs_error("ffmpeg start failed. ret=%d", ret); return ret; } } return ret; }