mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-15 04:25:58 +08:00
整理命名空间 (#1409)
* feat: remove using namespace mediakit in header files. (cherry picked from commit d44aeb339a8a0e1f0455be82b21fe4b1b536299f) * feat: remove using namespace mediakit in FFmpegSource.h * feat: remove using namespace mediakit in RtpExt.h * feat: remove using namespace mediakit in header files. * feat: remove using namespace std in header files. * feat: remove using namespace std in header files when zltoolkit remove std in header * 补充命名空间 * 整理命名空间 * 整理命名空间2 * 修复macos ci * 修复编译问题 * 修复编译问题2 * 修复编译问题3 Co-authored-by: Johnny <hellojinqiang@gmail.com> Co-authored-by: Xiaofeng Wang <wasphin@gmail.com>
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
#include "Util/onceToken.h"
|
||||
#include "Thread/ThreadPool.h"
|
||||
using namespace toolkit;
|
||||
using namespace mediakit::Client;
|
||||
using namespace std;
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
@@ -65,12 +65,12 @@ void RtmpPlayer::play(const string &strUrl) {
|
||||
//服务器域名
|
||||
host_url = FindField(host_url.data(), NULL, ":");
|
||||
}
|
||||
if (!(*this)[kNetAdapter].empty()) {
|
||||
setNetAdapter((*this)[kNetAdapter]);
|
||||
if (!(*this)[Client::kNetAdapter].empty()) {
|
||||
setNetAdapter((*this)[Client::kNetAdapter]);
|
||||
}
|
||||
|
||||
weak_ptr<RtmpPlayer> weak_self = dynamic_pointer_cast<RtmpPlayer>(shared_from_this());
|
||||
float play_timeout_sec = (*this)[kTimeoutMS].as<int>() / 1000.0f;
|
||||
float play_timeout_sec = (*this)[Client::kTimeoutMS].as<int>() / 1000.0f;
|
||||
_play_timer.reset(new Timer(play_timeout_sec, [weak_self]() {
|
||||
auto strong_self = weak_self.lock();
|
||||
if (!strong_self) {
|
||||
@@ -113,7 +113,7 @@ void RtmpPlayer::onPlayResult_l(const SockException &ex, bool handshake_done) {
|
||||
if (!ex) {
|
||||
//播放成功,恢复rtmp接收超时定时器
|
||||
_rtmp_recv_ticker.resetTime();
|
||||
auto timeout_ms = (*this)[kMediaTimeoutMS].as<uint64_t>();
|
||||
auto timeout_ms = (*this)[Client::kMediaTimeoutMS].as<uint64_t>();
|
||||
weak_ptr<RtmpPlayer> weakSelf = dynamic_pointer_cast<RtmpPlayer>(shared_from_this());
|
||||
auto lam = [weakSelf, timeout_ms]() {
|
||||
auto strongSelf = weakSelf.lock();
|
||||
@@ -255,7 +255,7 @@ 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.0f, [weakSelf]() {
|
||||
_beat_timer.reset(new Timer((*this)[Client::kBeatIntervalMS].as<int>() / 1000.0f, [weakSelf]() {
|
||||
auto strongSelf = weakSelf.lock();
|
||||
if (!strongSelf) {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user