mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-25 20:27:34 +08:00
优化日志
This commit is contained in:
parent
9fe6587bd3
commit
6a9bc8aca5
@ -1 +1 @@
|
|||||||
Subproject commit efa7c8ee4f1cc61cac11d32832a09d900008f44b
|
Subproject commit b9c850feae43430e71c9eb21d9475d40263fce94
|
@ -68,7 +68,7 @@ API_EXPORT PlayerContext API_CALL createPlayer() {
|
|||||||
MediaPlayer::Ptr ret(new MediaPlayer());
|
MediaPlayer::Ptr ret(new MediaPlayer());
|
||||||
s_mapPlayer.emplace(ret.get(), ret);
|
s_mapPlayer.emplace(ret.get(), ret);
|
||||||
if(s_mapPlayer.size() > 16){
|
if(s_mapPlayer.size() > 16){
|
||||||
FatalL << s_mapPlayer.size();
|
ErrorL << s_mapPlayer.size();
|
||||||
}
|
}
|
||||||
return ret.get();
|
return ret.get();
|
||||||
}
|
}
|
||||||
|
@ -226,7 +226,7 @@ inline bool MediaReader::readVideoSample(int iTimeInc) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
FatalL << "读取视频失败:" << iIdx + 1;
|
ErrorL << "读取视频失败:" << iIdx + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_video_current = iIdx;
|
m_video_current = iIdx;
|
||||||
@ -248,7 +248,7 @@ inline bool MediaReader::readAudioSample(int iTimeInc) {
|
|||||||
writeAAC(m_adts.data, m_adts.aac_frame_length, (double) m_audio_ms * i / m_audio_num_samples);
|
writeAAC(m_adts.data, m_adts.aac_frame_length, (double) m_audio_ms * i / m_audio_num_samples);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
FatalL << "读取音频失败:" << i+ 1;
|
ErrorL << "读取音频失败:" << i+ 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_audio_current = iNextSample;
|
m_audio_current = iNextSample;
|
||||||
|
@ -132,6 +132,6 @@ bool getAVCInfo(const string& strSps,int &iVideoWidth, int &iVideoHeight, float
|
|||||||
}
|
}
|
||||||
h264GetWidthHeight(&tH264SpsInfo, &iVideoWidth, &iVideoHeight);
|
h264GetWidthHeight(&tH264SpsInfo, &iVideoWidth, &iVideoHeight);
|
||||||
h264GeFramerate(&tH264SpsInfo, &iVideoFps);
|
h264GeFramerate(&tH264SpsInfo, &iVideoFps);
|
||||||
//FatalL << iVideoWidth << " " << iVideoHeight << " " << iVideoFps;
|
//ErrorL << iVideoWidth << " " << iVideoHeight << " " << iVideoFps;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ int main(int argc, char *argv[]) {
|
|||||||
Logger::Instance().setWriter(std::make_shared<AsyncLogWriter>());
|
Logger::Instance().setWriter(std::make_shared<AsyncLogWriter>());
|
||||||
|
|
||||||
if (argc != 5) {
|
if (argc != 5) {
|
||||||
FatalL << "\r\n测试方法:./test_benchmark player_count play_interval rtxp_url rtp_type\r\n"
|
ErrorL << "\r\n测试方法:./test_benchmark player_count play_interval rtxp_url rtp_type\r\n"
|
||||||
<< "例如你想每隔50毫秒启动共计100个播放器(tcp方式播放rtsp://127.0.0.1/live/0 )可以输入以下命令:\r\n"
|
<< "例如你想每隔50毫秒启动共计100个播放器(tcp方式播放rtsp://127.0.0.1/live/0 )可以输入以下命令:\r\n"
|
||||||
<< "./test_benchmark 100 50 rtsp://127.0.0.1/live/0 0\r\n"
|
<< "./test_benchmark 100 50 rtsp://127.0.0.1/live/0 0\r\n"
|
||||||
<< endl;
|
<< endl;
|
||||||
|
@ -106,7 +106,7 @@ int main(int argc,char *argv[]){
|
|||||||
//加载证书,证书包含公钥和私钥
|
//加载证书,证书包含公钥和私钥
|
||||||
SSL_Initor::Instance().loadServerPem((exePath() + ".pem").data());
|
SSL_Initor::Instance().loadServerPem((exePath() + ".pem").data());
|
||||||
}catch(...){
|
}catch(...){
|
||||||
FatalL << "请把证书:" << (exeName() + ".pem") << "放置在本程序可执行程序同目录下:" << exeDir() << endl;
|
ErrorL << "请把证书:" << (exeName() + ".pem") << "放置在本程序可执行程序同目录下:" << exeDir() << endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif //ENABLE_OPENSSL
|
#endif //ENABLE_OPENSSL
|
||||||
|
@ -52,7 +52,7 @@ int main(int argc, char *argv[]){
|
|||||||
Logger::Instance().setWriter(std::make_shared<AsyncLogWriter>());
|
Logger::Instance().setWriter(std::make_shared<AsyncLogWriter>());
|
||||||
|
|
||||||
if(argc != 3){
|
if(argc != 3){
|
||||||
FatalL << "\r\n测试方法:./test_player rtxp_url rtp_type\r\n"
|
ErrorL << "\r\n测试方法:./test_player rtxp_url rtp_type\r\n"
|
||||||
<< "例如:./test_player rtsp://admin:123456@127.0.0.1/live/0 0\r\n"
|
<< "例如:./test_player rtsp://admin:123456@127.0.0.1/live/0 0\r\n"
|
||||||
<<endl;
|
<<endl;
|
||||||
Logger::Destory();
|
Logger::Destory();
|
||||||
|
@ -184,7 +184,7 @@ int main(int argc,char *argv[]) {
|
|||||||
//加载证书,证书包含公钥和私钥
|
//加载证书,证书包含公钥和私钥
|
||||||
SSL_Initor::Instance().loadServerPem((exePath() + ".pem").data());
|
SSL_Initor::Instance().loadServerPem((exePath() + ".pem").data());
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
FatalL << "请把证书:" << (exeName() + ".pem") << "放置在本程序可执行程序同目录下:" << exeDir() << endl;
|
ErrorL << "请把证书:" << (exeName() + ".pem") << "放置在本程序可执行程序同目录下:" << exeDir() << endl;
|
||||||
proxyMap.clear();
|
proxyMap.clear();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user