更新ZLToolKit并适配代码

This commit is contained in:
xia-chu
2021-02-07 14:55:09 +08:00
parent 14b318525e
commit 80bcf53ccf
8 changed files with 22 additions and 20 deletions

View File

@@ -10,9 +10,6 @@
#include "RtmpProtocol.h"
#include "Rtmp/utils.h"
#include "Util/util.h"
#include "Util/onceToken.h"
#include "Thread/ThreadPool.h"
#include "RtmpMediaSource.h"
using namespace toolkit;
@@ -760,13 +757,11 @@ void RtmpProtocol::handle_chunk(RtmpPacket::Ptr packet) {
}
}
BufferRaw::Ptr RtmpProtocol::obtainBuffer() {
return std::make_shared<BufferRaw>() ;//_bufferPool.obtain();
}
BufferRaw::Ptr RtmpProtocol::obtainBuffer(const void *data, size_t len) {
auto buffer = obtainBuffer();
buffer->assign((const char *) data, len);
auto buffer = BufferRaw::create();
if (data && len) {
buffer->assign((const char *) data, len);
}
return buffer;
}