全面整理代码,去除编译警告

This commit is contained in:
xia-chu
2021-01-17 18:31:50 +08:00
parent fb1e35a39a
commit b6cbc87712
272 changed files with 936 additions and 933 deletions

View File

@@ -1,7 +1,7 @@
/*
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
*
* This file is part of ZLMediaKit(https://github.com/xiongziliang/ZLMediaKit).
* This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit).
*
* Use of this source code is governed by MIT license that can be found in the
* LICENSE file in the root of the source tree. All contributing project authors
@@ -24,16 +24,18 @@ namespace mediakit {
//TS包分割器用于split一个一个的ts包
class TSSegment : public HttpRequestSplitter {
public:
typedef std::function<void(const char *data,uint64_t len)> onSegment;
TSSegment(int size = TS_PACKET_SIZE) : _size(size){}
typedef std::function<void(const char *data,size_t len)> onSegment;
TSSegment(size_t size = TS_PACKET_SIZE) : _size(size){}
~TSSegment(){}
void setOnSegment(const onSegment &cb);
static bool isTSPacket(const char *data, int len);
static bool isTSPacket(const char *data, size_t len);
protected:
int64_t onRecvHeader(const char *data, uint64_t len) override ;
const char *onSearchPacketTail(const char *data, uint64_t len) override ;
size_t onRecvHeader(const char *data, size_t len) override ;
const char *onSearchPacketTail(const char *data, size_t len) override ;
private:
int _size;
size_t _size;
onSegment _onSegment;
};
@@ -43,7 +45,7 @@ class TSDecoder : public Decoder {
public:
TSDecoder();
~TSDecoder();
int input(const uint8_t* data, int bytes) override ;
size_t input(const uint8_t* data, size_t bytes) override ;
void setOnDecode(onDecode cb) override;
void setOnStream(onStream cb) override;