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
30260e54
Commit
30260e54
authored
4 years ago
by
xiongziliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
复用printSSRC函数
parent
80d9f8cc
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
12 行增加
和
11 行删除
+12
-11
src/Rtsp/Rtsp.cpp
+11
-0
src/Rtsp/Rtsp.h
+1
-0
src/Rtsp/RtspSession.cpp
+0
-9
src/Rtsp/RtspSession.h
+0
-2
没有找到文件。
src/Rtsp/Rtsp.cpp
查看文件 @
30260e54
...
...
@@ -404,4 +404,14 @@ std::pair<Socket::Ptr, Socket::Ptr> makeSockPair(const EventPoller::Ptr &poller,
}
}
string
printSSRC
(
uint32_t
ui32Ssrc
)
{
char
tmp
[
9
]
=
{
0
};
ui32Ssrc
=
htonl
(
ui32Ssrc
);
uint8_t
*
pSsrc
=
(
uint8_t
*
)
&
ui32Ssrc
;
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
sprintf
(
tmp
+
2
*
i
,
"%02X"
,
pSsrc
[
i
]);
}
return
tmp
;
}
}
//
namespace
mediakit
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/Rtsp/Rtsp.h
查看文件 @
30260e54
...
...
@@ -272,6 +272,7 @@ private:
};
std
::
pair
<
Socket
::
Ptr
,
Socket
::
Ptr
>
makeSockPair
(
const
EventPoller
::
Ptr
&
poller
,
const
string
&
local_ip
);
string
printSSRC
(
uint32_t
ui32Ssrc
);
}
//namespace mediakit
#endif //RTSP_RTSP_H_
This diff is collapsed.
Click to expand it.
src/Rtsp/RtspSession.cpp
查看文件 @
30260e54
...
...
@@ -1068,15 +1068,6 @@ bool RtspSession::sendRtspResponse(const string &res_code,
return
sendRtspResponse
(
res_code
,
header_map
,
sdp
,
protocol
);
}
inline
string
RtspSession
::
printSSRC
(
uint32_t
ui32Ssrc
)
{
char
tmp
[
9
]
=
{
0
};
ui32Ssrc
=
htonl
(
ui32Ssrc
);
uint8_t
*
pSsrc
=
(
uint8_t
*
)
&
ui32Ssrc
;
for
(
int
i
=
0
;
i
<
4
;
i
++
)
{
sprintf
(
tmp
+
2
*
i
,
"%02X"
,
pSsrc
[
i
]);
}
return
tmp
;
}
inline
int
RtspSession
::
getTrackIndexByTrackType
(
TrackType
type
)
{
for
(
unsigned
int
i
=
0
;
i
<
_aTrackInfo
.
size
();
i
++
)
{
if
(
type
==
_aTrackInfo
[
i
]
->
_type
)
{
...
...
This diff is collapsed.
Click to expand it.
src/Rtsp/RtspSession.h
查看文件 @
30260e54
...
...
@@ -136,8 +136,6 @@ private:
void
inline
send_SessionNotFound
();
//一般rtsp服务器打开端口失败时触发
void
inline
send_NotAcceptable
();
//ssrc转字符串
inline
string
printSSRC
(
uint32_t
ui32Ssrc
);
//获取track下标
inline
int
getTrackIndexByTrackType
(
TrackType
type
);
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论