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
5ca4ed53
Unverified
Commit
5ca4ed53
authored
a year ago
by
夏楚
Committed by
GitHub
a year ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
防止析构函数抛异常导致崩溃问题 (#2546)
parent
fe370055
显示空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
28 行增加
和
9 行删除
+28
-9
src/Common/MediaSource.cpp
+4
-0
src/Player/PlayerProxy.cpp
+4
-0
src/Pusher/MediaPusher.cpp
+1
-2
src/Record/HlsMaker.cpp
+1
-3
src/Record/HlsMediaSource.cpp
+4
-0
src/Record/MP4Demuxer.cpp
+1
-1
src/Rtp/RtpProcess.cpp
+4
-0
src/Rtp/RtpSender.cpp
+4
-0
srt/SrtTransportImp.cpp
+5
-3
没有找到文件。
src/Common/MediaSource.cpp
查看文件 @
5ca4ed53
...
...
@@ -124,7 +124,11 @@ MediaSource::MediaSource(const string &schema, const MediaTuple& tuple): _tuple(
}
MediaSource
::~
MediaSource
()
{
try
{
unregist
();
}
catch
(
std
::
exception
&
ex
)
{
WarnL
<<
"Exception occurred: "
<<
ex
.
what
();
}
}
const
string
&
MediaSource
::
getSchema
()
const
{
...
...
This diff is collapsed.
Click to expand it.
src/Player/PlayerProxy.cpp
查看文件 @
5ca4ed53
...
...
@@ -202,7 +202,11 @@ PlayerProxy::~PlayerProxy() {
_timer
.
reset
();
// 避免析构时, 忘记回调api请求
if
(
_on_play
)
{
try
{
_on_play
(
SockException
(
Err_shutdown
,
"player proxy close"
));
}
catch
(
std
::
exception
&
ex
)
{
WarnL
<<
"Exception occurred: "
<<
ex
.
what
();
}
_on_play
=
nullptr
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/Pusher/MediaPusher.cpp
查看文件 @
5ca4ed53
...
...
@@ -31,8 +31,7 @@ MediaPusher::MediaPusher(const string &schema,
MediaPusher
(
MediaSource
::
find
(
schema
,
vhost
,
app
,
stream
),
poller
){
}
MediaPusher
::~
MediaPusher
()
{
}
MediaPusher
::~
MediaPusher
()
=
default
;
static
void
setOnCreateSocket_l
(
const
std
::
shared_ptr
<
PusherBase
>
&
delegate
,
const
Socket
::
onCreateSocket
&
cb
){
auto
helper
=
dynamic_pointer_cast
<
SocketHelper
>
(
delegate
);
...
...
This diff is collapsed.
Click to expand it.
src/Record/HlsMaker.cpp
查看文件 @
5ca4ed53
...
...
@@ -22,9 +22,7 @@ HlsMaker::HlsMaker(float seg_duration, uint32_t seg_number, bool seg_keep) {
_seg_keep
=
seg_keep
;
}
HlsMaker
::~
HlsMaker
()
{
}
HlsMaker
::~
HlsMaker
()
=
default
;
void
HlsMaker
::
makeIndexFile
(
bool
eof
)
{
char
file_content
[
1024
];
...
...
This diff is collapsed.
Click to expand it.
src/Record/HlsMediaSource.cpp
查看文件 @
5ca4ed53
...
...
@@ -46,7 +46,11 @@ HlsCookieData::~HlsCookieData() {
GET_CONFIG
(
uint32_t
,
iFlowThreshold
,
General
::
kFlowThreshold
);
uint64_t
bytes
=
_bytes
.
load
();
if
(
bytes
>=
iFlowThreshold
*
1024
)
{
try
{
NoticeCenter
::
Instance
().
emitEvent
(
Broadcast
::
kBroadcastFlowReport
,
_info
,
bytes
,
duration
,
true
,
static_cast
<
SockInfo
&>
(
*
_sock_info
));
}
catch
(
std
::
exception
&
ex
)
{
WarnL
<<
"Exception occurred: "
<<
ex
.
what
();
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/Record/MP4Demuxer.cpp
查看文件 @
5ca4ed53
...
...
@@ -21,7 +21,7 @@ using namespace std;
namespace
mediakit
{
MP4Demuxer
::
MP4Demuxer
()
{}
MP4Demuxer
::
MP4Demuxer
()
=
default
;
MP4Demuxer
::~
MP4Demuxer
()
{
closeMP4
();
...
...
This diff is collapsed.
Click to expand it.
src/Rtp/RtpProcess.cpp
查看文件 @
5ca4ed53
...
...
@@ -66,7 +66,11 @@ RtpProcess::~RtpProcess() {
//流量统计事件广播
GET_CONFIG
(
uint32_t
,
iFlowThreshold
,
General
::
kFlowThreshold
);
if
(
_total_bytes
>=
iFlowThreshold
*
1024
)
{
try
{
NoticeCenter
::
Instance
().
emitEvent
(
Broadcast
::
kBroadcastFlowReport
,
_media_info
,
_total_bytes
,
duration
,
false
,
static_cast
<
SockInfo
&>
(
*
this
));
}
catch
(
std
::
exception
&
ex
)
{
WarnL
<<
"Exception occurred: "
<<
ex
.
what
();
}
}
}
...
...
This diff is collapsed.
Click to expand it.
src/Rtp/RtpSender.cpp
查看文件 @
5ca4ed53
...
...
@@ -28,7 +28,11 @@ RtpSender::RtpSender(EventPoller::Ptr poller) {
}
RtpSender
::~
RtpSender
()
{
try
{
flush
();
}
catch
(
std
::
exception
&
ex
)
{
WarnL
<<
"Exception occurred: "
<<
ex
.
what
();
}
}
void
RtpSender
::
startSend
(
const
MediaSourceEvent
::
SendRtpArgs
&
args
,
const
function
<
void
(
uint16_t
local_port
,
const
SockException
&
ex
)
>
&
cb
){
...
...
This diff is collapsed.
Click to expand it.
srt/SrtTransportImp.cpp
查看文件 @
5ca4ed53
...
...
@@ -16,9 +16,11 @@ SrtTransportImp::~SrtTransportImp() {
// 流量统计事件广播
GET_CONFIG
(
uint32_t
,
iFlowThreshold
,
General
::
kFlowThreshold
);
if
(
_total_bytes
>=
iFlowThreshold
*
1024
)
{
NoticeCenter
::
Instance
().
emitEvent
(
Broadcast
::
kBroadcastFlowReport
,
_media_info
,
_total_bytes
,
duration
,
!
_is_pusher
,
static_cast
<
SockInfo
&>
(
*
this
));
try
{
NoticeCenter
::
Instance
().
emitEvent
(
Broadcast
::
kBroadcastFlowReport
,
_media_info
,
_total_bytes
,
duration
,
!
_is_pusher
,
static_cast
<
SockInfo
&>
(
*
this
));
}
catch
(
std
::
exception
&
ex
)
{
WarnL
<<
"Exception occurred: "
<<
ex
.
what
();
}
}
}
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论