适配zltoolkit

This commit is contained in:
ziyue
2021-06-08 11:29:32 +08:00
parent 5eb00d5fab
commit 92736db5b2
11 changed files with 25 additions and 22 deletions

View File

@@ -54,7 +54,7 @@ void RtpSender::startSend(const string &dst_url, uint16_t dst_port, bool is_udp,
cb(local_port, SockException());
auto strong_self = weak_self.lock();
if (strong_self) {
strong_self->_socket->setSendPeerAddr(&addr);
strong_self->_socket->bindPeerAddr(&addr);
strong_self->onConnect();
}
});

View File

@@ -17,8 +17,8 @@ namespace mediakit{
const string RtpSession::kStreamID = "stream_id";
void RtpSession::attachServer(const TcpServer &server) {
_stream_id = const_cast<TcpServer &>(server)[kStreamID];
void RtpSession::attachServer(const Server &server) {
_stream_id = const_cast<Server &>(server)[kStreamID];
}
RtpSession::RtpSession(const Socket::Ptr &sock) : TcpSession(sock) {

View File

@@ -28,7 +28,7 @@ public:
void onRecv(const Buffer::Ptr &) override;
void onError(const SockException &err) override;
void onManager() override;
void attachServer(const TcpServer &server) override;
void attachServer(const Server &server) override;
protected:
// 通知其停止推流