mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-22 00:42:22 +08:00
修复编译问题
This commit is contained in:
@@ -83,7 +83,7 @@ void HlsPlayer::playNextTs(bool force){
|
||||
strongSelf->playNextTs(true);
|
||||
} else {
|
||||
//下一个切片慢点播放
|
||||
strongSelf->_timer_ts.reset(new Timer(delay / 1000.0f, [weakSelf, delay]() {
|
||||
strongSelf->_timer_ts.reset(new Timer(delay / 1000.0f, [weakSelf]() {
|
||||
auto strongSelf = weakSelf.lock();
|
||||
if (!strongSelf) {
|
||||
return false;
|
||||
|
||||
@@ -144,7 +144,7 @@ Buffer::Ptr HttpFileBody::readData(size_t size) {
|
||||
//读到数据了
|
||||
ret->setSize(iRead);
|
||||
_offset += iRead;
|
||||
return ret;
|
||||
return std::move(ret);
|
||||
}
|
||||
//读取文件异常,文件真实长度小于声明长度
|
||||
_offset = _max_size;
|
||||
@@ -218,7 +218,7 @@ string HttpMultiFormBody::multiFormBodySuffix(const string &boundary){
|
||||
string endMPboundary = MPboundary + "--";
|
||||
_StrPrinter body;
|
||||
body << "\r\n" << endMPboundary;
|
||||
return body;
|
||||
return std::move(body);
|
||||
}
|
||||
|
||||
size_t HttpMultiFormBody::fileSize(FILE *fp) {
|
||||
@@ -244,7 +244,7 @@ string HttpMultiFormBody::multiFormBodyPrefix(const HttpArgs &args,const string
|
||||
body << MPboundary << "\r\n";
|
||||
body << "Content-Disposition: form-data; name=\"" << "file" << "\";filename=\"" << fileName << "\"\r\n";
|
||||
body << "Content-Type: application/octet-stream\r\n\r\n" ;
|
||||
return body;
|
||||
return std::move(body);
|
||||
}
|
||||
|
||||
}//namespace mediakit
|
||||
|
||||
@@ -674,7 +674,7 @@ void HttpSession::Handle_Req_POST(size_t &content_len) {
|
||||
//返回不固定长度的content
|
||||
content_len = -1;
|
||||
auto parserCopy = _parser;
|
||||
std::shared_ptr<size_t> recvedContentLen = std::make_shared<uint64_t>(0);
|
||||
std::shared_ptr<size_t> recvedContentLen = std::make_shared<size_t>(0);
|
||||
bool bClose = !strcasecmp(_parser["Connection"].data(),"close");
|
||||
|
||||
_contentCallBack = [this,parserCopy,totalContentLen,recvedContentLen,bClose](const char *data,size_t len){
|
||||
|
||||
@@ -53,7 +53,7 @@ do{ \
|
||||
} \
|
||||
}while(0) \
|
||||
|
||||
void WebSocketSplitter::decode(uint8_t *data,size_t len) {
|
||||
void WebSocketSplitter::decode(uint8_t *data, size_t len) {
|
||||
uint8_t *ptr = data;
|
||||
if(!_got_header) {
|
||||
//还没有获取数据头
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
* @param data 需要解包的数据,可能是不完整的包或多个包
|
||||
* @param len 数据长度
|
||||
*/
|
||||
void decode(uint8_t *data,uint64_t len);
|
||||
void decode(uint8_t *data, size_t len);
|
||||
|
||||
/**
|
||||
* 编码一个数据包
|
||||
@@ -119,7 +119,7 @@ protected:
|
||||
* @param len 负载数据长度
|
||||
* @param recved 已接收数据长度(包含本次数据长度),等于header._payload_len时则接受完毕
|
||||
*/
|
||||
virtual void onWebSocketDecodePayload(const WebSocketHeader &header, const uint8_t *ptr, uint64_t len, uint64_t recved) {};
|
||||
virtual void onWebSocketDecodePayload(const WebSocketHeader &header, const uint8_t *ptr, size_t len, size_t recved) {};
|
||||
|
||||
/**
|
||||
* 接收到完整的一个webSocket数据包后回调
|
||||
@@ -135,13 +135,13 @@ protected:
|
||||
virtual void onWebSocketEncodeData(Buffer::Ptr buffer){};
|
||||
|
||||
private:
|
||||
void onPayloadData(uint8_t *data, uint64_t len);
|
||||
void onPayloadData(uint8_t *data, size_t len);
|
||||
|
||||
private:
|
||||
string _remain_data;
|
||||
int _mask_offset = 0;
|
||||
bool _got_header = false;
|
||||
uint64_t _payload_offset = 0;
|
||||
int _mask_offset = 0;
|
||||
size_t _payload_offset = 0;
|
||||
string _remain_data;
|
||||
};
|
||||
|
||||
} /* namespace mediakit */
|
||||
|
||||
Reference in New Issue
Block a user