mirror of
https://github.com/ossrs/srs.git
synced 2025-02-15 04:42:04 +00:00
update readme
This commit is contained in:
parent
52e6115f9a
commit
601a69aa70
1 changed files with 517 additions and 514 deletions
3
trunk/src/core/srs_core_encoder.cpp
Normal file → Executable file
3
trunk/src/core/srs_core_encoder.cpp
Normal file → Executable file
|
@ -216,6 +216,7 @@ int SrsFFMPEG::start()
|
||||||
char s_achannels[10];
|
char s_achannels[10];
|
||||||
snprintf(s_achannels, sizeof(s_achannels), "%d", achannels);
|
snprintf(s_achannels, sizeof(s_achannels), "%d", achannels);
|
||||||
|
|
||||||
|
// TODO: execl donot support the params.
|
||||||
// video params
|
// video params
|
||||||
std::string s_vpreset = vpreset;
|
std::string s_vpreset = vpreset;
|
||||||
if (!vparams.empty()) {
|
if (!vparams.empty()) {
|
||||||
|
@ -229,6 +230,7 @@ int SrsFFMPEG::start()
|
||||||
s_aparams += aparams;
|
s_aparams += aparams;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: fork or vfork?
|
||||||
if ((pid = fork()) < 0) {
|
if ((pid = fork()) < 0) {
|
||||||
ret = ERROR_ENCODER_FORK;
|
ret = ERROR_ENCODER_FORK;
|
||||||
srs_error("vfork process failed. ret=%d", ret);
|
srs_error("vfork process failed. ret=%d", ret);
|
||||||
|
@ -237,6 +239,7 @@ int SrsFFMPEG::start()
|
||||||
|
|
||||||
// child process: ffmpeg encoder engine.
|
// child process: ffmpeg encoder engine.
|
||||||
if (pid == 0) {
|
if (pid == 0) {
|
||||||
|
// TODO: execl or execlp
|
||||||
ret = execl(ffmpeg.c_str(),
|
ret = execl(ffmpeg.c_str(),
|
||||||
ffmpeg.c_str(),
|
ffmpeg.c_str(),
|
||||||
"-f", "flv",
|
"-f", "flv",
|
||||||
|
|
Loading…
Reference in a new issue