mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 03:31:45 +08:00
Unified code style (#2137)
This commit is contained in:
@@ -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///////////////////////////
|
||||
|
||||
@@ -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)...);
|
||||
|
||||
@@ -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>();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user