first commit for srt intergrate

This commit is contained in:
xiongguangjie
2022-06-03 13:25:32 +08:00
parent 59dcd03b70
commit aa2ff01d9f
18 changed files with 2484 additions and 0 deletions

31
srt/SrtSession.hpp Normal file
View File

@@ -0,0 +1,31 @@
#ifndef ZLMEDIAKIT_SRT_SESSION_H
#define ZLMEDIAKIT_SRT_SESSION_H
#include "Network/Session.h"
#include "SrtTransport.hpp"
namespace SRT {
using namespace toolkit;
class SrtSession : public UdpSession {
public:
SrtSession(const Socket::Ptr &sock);
~SrtSession() override;
void onRecv(const Buffer::Ptr &) override;
void onError(const SockException &err) override;
void onManager() override;
static EventPoller::Ptr queryPoller(const Buffer::Ptr &buffer);
private:
bool _find_transport = true;
Ticker _ticker;
struct sockaddr_storage _peer_addr;
SrtTransport::Ptr _transport;
};
} // namespace SRT
#endif //ZLMEDIAKIT_SRT_SESSION_H