1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

implements ingest, change to 0.9.53

This commit is contained in:
winlin 2014-04-07 14:20:03 +08:00
parent 2742679354
commit e89ab84e4e
13 changed files with 357 additions and 147 deletions

View file

@ -847,12 +847,12 @@ int SrsConfig::get_pithy_print_forwarder()
int SrsConfig::get_pithy_print_encoder()
{
SrsConfDirective* pithy = root->get("encoder");
SrsConfDirective* pithy = root->get("pithy_print");
if (!pithy) {
return SRS_STAGE_ENCODER_INTERVAL_MS;
}
pithy = pithy->get("forwarder");
pithy = pithy->get("encoder");
if (!pithy) {
return SRS_STAGE_ENCODER_INTERVAL_MS;
}
@ -860,6 +860,21 @@ int SrsConfig::get_pithy_print_encoder()
return ::atoi(pithy->arg0().c_str());
}
int SrsConfig::get_pithy_print_ingester()
{
SrsConfDirective* pithy = root->get("pithy_print");
if (!pithy) {
return SRS_STAGE_INGESTER_INTERVAL_MS;
}
pithy = pithy->get("ingester");
if (!pithy) {
return SRS_STAGE_INGESTER_INTERVAL_MS;
}
return ::atoi(pithy->arg0().c_str());
}
int SrsConfig::get_pithy_print_hls()
{
SrsConfDirective* pithy = root->get("pithy_print");
@ -1645,10 +1660,33 @@ string SrsConfig::get_ingest_ffmpeg(SrsConfDirective* ingest)
return conf->arg0();
}
string SrsConfig::get_ingest_input(SrsConfDirective* ingest)
string SrsConfig::get_ingest_input_type(SrsConfDirective* ingest)
{
SrsConfDirective* conf = ingest->get("input");
if (!conf) {
return SRS_INGEST_TYPE_FILE;
}
conf = conf->get("type");
if (!conf) {
return SRS_INGEST_TYPE_FILE;
}
return conf->arg0();
}
string SrsConfig::get_ingest_input_url(SrsConfDirective* ingest)
{
SrsConfDirective* conf = ingest->get("input");
if (!conf) {
return "";
}
conf = conf->get("url");
if (!conf) {
return "";
}