mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-23 01:12:20 +08:00
全面整理代码,去除编译警告
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
|
||||
*
|
||||
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
|
||||
* This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit).
|
||||
*
|
||||
* Use of this source code is governed by MIT license that can be found in the
|
||||
* LICENSE file in the root of the source tree. All contributing project authors
|
||||
@@ -72,7 +72,7 @@ void RtmpPlayer::play(const string &strUrl) {
|
||||
}
|
||||
|
||||
weak_ptr<RtmpPlayer> weak_self = dynamic_pointer_cast<RtmpPlayer>(shared_from_this());
|
||||
float play_timeout_sec = (*this)[kTimeoutMS].as<int>() / 1000.0;
|
||||
float play_timeout_sec = (*this)[kTimeoutMS].as<int>() / 1000.0f;
|
||||
_play_timer.reset(new Timer(play_timeout_sec, [weak_self]() {
|
||||
auto strong_self = weak_self.lock();
|
||||
if (!strong_self) {
|
||||
@@ -131,7 +131,7 @@ void RtmpPlayer::onPlayResult_l(const SockException &ex, bool handshake_done) {
|
||||
return true;
|
||||
};
|
||||
//创建rtmp数据接收超时检测定时器
|
||||
_rtmp_recv_timer = std::make_shared<Timer>(timeout_ms / 2000.0, lam, getPoller());
|
||||
_rtmp_recv_timer = std::make_shared<Timer>(timeout_ms / 2000.0f, lam, getPoller());
|
||||
} else {
|
||||
shutdown(SockException(Err_shutdown,"teardown"));
|
||||
}
|
||||
@@ -253,12 +253,12 @@ inline void RtmpPlayer::send_pause(bool pause) {
|
||||
_beat_timer.reset();
|
||||
if (pause) {
|
||||
weak_ptr<RtmpPlayer> weakSelf = dynamic_pointer_cast<RtmpPlayer>(shared_from_this());
|
||||
_beat_timer.reset(new Timer((*this)[kBeatIntervalMS].as<int>() / 1000.0, [weakSelf]() {
|
||||
_beat_timer.reset(new Timer((*this)[kBeatIntervalMS].as<int>() / 1000.0f, [weakSelf]() {
|
||||
auto strongSelf = weakSelf.lock();
|
||||
if (!strongSelf) {
|
||||
return false;
|
||||
}
|
||||
uint32_t timeStamp = ::time(NULL);
|
||||
uint32_t timeStamp = (uint32_t)::time(NULL);
|
||||
strongSelf->sendUserControl(CONTROL_PING_REQUEST, timeStamp);
|
||||
return true;
|
||||
}, getPoller()));
|
||||
|
||||
Reference in New Issue
Block a user