mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
For #1592, rename ff_log_dir.
This commit is contained in:
parent
a99cee2819
commit
2fa151726b
5 changed files with 11 additions and 11 deletions
|
@ -5764,13 +5764,13 @@ string SrsConfig::get_log_file()
|
||||||
return conf->arg0();
|
return conf->arg0();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SrsConfig::get_ffmpeg_log_enabled()
|
bool SrsConfig::get_ff_log_enabled()
|
||||||
{
|
{
|
||||||
string log = get_ffmpeg_log_dir();
|
string log = get_ff_log_dir();
|
||||||
return log != SRS_CONSTS_NULL_FILE;
|
return log != SRS_CONSTS_NULL_FILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
string SrsConfig::get_ffmpeg_log_dir()
|
string SrsConfig::get_ff_log_dir()
|
||||||
{
|
{
|
||||||
static string DEFAULT = "./objs";
|
static string DEFAULT = "./objs";
|
||||||
|
|
||||||
|
|
|
@ -779,10 +779,10 @@ public:
|
||||||
// Get the log file path.
|
// Get the log file path.
|
||||||
virtual std::string get_log_file();
|
virtual std::string get_log_file();
|
||||||
// Whether ffmpeg log enabled
|
// Whether ffmpeg log enabled
|
||||||
virtual bool get_ffmpeg_log_enabled();
|
virtual bool get_ff_log_enabled();
|
||||||
// The ffmpeg log dir.
|
// The ffmpeg log dir.
|
||||||
// @remark, /dev/null to disable it.
|
// @remark, /dev/null to disable it.
|
||||||
virtual std::string get_ffmpeg_log_dir();
|
virtual std::string get_ff_log_dir();
|
||||||
// The MPEG-DASH section.
|
// The MPEG-DASH section.
|
||||||
private:
|
private:
|
||||||
virtual SrsConfDirective* get_dash(std::string vhost);
|
virtual SrsConfDirective* get_dash(std::string vhost);
|
||||||
|
|
|
@ -285,8 +285,8 @@ srs_error_t SrsEncoder::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsRequest* req, Sr
|
||||||
|
|
||||||
std::string log_file = SRS_CONSTS_NULL_FILE; // disabled
|
std::string log_file = SRS_CONSTS_NULL_FILE; // disabled
|
||||||
// write ffmpeg info to log file.
|
// write ffmpeg info to log file.
|
||||||
if (_srs_config->get_ffmpeg_log_enabled()) {
|
if (_srs_config->get_ff_log_enabled()) {
|
||||||
log_file = _srs_config->get_ffmpeg_log_dir();
|
log_file = _srs_config->get_ff_log_dir();
|
||||||
log_file += "/";
|
log_file += "/";
|
||||||
log_file += "ffmpeg-encoder";
|
log_file += "ffmpeg-encoder";
|
||||||
log_file += "-";
|
log_file += "-";
|
||||||
|
|
|
@ -397,8 +397,8 @@ srs_error_t SrsIngester::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsConfDirective*
|
||||||
|
|
||||||
std::string log_file = SRS_CONSTS_NULL_FILE; // disabled
|
std::string log_file = SRS_CONSTS_NULL_FILE; // disabled
|
||||||
// write ffmpeg info to log file.
|
// write ffmpeg info to log file.
|
||||||
if (_srs_config->get_ffmpeg_log_enabled()) {
|
if (_srs_config->get_ff_log_enabled()) {
|
||||||
log_file = _srs_config->get_ffmpeg_log_dir();
|
log_file = _srs_config->get_ff_log_dir();
|
||||||
log_file += "/";
|
log_file += "/";
|
||||||
log_file += "ffmpeg-ingest";
|
log_file += "ffmpeg-ingest";
|
||||||
log_file += "-";
|
log_file += "-";
|
||||||
|
|
|
@ -3507,8 +3507,8 @@ VOID TEST(ConfigMainTest, CheckVhostConfig5)
|
||||||
EXPECT_TRUE(conf.get_log_tank_file());
|
EXPECT_TRUE(conf.get_log_tank_file());
|
||||||
EXPECT_STREQ("xxx2", conf.get_log_level().c_str());
|
EXPECT_STREQ("xxx2", conf.get_log_level().c_str());
|
||||||
EXPECT_STREQ("xxx3", conf.get_log_file().c_str());
|
EXPECT_STREQ("xxx3", conf.get_log_file().c_str());
|
||||||
EXPECT_STREQ("xxx4", conf.get_ffmpeg_log_dir().c_str());
|
EXPECT_STREQ("xxx4", conf.get_ff_log_dir().c_str());
|
||||||
EXPECT_TRUE(conf.get_ffmpeg_log_enabled());
|
EXPECT_TRUE(conf.get_ff_log_enabled());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (true) {
|
if (true) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue