mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-06 11:38:11 +08:00
大幅提升接收推流性能以及降低内存占用
This commit is contained in:
@@ -18,7 +18,9 @@
|
||||
#include <map>
|
||||
#include <stdexcept>
|
||||
#include <functional>
|
||||
#include "Network/Buffer.h"
|
||||
using namespace std;
|
||||
using namespace toolkit;
|
||||
|
||||
enum AMFType {
|
||||
AMF_NUMBER,
|
||||
@@ -81,7 +83,7 @@ private:
|
||||
|
||||
class AMFDecoder {
|
||||
public:
|
||||
AMFDecoder(const std::string &buf, size_t pos, int version = 0);
|
||||
AMFDecoder(const BufferLikeString &buf, size_t pos, int version = 0);
|
||||
template<typename TP>
|
||||
TP load();
|
||||
private:
|
||||
@@ -92,7 +94,7 @@ private:
|
||||
uint8_t front();
|
||||
uint8_t pop_front();
|
||||
private:
|
||||
const std::string &buf;
|
||||
const BufferLikeString &buf;
|
||||
size_t pos;
|
||||
int version;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user