Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
ZLMediaKit
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
张翔宇
ZLMediaKit
Commits
de824959
Commit
de824959
authored
a year ago
by
xiongziliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Session类构造析构跟踪日志统一在底层网络框架打印
parent
f1037e37
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
9 行增加
和
28 行删除
+9
-28
3rdpart/ZLToolKit
+1
-1
src/Http/HttpSession.cpp
+1
-4
src/Rtmp/RtmpSession.cpp
+1
-4
src/Rtp/RtpSession.cpp
+0
-2
src/Rtsp/RtspSession.cpp
+1
-5
src/Shell/ShellSession.cpp
+1
-4
srt/SrtSession.cpp
+1
-3
srt/SrtTransportImp.cpp
+2
-2
webrtc/WebRtcSession.cpp
+1
-3
没有找到文件。
ZLToolKit
@
13371427
Subproject commit
ad7ad8620eb18e94afcf3e6f2df15ebcc845b502
Subproject commit
1337142746b84ef157a455aefcae5523baa22404
This diff is collapsed.
Click to expand it.
src/Http/HttpSession.cpp
查看文件 @
de824959
...
...
@@ -24,14 +24,11 @@ using namespace toolkit;
namespace
mediakit
{
HttpSession
::
HttpSession
(
const
Socket
::
Ptr
&
pSock
)
:
Session
(
pSock
)
{
TraceP
(
this
);
GET_CONFIG
(
uint32_t
,
keep_alive_sec
,
Http
::
kKeepAliveSecond
);
pSock
->
setSendTimeOutSecond
(
keep_alive_sec
);
}
HttpSession
::~
HttpSession
()
{
TraceP
(
this
);
}
HttpSession
::~
HttpSession
()
=
default
;
void
HttpSession
::
Handle_Req_HEAD
(
ssize_t
&
content_len
){
//暂时全部返回200 OK,因为HTTP GET存在按需生成流的操作,所以不能按照HTTP GET的流程返回
...
...
This diff is collapsed.
Click to expand it.
src/Rtmp/RtmpSession.cpp
查看文件 @
de824959
...
...
@@ -18,14 +18,11 @@ using namespace toolkit;
namespace
mediakit
{
RtmpSession
::
RtmpSession
(
const
Socket
::
Ptr
&
sock
)
:
Session
(
sock
)
{
DebugP
(
this
);
GET_CONFIG
(
uint32_t
,
keep_alive_sec
,
Rtmp
::
kKeepAliveSecond
);
sock
->
setSendTimeOutSecond
(
keep_alive_sec
);
}
RtmpSession
::~
RtmpSession
()
{
DebugP
(
this
);
}
RtmpSession
::~
RtmpSession
()
=
default
;
void
RtmpSession
::
onError
(
const
SockException
&
err
)
{
bool
is_player
=
!
_push_src_ownership
;
...
...
This diff is collapsed.
Click to expand it.
src/Rtp/RtpSession.cpp
查看文件 @
de824959
...
...
@@ -36,7 +36,6 @@ void RtpSession::setParams(mINI &ini) {
}
RtpSession
::
RtpSession
(
const
Socket
::
Ptr
&
sock
)
:
Session
(
sock
)
{
DebugP
(
this
);
socklen_t
addr_len
=
sizeof
(
_addr
);
getpeername
(
sock
->
rawFD
(),
(
struct
sockaddr
*
)
&
_addr
,
&
addr_len
);
_is_udp
=
sock
->
sockType
()
==
SockNum
::
Sock_UDP
;
...
...
@@ -47,7 +46,6 @@ RtpSession::RtpSession(const Socket::Ptr &sock) : Session(sock) {
}
RtpSession
::~
RtpSession
()
{
DebugP
(
this
);
if
(
_process
){
RtpSelector
::
Instance
().
delProcess
(
_stream_id
,
_process
.
get
());
}
...
...
This diff is collapsed.
Click to expand it.
src/Rtsp/RtspSession.cpp
查看文件 @
de824959
...
...
@@ -52,14 +52,11 @@ static unordered_map<string, weak_ptr<RtspSession> > g_mapGetter;
static
recursive_mutex
g_mtxGetter
;
RtspSession
::
RtspSession
(
const
Socket
::
Ptr
&
sock
)
:
Session
(
sock
)
{
DebugP
(
this
);
GET_CONFIG
(
uint32_t
,
keep_alive_sec
,
Rtsp
::
kKeepAliveSecond
);
sock
->
setSendTimeOutSecond
(
keep_alive_sec
);
}
RtspSession
::~
RtspSession
()
{
DebugP
(
this
);
}
RtspSession
::~
RtspSession
()
=
default
;
void
RtspSession
::
onError
(
const
SockException
&
err
)
{
bool
is_player
=
!
_push_src_ownership
;
...
...
@@ -405,7 +402,6 @@ void RtspSession::handleReq_Describe(const Parser &parser) {
}
void
RtspSession
::
onAuthSuccess
()
{
TraceP
(
this
);
weak_ptr
<
RtspSession
>
weak_self
=
dynamic_pointer_cast
<
RtspSession
>
(
shared_from_this
());
MediaSource
::
findAsync
(
_media_info
,
weak_self
.
lock
(),
[
weak_self
](
const
MediaSource
::
Ptr
&
src
){
auto
strong_self
=
weak_self
.
lock
();
...
...
This diff is collapsed.
Click to expand it.
src/Shell/ShellSession.cpp
查看文件 @
de824959
...
...
@@ -25,13 +25,10 @@ static onceToken s_token([]() {
},
nullptr
);
ShellSession
::
ShellSession
(
const
Socket
::
Ptr
&
_sock
)
:
Session
(
_sock
)
{
DebugP
(
this
);
pleaseInputUser
();
}
ShellSession
::~
ShellSession
()
{
DebugP
(
this
);
}
ShellSession
::~
ShellSession
()
=
default
;
void
ShellSession
::
onRecv
(
const
Buffer
::
Ptr
&
buf
)
{
//DebugL << hexdump(buf->data(), buf->size());
...
...
This diff is collapsed.
Click to expand it.
srt/SrtSession.cpp
查看文件 @
de824959
...
...
@@ -16,9 +16,7 @@ SrtSession::SrtSession(const Socket::Ptr &sock)
// TraceL<<"after addr len "<<addr_len<<" family "<<_peer_addr.ss_family;
}
SrtSession
::~
SrtSession
()
{
InfoP
(
this
);
}
SrtSession
::~
SrtSession
()
=
default
;
EventPoller
::
Ptr
SrtSession
::
queryPoller
(
const
Buffer
::
Ptr
&
buffer
)
{
uint8_t
*
data
=
(
uint8_t
*
)
buffer
->
data
();
...
...
This diff is collapsed.
Click to expand it.
srt/SrtTransportImp.cpp
查看文件 @
de824959
...
...
@@ -6,10 +6,10 @@
namespace
SRT
{
SrtTransportImp
::
SrtTransportImp
(
const
EventPoller
::
Ptr
&
poller
)
:
SrtTransport
(
poller
)
{}
:
SrtTransport
(
poller
)
{
}
SrtTransportImp
::~
SrtTransportImp
()
{
InfoP
(
this
);
uint64_t
duration
=
_alive_ticker
.
createdTime
()
/
1000
;
WarnP
(
this
)
<<
(
_is_pusher
?
"srt 推流器("
:
"srt 播放器("
)
<<
_media_info
.
shortUrl
()
<<
")断开,耗时(s):"
<<
duration
;
...
...
This diff is collapsed.
Click to expand it.
webrtc/WebRtcSession.cpp
查看文件 @
de824959
...
...
@@ -51,9 +51,7 @@ WebRtcSession::WebRtcSession(const Socket::Ptr &sock) : Session(sock) {
_over_tcp
=
sock
->
sockType
()
==
SockNum
::
Sock_TCP
;
}
WebRtcSession
::~
WebRtcSession
()
{
InfoP
(
this
);
}
WebRtcSession
::~
WebRtcSession
()
=
default
;
void
WebRtcSession
::
attachServer
(
const
Server
&
server
)
{
_server
=
std
::
dynamic_pointer_cast
<
toolkit
::
TcpServer
>
(
const_cast
<
Server
&>
(
server
).
shared_from_this
());
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论