Unified code style (#2137)

This commit is contained in:
老衲不出家
2022-12-02 14:43:06 +08:00
committed by GitHub
parent a12b7c8021
commit f05a9501fa
62 changed files with 166 additions and 149 deletions

View File

@@ -39,13 +39,13 @@ static std::shared_ptr<RtpServer> rtpServer;
#ifdef ENABLE_WEBRTC
#include "../webrtc/WebRtcSession.h"
#include "../webrtc/WebRtcTransport.h"
static std::shared_ptr<UdpServer> rtcServer_udp;
static std::shared_ptr<TcpServer> rtcServer_tcp;
static UdpServer::Ptr rtcServer_udp;
static TcpServer::Ptr rtcServer_tcp;
#endif
#if defined(ENABLE_SRT)
#include "../srt/SrtSession.hpp"
static std::shared_ptr<UdpServer> srtServer;
static UdpServer::Ptr srtServer;
#endif
//////////////////////////environment init///////////////////////////

View File

@@ -18,7 +18,7 @@ using namespace mediakit;
class MediaHelper : public MediaSourceEvent , public std::enable_shared_from_this<MediaHelper> {
public:
typedef std::shared_ptr<MediaHelper> Ptr;
using Ptr = std::shared_ptr<MediaHelper>;
template<typename ...ArgsType>
MediaHelper(ArgsType &&...args){
_channel = std::make_shared<DevChannel>(std::forward<ArgsType>(args)...);

View File

@@ -19,7 +19,7 @@ using namespace mediakit;
class MediaPlayerForC : public std::enable_shared_from_this<MediaPlayerForC>{
public:
typedef std::shared_ptr<MediaPlayerForC> Ptr;
using Ptr = std::shared_ptr<MediaPlayerForC>;
MediaPlayerForC(){
_player = std::make_shared<MediaPlayer>();

View File

@@ -17,7 +17,7 @@
class TcpClientForC : public toolkit::TcpClient {
public:
typedef std::shared_ptr<TcpClientForC> Ptr;
using Ptr = std::shared_ptr<TcpClientForC>;
TcpClientForC(mk_tcp_client_events *events) ;
~TcpClientForC() override ;
void onRecv(const toolkit::Buffer::Ptr &pBuf) override;

View File

@@ -63,7 +63,7 @@ API_EXPORT void API_CALL mk_sync_do(mk_thread ctx,on_mk_async cb, void *user_dat
class TimerForC : public std::enable_shared_from_this<TimerForC>{
public:
typedef std::shared_ptr<TimerForC> Ptr;
using Ptr = std::shared_ptr<TimerForC>;
TimerForC(on_mk_timer cb, void *user_data){
_cb = cb;