Commit 0a71e06d by xiongguangjie

united some code style

parent 7b87985f
...@@ -399,7 +399,7 @@ private: ...@@ -399,7 +399,7 @@ private:
GET_CONFIG(int, mergeWriteMS, General::kMergeWriteMS); GET_CONFIG(int, mergeWriteMS, General::kMergeWriteMS);
GET_CONFIG(int, rtspLowLatency, Rtsp::KLowLatency); GET_CONFIG(int, rtspLowLatency, Rtsp::kLowLatency);
if(std::is_same<packet, RtpPacket>::value && rtspLowLatency){ if(std::is_same<packet, RtpPacket>::value && rtspLowLatency){
return true; return true;
} }
......
...@@ -173,7 +173,7 @@ const string kAuthBasic = RTSP_FIELD "authBasic"; ...@@ -173,7 +173,7 @@ const string kAuthBasic = RTSP_FIELD "authBasic";
const string kHandshakeSecond = RTSP_FIELD "handshakeSecond"; const string kHandshakeSecond = RTSP_FIELD "handshakeSecond";
const string kKeepAliveSecond = RTSP_FIELD "keepAliveSecond"; const string kKeepAliveSecond = RTSP_FIELD "keepAliveSecond";
const string kDirectProxy = RTSP_FIELD "directProxy"; const string kDirectProxy = RTSP_FIELD "directProxy";
const string KLowLatency = RTSP_FIELD"lowLatency"; const string kLowLatency = RTSP_FIELD"lowLatency";
static onceToken token([]() { static onceToken token([]() {
// 默认Md5方式认证 // 默认Md5方式认证
...@@ -181,7 +181,7 @@ static onceToken token([]() { ...@@ -181,7 +181,7 @@ static onceToken token([]() {
mINI::Instance()[kHandshakeSecond] = 15; mINI::Instance()[kHandshakeSecond] = 15;
mINI::Instance()[kKeepAliveSecond] = 15; mINI::Instance()[kKeepAliveSecond] = 15;
mINI::Instance()[kDirectProxy] = 1; mINI::Instance()[kDirectProxy] = 1;
mINI::Instance()[KLowLatency] = 0; mINI::Instance()[kLowLatency] = 0;
}); });
} // namespace Rtsp } // namespace Rtsp
...@@ -208,13 +208,13 @@ const string kAudioMtuSize = RTP_FIELD "audioMtuSize"; ...@@ -208,13 +208,13 @@ const string kAudioMtuSize = RTP_FIELD "audioMtuSize";
// rtp包最大长度限制,单位是KB // rtp包最大长度限制,单位是KB
const string kRtpMaxSize = RTP_FIELD "rtpMaxSize"; const string kRtpMaxSize = RTP_FIELD "rtpMaxSize";
const string KLowLatency = RTP_FIELD "lowLatency"; const string kLowLatency = RTP_FIELD "lowLatency";
static onceToken token([]() { static onceToken token([]() {
mINI::Instance()[kVideoMtuSize] = 1400; mINI::Instance()[kVideoMtuSize] = 1400;
mINI::Instance()[kAudioMtuSize] = 600; mINI::Instance()[kAudioMtuSize] = 600;
mINI::Instance()[kRtpMaxSize] = 10; mINI::Instance()[kRtpMaxSize] = 10;
mINI::Instance()[KLowLatency] = 0; mINI::Instance()[kLowLatency] = 0;
}); });
} // namespace Rtp } // namespace Rtp
......
...@@ -253,7 +253,7 @@ extern const std::string kKeepAliveSecond; ...@@ -253,7 +253,7 @@ extern const std::string kKeepAliveSecond;
extern const std::string kDirectProxy; extern const std::string kDirectProxy;
// rtsp 转发是否使用低延迟模式,当开启时,不会缓存rtp包,来提高并发,可以降低一帧的延迟 // rtsp 转发是否使用低延迟模式,当开启时,不会缓存rtp包,来提高并发,可以降低一帧的延迟
extern const std::string KLowLatency; extern const std::string kLowLatency;
} // namespace Rtsp } // namespace Rtsp
////////////RTMP服务器配置/////////// ////////////RTMP服务器配置///////////
...@@ -275,7 +275,7 @@ extern const std::string kAudioMtuSize; ...@@ -275,7 +275,7 @@ extern const std::string kAudioMtuSize;
// rtp包最大长度限制, 单位KB // rtp包最大长度限制, 单位KB
extern const std::string kRtpMaxSize; extern const std::string kRtpMaxSize;
// rtp 打包时,低延迟开关,默认关闭(为0),h264存在一帧多个slice(NAL)的情况,在这种情况下,如果开启可能会导致画面花屏 // rtp 打包时,低延迟开关,默认关闭(为0),h264存在一帧多个slice(NAL)的情况,在这种情况下,如果开启可能会导致画面花屏
extern const std::string KLowLatency; extern const std::string kLowLatency;
} // namespace Rtp } // namespace Rtp
////////////组播配置/////////// ////////////组播配置///////////
......
...@@ -283,7 +283,7 @@ bool H264RtpEncoder::inputFrame(const Frame::Ptr &frame) { ...@@ -283,7 +283,7 @@ bool H264RtpEncoder::inputFrame(const Frame::Ptr &frame) {
default: break; default: break;
} }
GET_CONFIG(int,lowLatency,Rtp::KLowLatency); GET_CONFIG(int,lowLatency,Rtp::kLowLatency);
if (lowLatency) { // 低延迟模式 if (lowLatency) { // 低延迟模式
if (_last_frame) { if (_last_frame) {
flush(); flush();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论