mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 12:37:09 +08:00
统一代码风格
This commit is contained in:
parent
3a0fa27198
commit
61b29efe94
@ -881,8 +881,7 @@ void installWebApi() {
|
|||||||
//只是暂停流的检查,流媒体服务器做为流负载服务,收流就转发,RTSP/RTMP有自己暂停协议
|
//只是暂停流的检查,流媒体服务器做为流负载服务,收流就转发,RTSP/RTMP有自己暂停协议
|
||||||
lock_guard<recursive_mutex> lck(s_rtpServerMapMtx);
|
lock_guard<recursive_mutex> lck(s_rtpServerMapMtx);
|
||||||
auto it = s_rtpServerMap.find(allArgs["stream_id"]);
|
auto it = s_rtpServerMap.find(allArgs["stream_id"]);
|
||||||
if (it == s_rtpServerMap.end())
|
if (it == s_rtpServerMap.end()) {
|
||||||
{
|
|
||||||
val["hit"] = 0;
|
val["hit"] = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -897,8 +896,7 @@ void installWebApi() {
|
|||||||
|
|
||||||
lock_guard<recursive_mutex> lck(s_rtpServerMapMtx);
|
lock_guard<recursive_mutex> lck(s_rtpServerMapMtx);
|
||||||
auto it = s_rtpServerMap.find(allArgs["stream_id"]);
|
auto it = s_rtpServerMap.find(allArgs["stream_id"]);
|
||||||
if (it == s_rtpServerMap.end())
|
if (it == s_rtpServerMap.end()) {
|
||||||
{
|
|
||||||
val["hit"] = 0;
|
val["hit"] = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -135,8 +135,10 @@ void RtpProcess::addTrackCompleted() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool RtpProcess::alive() {
|
bool RtpProcess::alive() {
|
||||||
if(_stop_rtp_check.load())
|
if (_stop_rtp_check.load()) {
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
GET_CONFIG(int, timeoutSec, RtpProxy::kTimeoutSec)
|
GET_CONFIG(int, timeoutSec, RtpProxy::kTimeoutSec)
|
||||||
if (_last_frame_time.elapsedTime() / 1000 < timeoutSec) {
|
if (_last_frame_time.elapsedTime() / 1000 < timeoutSec) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -56,10 +56,12 @@ public:
|
|||||||
* 设置RtpProcess onDetach事件回调
|
* 设置RtpProcess onDetach事件回调
|
||||||
*/
|
*/
|
||||||
void setOnDetach(const function<void()> &cb);
|
void setOnDetach(const function<void()> &cb);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 暂停Rtp服务的RTP流检测
|
* 暂停Rtp服务的RTP流检测
|
||||||
*/
|
*/
|
||||||
void pauseRtpCheck();
|
void pauseRtpCheck();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 恢复Rtp服务的RTP流检测
|
* 恢复Rtp服务的RTP流检测
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user