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
0df25942
Commit
0df25942
authored
4 years ago
by
xiongziliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtp推流初步添加事件
parent
00c21cd9
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
119 行增加
和
33 行删除
+119
-33
3rdpart/ZLToolKit
+1
-1
src/Rtp/RtpProcess.cpp
+100
-29
src/Rtp/RtpProcess.h
+18
-3
没有找到文件。
ZLToolKit
@
ebd96d98
Subproject commit
07d21ac61be6c7a4eba90a5d2d26b15daa882cf7
Subproject commit
ebd96d983d8dd3268e3e77ed08fb57d67666061c
This diff is collapsed.
Click to expand it.
src/Rtp/RtpProcess.cpp
查看文件 @
0df25942
差异被折叠。
点击展开。
src/Rtp/RtpProcess.h
查看文件 @
0df25942
...
...
@@ -24,21 +24,31 @@ namespace mediakit{
string
printSSRC
(
uint32_t
ui32Ssrc
);
class
FrameMerger
;
class
RtpProcess
:
public
RtpReceiver
,
public
RtpDecoder
{
class
RtpProcess
:
public
RtpReceiver
,
public
RtpDecoder
,
public
SockInfo
,
public
std
::
enable_shared_from_this
<
RtpProcess
>
{
public
:
typedef
std
::
shared_ptr
<
RtpProcess
>
Ptr
;
RtpProcess
(
uint32_t
ssrc
);
~
RtpProcess
();
bool
inputRtp
(
const
char
*
data
,
int
data_len
,
const
struct
sockaddr
*
addr
,
uint32_t
*
dts_out
=
nullptr
);
bool
alive
();
string
get_peer_ip
();
uint16_t
get_peer_port
();
const
string
&
get_local_ip
()
override
;
uint16_t
get_local_port
()
override
;
const
string
&
get_peer_ip
()
override
;
uint16_t
get_peer_port
()
override
;
string
getIdentifier
()
const
override
;
int
totalReaderCount
();
void
setListener
(
const
std
::
weak_ptr
<
MediaSourceEvent
>
&
listener
);
protected
:
void
onRtpSorted
(
const
RtpPacket
::
Ptr
&
rtp
,
int
track_index
)
override
;
void
onRtpDecode
(
const
uint8_t
*
packet
,
int
bytes
,
uint32_t
timestamp
,
int
flags
)
override
;
void
onDecode
(
int
stream
,
int
codecid
,
int
flags
,
int64_t
pts
,
int64_t
dts
,
const
void
*
data
,
int
bytes
);
private
:
void
emitOnPublish
();
private
:
std
::
shared_ptr
<
FILE
>
_save_file_rtp
;
std
::
shared_ptr
<
FILE
>
_save_file_ps
;
...
...
@@ -55,6 +65,11 @@ private:
unordered_map
<
int
,
Stamp
>
_stamps
;
uint32_t
_dts
=
0
;
Decoder
::
Ptr
_decoder
;
string
_peer_ip
;
string
_local_ip
;
std
::
weak_ptr
<
MediaSourceEvent
>
_listener
;
MediaInfo
_media_info
;
uint64_t
_ui64TotalBytes
=
0
;
};
}
//namespace mediakit
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论