mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
support ingest stream
This commit is contained in:
parent
45d8f4346f
commit
4f445f2f60
2 changed files with 15 additions and 0 deletions
|
@ -281,6 +281,20 @@ int SrsIngester::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsConfDirective* vhost, S
|
|||
// for file, set re.
|
||||
ffmpeg->set_iparams("-re");
|
||||
|
||||
if ((ret = ffmpeg->initialize(input_url, output, log_file)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
} else if (input_type == SRS_INGEST_TYPE_STREAM) {
|
||||
std::string input_url = _srs_config->get_ingest_input_url(ingest);
|
||||
if (input_url.empty()) {
|
||||
ret = ERROR_ENCODER_NO_INPUT;
|
||||
srs_trace("empty ingest intput url. ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
// for stream, no re.
|
||||
ffmpeg->set_iparams("");
|
||||
|
||||
if ((ret = ffmpeg->initialize(input_url, output, log_file)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue