mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-07 04:08:13 +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:
@@ -15,7 +15,6 @@
|
||||
#include "Rtmp/RtmpMediaSource.h"
|
||||
#include "Network/Socket.h"
|
||||
#include "Common/Stamp.h"
|
||||
using namespace toolkit;
|
||||
|
||||
namespace mediakit {
|
||||
|
||||
@@ -28,8 +27,8 @@ public:
|
||||
void stop();
|
||||
|
||||
protected:
|
||||
void start(const EventPoller::Ptr &poller, const RtmpMediaSource::Ptr &media, uint32_t start_pts = 0);
|
||||
virtual void onWrite(const Buffer::Ptr &data, bool flush) = 0;
|
||||
void start(const toolkit::EventPoller::Ptr &poller, const RtmpMediaSource::Ptr &media, uint32_t start_pts = 0);
|
||||
virtual void onWrite(const toolkit::Buffer::Ptr &data, bool flush) = 0;
|
||||
virtual void onDetach() = 0;
|
||||
virtual std::shared_ptr<FlvMuxer> getSharedPtr() = 0;
|
||||
|
||||
@@ -37,12 +36,12 @@ private:
|
||||
void onWriteFlvHeader(const RtmpMediaSource::Ptr &src);
|
||||
void onWriteRtmp(const RtmpPacket::Ptr &pkt, bool flush);
|
||||
void onWriteFlvTag(const RtmpPacket::Ptr &pkt, uint32_t time_stamp, bool flush);
|
||||
void onWriteFlvTag(uint8_t type, const Buffer::Ptr &buffer, uint32_t time_stamp, bool flush);
|
||||
BufferRaw::Ptr obtainBuffer(const void *data, size_t len);
|
||||
BufferRaw::Ptr obtainBuffer();
|
||||
void onWriteFlvTag(uint8_t type, const toolkit::Buffer::Ptr &buffer, uint32_t time_stamp, bool flush);
|
||||
toolkit::BufferRaw::Ptr obtainBuffer(const void *data, size_t len);
|
||||
toolkit::BufferRaw::Ptr obtainBuffer();
|
||||
|
||||
private:
|
||||
ResourcePool<BufferRaw> _packet_pool;
|
||||
toolkit::ResourcePool<toolkit::BufferRaw> _packet_pool;
|
||||
RtmpMediaSource::RingType::RingReader::Ptr _ring_reader;
|
||||
};
|
||||
|
||||
@@ -52,17 +51,17 @@ public:
|
||||
FlvRecorder() = default;
|
||||
~FlvRecorder() override = default;
|
||||
|
||||
void startRecord(const EventPoller::Ptr &poller, const RtmpMediaSource::Ptr &media, const string &file_path);
|
||||
void startRecord(const EventPoller::Ptr &poller, const string &vhost, const string &app, const string &stream, const string &file_path);
|
||||
void startRecord(const toolkit::EventPoller::Ptr &poller, const RtmpMediaSource::Ptr &media, const std::string &file_path);
|
||||
void startRecord(const toolkit::EventPoller::Ptr &poller, const std::string &vhost, const std::string &app, const std::string &stream, const std::string &file_path);
|
||||
|
||||
private:
|
||||
virtual void onWrite(const Buffer::Ptr &data, bool flush) override ;
|
||||
virtual void onWrite(const toolkit::Buffer::Ptr &data, bool flush) override ;
|
||||
virtual void onDetach() override;
|
||||
virtual std::shared_ptr<FlvMuxer> getSharedPtr() override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<FILE> _file;
|
||||
recursive_mutex _file_mtx;
|
||||
std::recursive_mutex _file_mtx;
|
||||
};
|
||||
|
||||
}//namespace mediakit
|
||||
|
||||
Reference in New Issue
Block a user