diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 95206ba5..00000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: cpp -sudo: required -dist: trusty -compiler: -- clang -os: -- linux -script: -- ./build_for_linux.sh - - - diff --git a/3rdpart/ZLToolKit b/3rdpart/ZLToolKit index 844b8663..21fdfe4a 160000 --- a/3rdpart/ZLToolKit +++ b/3rdpart/ZLToolKit @@ -1 +1 @@ -Subproject commit 844b866368fcbc4547c36474cc9d36479350bda3 +Subproject commit 21fdfe4a6553356f1b01f7dde326535ba23aef45 diff --git a/_config.yml b/_config.yml deleted file mode 100644 index c4192631..00000000 --- a/_config.yml +++ /dev/null @@ -1 +0,0 @@ -theme: jekyll-theme-cayman \ No newline at end of file diff --git a/src/Common/MediaSource.h b/src/Common/MediaSource.h index aa168063..5b7f2f46 100644 --- a/src/Common/MediaSource.h +++ b/src/Common/MediaSource.h @@ -57,8 +57,8 @@ public: ~NotImplemented() override = default; }; - MediaSourceEvent() {}; - virtual ~MediaSourceEvent() {}; + MediaSourceEvent() = default; + virtual ~MediaSourceEvent() = default; // 获取媒体源类型 virtual MediaOriginType getOriginType(MediaSource &sender) const { return MediaOriginType::unknown; } diff --git a/src/Common/macros.h b/src/Common/macros.h index be3da752..e33e1641 100644 --- a/src/Common/macros.h +++ b/src/Common/macros.h @@ -41,7 +41,7 @@ #endif #ifndef CHECK -#define CHECK(exp, ...) mediakit::Assert_ThrowCpp(!(exp), #exp, __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__) +#define CHECK(exp, ...) ::mediakit::Assert_ThrowCpp(!(exp), #exp, __FUNCTION__, __FILE__, __LINE__, ##__VA_ARGS__) #endif // CHECK #ifndef MAX diff --git a/src/Record/MP4Muxer.cpp b/src/Record/MP4Muxer.cpp index 274d43fe..02957968 100644 --- a/src/Record/MP4Muxer.cpp +++ b/src/Record/MP4Muxer.cpp @@ -19,8 +19,6 @@ using namespace toolkit; namespace mediakit { -MP4Muxer::MP4Muxer() {} - MP4Muxer::~MP4Muxer() { closeMP4(); } @@ -64,7 +62,7 @@ bool MP4MuxerInterface::haveVideo() const { uint64_t MP4MuxerInterface::getDuration() const { uint64_t ret = 0; for (auto &pr : _codec_to_trackid) { - if (pr.second.stamp.getRelativeStamp() > ret) { + if (pr.second.stamp.getRelativeStamp() > (int64_t)ret) { ret = pr.second.stamp.getRelativeStamp(); } } diff --git a/src/Record/MP4Muxer.h b/src/Record/MP4Muxer.h index 6485b308..64947d82 100644 --- a/src/Record/MP4Muxer.h +++ b/src/Record/MP4Muxer.h @@ -90,7 +90,7 @@ class MP4Muxer : public MP4MuxerInterface{ public: typedef std::shared_ptr Ptr; - MP4Muxer(); + MP4Muxer() = default; ~MP4Muxer() override; /** diff --git a/src/Record/MPEG.cpp b/src/Record/MPEG.cpp index 98961548..985cf98f 100644 --- a/src/Record/MPEG.cpp +++ b/src/Record/MPEG.cpp @@ -13,7 +13,7 @@ #if defined(ENABLE_HLS) || defined(ENABLE_RTPPROXY) -#include "mpeg-ts-proto.h" +#include "mpeg-ts.h" #include "mpeg-muxer.h" using namespace toolkit; diff --git a/src/Rtmp/RtmpCodec.h b/src/Rtmp/RtmpCodec.h index baa61084..476d0a39 100644 --- a/src/Rtmp/RtmpCodec.h +++ b/src/Rtmp/RtmpCodec.h @@ -56,8 +56,8 @@ protected: class RtmpCodec : public RtmpRing, public FrameDispatcher , public CodecInfo{ public: typedef std::shared_ptr Ptr; - RtmpCodec(){} - virtual ~RtmpCodec(){} + RtmpCodec() = default; + ~RtmpCodec() override = default; virtual void makeConfigPacket() {}; }; diff --git a/src/Rtmp/RtmpMuxer.h b/src/Rtmp/RtmpMuxer.h index bd13fcf6..73cacfb2 100644 --- a/src/Rtmp/RtmpMuxer.h +++ b/src/Rtmp/RtmpMuxer.h @@ -18,7 +18,7 @@ namespace mediakit{ -class RtmpMuxer : public MediaSinkInterface{ +class RtmpMuxer : public MediaSinkInterface { public: typedef std::shared_ptr Ptr; @@ -26,7 +26,7 @@ public: * 构造函数 */ RtmpMuxer(const TitleMeta::Ptr &title); - virtual ~RtmpMuxer(){} + ~RtmpMuxer() override = default; /** * 获取完整的SDP字符串 diff --git a/src/Rtp/RtpServer.cpp b/src/Rtp/RtpServer.cpp index 7ebe081f..577130e3 100644 --- a/src/Rtp/RtpServer.cpp +++ b/src/Rtp/RtpServer.cpp @@ -19,8 +19,6 @@ using namespace toolkit; namespace mediakit{ -RtpServer::RtpServer() {} - RtpServer::~RtpServer() { if (_on_cleanup) { _on_cleanup(); diff --git a/src/Rtp/RtpServer.h b/src/Rtp/RtpServer.h index 7c595591..409671a1 100644 --- a/src/Rtp/RtpServer.h +++ b/src/Rtp/RtpServer.h @@ -31,7 +31,7 @@ public: using onRecv = std::function; enum TcpMode { NONE = 0, PASSIVE, ACTIVE }; - RtpServer(); + RtpServer() = default; ~RtpServer(); /** diff --git a/src/Rtsp/RtpMultiCaster.h b/src/Rtsp/RtpMultiCaster.h index 1195a92a..f55189e6 100644 --- a/src/Rtsp/RtpMultiCaster.h +++ b/src/Rtsp/RtpMultiCaster.h @@ -24,7 +24,7 @@ namespace mediakit{ class MultiCastAddressMaker { public: - ~MultiCastAddressMaker() {} + ~MultiCastAddressMaker() = default; static MultiCastAddressMaker& Instance(); static bool isMultiCastAddress(uint32_t addr); static std::string toString(uint32_t addr); @@ -32,7 +32,7 @@ public: std::shared_ptr obtain(uint32_t max_try = 10); private: - MultiCastAddressMaker() {}; + MultiCastAddressMaker() = default; void release(uint32_t addr); private: diff --git a/src/Rtsp/RtspMuxer.h b/src/Rtsp/RtspMuxer.h index a7199b97..6b5cfa56 100644 --- a/src/Rtsp/RtspMuxer.h +++ b/src/Rtsp/RtspMuxer.h @@ -22,7 +22,7 @@ class RingDelegateHelper : public toolkit::RingDelegate { public: using onRtp = std::function ; - ~RingDelegateHelper() override {} + ~RingDelegateHelper() override = default; RingDelegateHelper(onRtp on_rtp) { _on_rtp = std::move(on_rtp); @@ -39,7 +39,7 @@ private: /** * rtsp生成器 */ -class RtspMuxer : public MediaSinkInterface{ +class RtspMuxer : public MediaSinkInterface { public: using Ptr = std::shared_ptr; @@ -47,8 +47,7 @@ public: * 构造函数 */ RtspMuxer(const TitleSdp::Ptr &title = nullptr); - - virtual ~RtspMuxer(){} + ~RtspMuxer() override = default; /** * 获取完整的SDP字符串 diff --git a/src/Rtsp/RtspSession.h b/src/Rtsp/RtspSession.h index da3701fe..10c0c66e 100644 --- a/src/Rtsp/RtspSession.h +++ b/src/Rtsp/RtspSession.h @@ -37,7 +37,7 @@ public: using Ptr = std::shared_ptr; BufferRtp(Buffer::Ptr pkt, size_t offset = 0) : _offset(offset), _rtp(std::move(pkt)) {} - ~BufferRtp() override {} + ~BufferRtp() override = default; char *data() const override { return (char *)_rtp->data() + _offset; diff --git a/srt/SrtTransport.cpp b/srt/SrtTransport.cpp index 458bb69e..7388f3a0 100644 --- a/srt/SrtTransport.cpp +++ b/srt/SrtTransport.cpp @@ -407,9 +407,9 @@ void SrtTransport::handleDropReq(uint8_t *buf, int len, struct sockaddr_storage if (list.empty()) { return; } - uint32_t max_seq = 0; + // uint32_t max_seq = 0; for (auto& data : list) { - max_seq = data->packet_seq_number; + // max_seq = data->packet_seq_number; if (_last_pkt_seq + 1 != data->packet_seq_number) { TraceL << "pkt lost " << _last_pkt_seq + 1 << "->" << data->packet_seq_number; } @@ -620,9 +620,9 @@ void SrtTransport::handleDataPacket(uint8_t *buf, int len, struct sockaddr_stora if (list.empty()) { // when no data ok send nack to sender immediately } else { - uint32_t last_seq; + // uint32_t last_seq; for (auto& data : list) { - last_seq = data->packet_seq_number; + // last_seq = data->packet_seq_number; if (_last_pkt_seq + 1 != data->packet_seq_number) { TraceL << "pkt lost " << _last_pkt_seq + 1 << "->" << data->packet_seq_number; }