mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-26 12:37:09 +08:00
fix clang format change include order result in windows build error
This commit is contained in:
parent
f58211fb08
commit
49a0183df0
@ -1,9 +1,10 @@
|
|||||||
#ifndef ZLMEDIAKIT_SRT_COMMON_H
|
#ifndef ZLMEDIAKIT_SRT_COMMON_H
|
||||||
#define ZLMEDIAKIT_SRT_COMMON_H
|
#define ZLMEDIAKIT_SRT_COMMON_H
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#include <Iphlpapi.h>
|
|
||||||
#include <winsock2.h>
|
#include <winsock2.h>
|
||||||
#include <ws2tcpip.h>
|
#include <ws2tcpip.h>
|
||||||
|
|
||||||
|
#include <Iphlpapi.h>
|
||||||
#pragma comment(lib, "Ws2_32.lib")
|
#pragma comment(lib, "Ws2_32.lib")
|
||||||
#pragma comment(lib, "Iphlpapi.lib")
|
#pragma comment(lib, "Iphlpapi.lib")
|
||||||
#else
|
#else
|
||||||
|
@ -294,8 +294,12 @@ bool HandshakePacket::loadExtMessage(uint8_t *buf, size_t len) {
|
|||||||
length = loadUint16(ptr + 2);
|
length = loadUint16(ptr + 2);
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case HSExt::SRT_CMD_HSREQ:
|
case HSExt::SRT_CMD_HSREQ:
|
||||||
case HSExt::SRT_CMD_HSRSP: ext = std::make_shared<HSExtMessage>(); break;
|
case HSExt::SRT_CMD_HSRSP:
|
||||||
case HSExt::SRT_CMD_SID: ext = std::make_shared<HSExtStreamID>(); break;
|
ext = std::make_shared<HSExtMessage>();
|
||||||
|
break;
|
||||||
|
case HSExt::SRT_CMD_SID:
|
||||||
|
ext = std::make_shared<HSExtStreamID>();
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
WarnL << "not support ext " << type;
|
WarnL << "not support ext " << type;
|
||||||
break;
|
break;
|
||||||
|
@ -127,6 +127,8 @@ void SrtTransport::handleHandshakeInduction(HandshakePacket &pkt, struct sockadd
|
|||||||
_max_window_size = pkt.max_flow_window_size;
|
_max_window_size = pkt.max_flow_window_size;
|
||||||
_mtu = pkt.mtu;
|
_mtu = pkt.mtu;
|
||||||
|
|
||||||
|
_last_pkt_seq = _init_seq_number - 1;
|
||||||
|
|
||||||
_peer_socket_id = pkt.srt_socket_id;
|
_peer_socket_id = pkt.srt_socket_id;
|
||||||
HandshakePacket::Ptr res = std::make_shared<HandshakePacket>();
|
HandshakePacket::Ptr res = std::make_shared<HandshakePacket>();
|
||||||
res->dst_socket_id = _peer_socket_id;
|
res->dst_socket_id = _peer_socket_id;
|
||||||
@ -318,6 +320,10 @@ void SrtTransport::handleDropReq(uint8_t *buf, int len, struct sockaddr_storage
|
|||||||
uint32_t max_seq = 0;
|
uint32_t max_seq = 0;
|
||||||
for (auto data : list) {
|
for (auto data : list) {
|
||||||
max_seq = data->packet_seq_number;
|
max_seq = data->packet_seq_number;
|
||||||
|
if (_last_pkt_seq + 1 != data->packet_seq_number) {
|
||||||
|
TraceL << "pkt lost " << _last_pkt_seq + 1 << "->" << data->packet_seq_number;
|
||||||
|
}
|
||||||
|
_last_pkt_seq = data->packet_seq_number;
|
||||||
onSRTData(std::move(data));
|
onSRTData(std::move(data));
|
||||||
}
|
}
|
||||||
_recv_nack.drop(max_seq);
|
_recv_nack.drop(max_seq);
|
||||||
@ -454,6 +460,10 @@ void SrtTransport::handleDataPacket(uint8_t *buf, int len, struct sockaddr_stora
|
|||||||
uint32_t last_seq;
|
uint32_t last_seq;
|
||||||
for (auto data : list) {
|
for (auto data : list) {
|
||||||
last_seq = data->packet_seq_number;
|
last_seq = data->packet_seq_number;
|
||||||
|
if (_last_pkt_seq + 1 != data->packet_seq_number) {
|
||||||
|
TraceL << "pkt lost " << _last_pkt_seq + 1 << "->" << data->packet_seq_number;
|
||||||
|
}
|
||||||
|
_last_pkt_seq = data->packet_seq_number;
|
||||||
onSRTData(std::move(data));
|
onSRTData(std::move(data));
|
||||||
}
|
}
|
||||||
_recv_nack.drop(last_seq);
|
_recv_nack.drop(last_seq);
|
||||||
|
@ -125,6 +125,8 @@ private:
|
|||||||
uint32_t _light_ack_pkt_count = 0;
|
uint32_t _light_ack_pkt_count = 0;
|
||||||
uint32_t _ack_number_count = 0;
|
uint32_t _ack_number_count = 0;
|
||||||
uint32_t _last_ack_pkt_seq_num = 0;
|
uint32_t _last_ack_pkt_seq_num = 0;
|
||||||
|
|
||||||
|
uint32_t _last_pkt_seq = 0;
|
||||||
UTicker _ack_ticker;
|
UTicker _ack_ticker;
|
||||||
std::map<uint32_t, TimePoint> _ack_send_timestamp;
|
std::map<uint32_t, TimePoint> _ack_send_timestamp;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user