mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-07-03 08:57:32 +08:00
适配zltoolkit
This commit is contained in:
@@ -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();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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:
|
||||
// 通知其停止推流
|
||||
|
||||
Reference in New Issue
Block a user