mirror of
https://github.com/ossrs/srs.git
synced 2025-02-12 11:21:52 +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();
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
string SrsConfig::get_ffmpeg_log_dir()
|
||||
string SrsConfig::get_ff_log_dir()
|
||||
{
|
||||
static string DEFAULT = "./objs";
|
||||
|
||||
|
|
|
@ -779,10 +779,10 @@ public:
|
|||
// Get the log file path.
|
||||
virtual std::string get_log_file();
|
||||
// Whether ffmpeg log enabled
|
||||
virtual bool get_ffmpeg_log_enabled();
|
||||
virtual bool get_ff_log_enabled();
|
||||
// The ffmpeg log dir.
|
||||
// @remark, /dev/null to disable it.
|
||||
virtual std::string get_ffmpeg_log_dir();
|
||||
virtual std::string get_ff_log_dir();
|
||||
// The MPEG-DASH section.
|
||||
private:
|
||||
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
|
||||
// write ffmpeg info to log file.
|
||||
if (_srs_config->get_ffmpeg_log_enabled()) {
|
||||
log_file = _srs_config->get_ffmpeg_log_dir();
|
||||
if (_srs_config->get_ff_log_enabled()) {
|
||||
log_file = _srs_config->get_ff_log_dir();
|
||||
log_file += "/";
|
||||
log_file += "ffmpeg-encoder";
|
||||
log_file += "-";
|
||||
|
|
|
@ -397,8 +397,8 @@ srs_error_t SrsIngester::initialize_ffmpeg(SrsFFMPEG* ffmpeg, SrsConfDirective*
|
|||
|
||||
std::string log_file = SRS_CONSTS_NULL_FILE; // disabled
|
||||
// write ffmpeg info to log file.
|
||||
if (_srs_config->get_ffmpeg_log_enabled()) {
|
||||
log_file = _srs_config->get_ffmpeg_log_dir();
|
||||
if (_srs_config->get_ff_log_enabled()) {
|
||||
log_file = _srs_config->get_ff_log_dir();
|
||||
log_file += "/";
|
||||
log_file += "ffmpeg-ingest";
|
||||
log_file += "-";
|
||||
|
|
|
@ -3507,8 +3507,8 @@ VOID TEST(ConfigMainTest, CheckVhostConfig5)
|
|||
EXPECT_TRUE(conf.get_log_tank_file());
|
||||
EXPECT_STREQ("xxx2", conf.get_log_level().c_str());
|
||||
EXPECT_STREQ("xxx3", conf.get_log_file().c_str());
|
||||
EXPECT_STREQ("xxx4", conf.get_ffmpeg_log_dir().c_str());
|
||||
EXPECT_TRUE(conf.get_ffmpeg_log_enabled());
|
||||
EXPECT_STREQ("xxx4", conf.get_ff_log_dir().c_str());
|
||||
EXPECT_TRUE(conf.get_ff_log_enabled());
|
||||
}
|
||||
|
||||
if (true) {
|
||||
|
|
Loading…
Reference in a new issue