mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
add ingest config
This commit is contained in:
parent
9107831b0e
commit
92281548b6
10 changed files with 179 additions and 9 deletions
|
@ -78,7 +78,18 @@ string SrsFFMPEG::output()
|
|||
return _output;
|
||||
}
|
||||
|
||||
int SrsFFMPEG::initialize(string in, string out, string log, SrsConfDirective* engine)
|
||||
int SrsFFMPEG::initialize(string in, string out, string log)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
input = in;
|
||||
_output = out;
|
||||
log_file = log;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int SrsFFMPEG::initialize_transcode(SrsConfDirective* engine)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
|
@ -102,10 +113,6 @@ int SrsFFMPEG::initialize(string in, string out, string log, SrsConfDirective* e
|
|||
vwidth -= vwidth % 2;
|
||||
vheight -= vheight % 2;
|
||||
|
||||
input = in;
|
||||
_output = out;
|
||||
log_file = log;
|
||||
|
||||
if (vcodec == SRS_ENCODER_NO_VIDEO && acodec == SRS_ENCODER_NO_AUDIO) {
|
||||
ret = ERROR_ENCODER_VCODEC;
|
||||
srs_warn("video and audio disabled. ret=%d", ret);
|
||||
|
@ -191,6 +198,22 @@ int SrsFFMPEG::initialize(string in, string out, string log, SrsConfDirective* e
|
|||
return ret;
|
||||
}
|
||||
|
||||
int SrsFFMPEG::initialize_copy()
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
vcodec = SRS_ENCODER_COPY;
|
||||
acodec = SRS_ENCODER_COPY;
|
||||
|
||||
if (_output.empty()) {
|
||||
ret = ERROR_ENCODER_OUTPUT;
|
||||
srs_error("invalid empty output, ret=%d", ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int SrsFFMPEG::start()
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue