http-ts直播减少一次内存拷贝

This commit is contained in:
ziyue
2021-07-07 16:15:42 +08:00
parent 6220db77e8
commit 4b694ccde8
5 changed files with 20 additions and 18 deletions

View File

@@ -18,12 +18,12 @@ using namespace toolkit;
namespace mediakit {
//TS直播数据包
class TSPacket : public BufferRaw{
class TSPacket : public BufferOffset<Buffer::Ptr>{
public:
using Ptr = std::shared_ptr<TSPacket>;
template<typename ...ARGS>
TSPacket(ARGS && ...args) : BufferRaw(std::forward<ARGS>(args)...) {};
TSPacket(ARGS && ...args) : BufferOffset<Buffer::Ptr>(std::forward<ARGS>(args)...) {};
~TSPacket() override = default;
public: