winlin

refine encoder code for #536.

... ... @@ -299,6 +299,10 @@ int SrsEncoder::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsRequest* req, SrsConfDir
log_file += req->app;
log_file += "-";
log_file += req->stream;
if (!engine->args.empty()) {
log_file += "-";
log_file += engine->arg0();
}
log_file += ".log";
}
... ...
... ... @@ -102,6 +102,7 @@ int SrsFFMPEG::initialize_transcode(SrsConfDirective* engine)
{
int ret = ERROR_SUCCESS;
engine_name = engine->arg0();
iformat = _srs_config->get_engine_iformat(engine);
vfilter = _srs_config->get_engine_vfilter(engine);
vcodec = _srs_config->get_engine_vcodec(engine);
... ... @@ -487,7 +488,7 @@ int SrsFFMPEG::start()
// parent.
if (pid > 0) {
started = true;
srs_trace("vfored ffmpeg encoder engine, pid=%d", pid);
srs_trace("fork encoder %s, pid=%d", engine_name.c_str(), pid);
return ret;
}
... ...
... ... @@ -49,6 +49,7 @@ private:
bool fast_stopped;
pid_t pid;
private:
std::string engine_name;
std::string log_file;
private:
std::string ffmpeg;
... ...