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
4af9927e
Commit
4af9927e
authored
6 years ago
by
xiongziliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
规范对象命名
parent
23074048
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
20 行增加
和
24 行删除
+20
-24
src/Player/PlayerBase.h
+1
-1
src/Player/Track.h
+10
-10
src/Rtsp/RtspEncoder.h
+9
-13
没有找到文件。
src/Player/PlayerBase.h
查看文件 @
4af9927e
...
...
@@ -109,7 +109,7 @@ public:
virtual
bool
containVideo
()
const
{
return
false
;
};
virtual
int
getTrackCount
()
const
{
return
0
;};
virtual
Track
Format
::
Ptr
getTrack
(
int
index
)
const
{
return
nullptr
;};
virtual
Track
::
Ptr
getTrack
(
int
index
)
const
{
return
nullptr
;};
protected
:
virtual
void
onShutdown
(
const
SockException
&
ex
)
{};
virtual
void
onPlayResult
(
const
SockException
&
ex
)
{};
...
...
This diff is collapsed.
Click to expand it.
src/Player/Track.h
查看文件 @
4af9927e
...
...
@@ -14,14 +14,14 @@
using
namespace
std
;
using
namespace
ZL
::
Util
;
class
Track
Format
:
public
FrameRingInterface
,
public
CodecInfo
{
class
Track
:
public
FrameRingInterface
,
public
CodecInfo
{
public
:
typedef
std
::
shared_ptr
<
Track
Format
>
Ptr
;
Track
Format
(){}
virtual
~
Track
Format
(){}
typedef
std
::
shared_ptr
<
Track
>
Ptr
;
Track
(){}
virtual
~
Track
(){}
};
class
VideoTrack
Format
:
public
TrackFormat
{
class
VideoTrack
:
public
Track
{
public
:
TrackType
getTrackType
()
const
override
{
return
TrackVideo
;};
virtual
int
getVideoHeight
()
const
=
0
;
...
...
@@ -29,7 +29,7 @@ public:
virtual
float
getVideoFps
()
const
=
0
;
};
class
AudioTrack
Format
:
public
TrackFormat
{
class
AudioTrack
:
public
Track
{
public
:
TrackType
getTrackType
()
const
override
{
return
TrackAudio
;};
virtual
int
getAudioSampleRate
()
const
=
0
;
...
...
@@ -37,9 +37,9 @@ public:
virtual
int
getAudioChannel
()
const
=
0
;
};
class
H264Track
Format
:
public
VideoTrackFormat
{
class
H264Track
:
public
VideoTrack
{
public
:
H264Track
Format
(
const
string
&
sps
,
const
string
&
pps
){
H264Track
(
const
string
&
sps
,
const
string
&
pps
){
_sps
=
sps
;
_pps
=
pps
;
}
...
...
@@ -57,9 +57,9 @@ private:
string
_pps
;
};
class
AACTrack
Format
:
public
AudioTrackFormat
{
class
AACTrack
:
public
AudioTrack
{
public
:
AACTrack
Format
(
const
string
&
aac_cfg
){
AACTrack
(
const
string
&
aac_cfg
){
_cfg
=
aac_cfg
;
}
const
string
&
getAacCfg
()
const
{
...
...
This diff is collapsed.
Click to expand it.
src/Rtsp/RtspEncoder.h
查看文件 @
4af9927e
...
...
@@ -15,7 +15,7 @@ namespace Rtsp{
/**
* sdp基类
*/
class
Sdp
:
public
TrackFormat
,
public
RtpRingInterface
{
class
Sdp
:
public
Track
,
public
RtpRingInterface
{
public
:
typedef
std
::
shared_ptr
<
Sdp
>
Ptr
;
Sdp
(
uint32_t
sample_rate
,
uint8_t
playload_type
){
...
...
@@ -54,14 +54,10 @@ public:
}
void
setFrameRing
(
const
FrameRingInterface
::
RingType
::
Ptr
&
ring
)
override
{
if
(
_encoder
){
_encoder
->
setFrameRing
(
ring
);
}
_encoder
->
setFrameRing
(
ring
);
}
void
setRtpRing
(
const
RtpRingInterface
::
RingType
::
Ptr
&
ring
)
override
{
if
(
_encoder
){
_encoder
->
setRtpRing
(
ring
);
}
_encoder
->
setRtpRing
(
ring
);
}
virtual
void
createRtpEncoder
(
uint32_t
ssrc
,
int
mtu
)
{
...
...
@@ -81,7 +77,7 @@ private:
/**
* sdp中除音视频外的其他描述部分
*/
class
SdpTitle
:
public
Sdp
{
class
TitleSdp
:
public
Sdp
{
public
:
/**
...
...
@@ -90,7 +86,7 @@ public:
* @param header 自定义sdp描述
* @param version sdp版本
*/
SdpTitle
(
float
dur_sec
=
0
,
TitleSdp
(
float
dur_sec
=
0
,
const
map
<
string
,
string
>
&
header
=
map
<
string
,
string
>
(),
int
version
=
0
)
:
Sdp
(
0
,
0
){
_printer
<<
"v="
<<
version
<<
"
\r\n
"
;
...
...
@@ -124,7 +120,7 @@ private:
/**
* h264类型sdp
*/
class
SdpH264
:
public
Sdp
{
class
H264Sdp
:
public
Sdp
{
public
:
/**
...
...
@@ -136,7 +132,7 @@ public:
* @param track_id trackID 默认为TrackVideo
* @param bitrate 比特率
*/
SdpH264
(
const
string
&
sps
,
H264Sdp
(
const
string
&
sps
,
const
string
&
pps
,
int
sample_rate
=
90000
,
int
playload_type
=
96
,
...
...
@@ -186,7 +182,7 @@ private:
/**
* aac类型SDP
*/
class
SdpAAC
:
public
Sdp
{
class
AACSdp
:
public
Sdp
{
public
:
/**
...
...
@@ -197,7 +193,7 @@ public:
* @param track_id trackID 默认为TrackVideo
* @param bitrate 比特率
*/
SdpAAC
(
const
string
&
aac_cfg
,
AACSdp
(
const
string
&
aac_cfg
,
int
sample_rate
,
int
playload_type
=
98
,
int
bitrate
=
128
)
:
Sdp
(
sample_rate
,
playload_type
){
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论