Toggle navigation
Toggle navigation
此项目
正在载入...
Sign in
胡斌
/
srs
转到一个项目
Toggle navigation
项目
群组
代码片段
帮助
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
winlin
2015-04-20 11:24:12 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6e5c587e0a0f820c5ee658921f01540e4c194885
6e5c587e
1 parent
22ca4635
support aac_adtstoasc filter to copy mode.
隐藏空白字符变更
内嵌
并排对比
正在显示
1 个修改的文件
包含
29 行增加
和
15 行删除
trunk/src/app/srs_app_ffmpeg.cpp
trunk/src/app/srs_app_ffmpeg.cpp
查看文件 @
6e5c587
...
...
@@ -330,21 +330,21 @@ int SrsFFMPEG::start()
}
// the codec params is disabled when copy
if
(
acodec
!=
SRS_RTMP_ENCODER_COPY
&&
acodec
!=
SRS_RTMP_ENCODER_NO_AUDIO
)
{
params
.
push_back
(
"-b:a"
);
snprintf
(
tmp
,
sizeof
(
tmp
),
"%d"
,
abitrate
*
1000
);
params
.
push_back
(
tmp
);
params
.
push_back
(
"-ar"
);
snprintf
(
tmp
,
sizeof
(
tmp
),
"%d"
,
asample_rate
);
params
.
push_back
(
tmp
);
params
.
push_back
(
"-ac"
);
snprintf
(
tmp
,
sizeof
(
tmp
),
"%d"
,
achannels
);
params
.
push_back
(
tmp
);
// aparams
if
(
!
aparams
.
empty
())
{
if
(
acodec
!=
SRS_RTMP_ENCODER_NO_AUDIO
)
{
if
(
acodec
!=
SRS_RTMP_ENCODER_COPY
)
{
params
.
push_back
(
"-b:a"
);
snprintf
(
tmp
,
sizeof
(
tmp
),
"%d"
,
abitrate
*
1000
);
params
.
push_back
(
tmp
);
params
.
push_back
(
"-ar"
);
snprintf
(
tmp
,
sizeof
(
tmp
),
"%d"
,
asample_rate
);
params
.
push_back
(
tmp
);
params
.
push_back
(
"-ac"
);
snprintf
(
tmp
,
sizeof
(
tmp
),
"%d"
,
achannels
);
params
.
push_back
(
tmp
);
// aparams
std
::
vector
<
std
::
string
>::
iterator
it
;
for
(
it
=
aparams
.
begin
();
it
!=
aparams
.
end
();
++
it
)
{
std
::
string
p
=
*
it
;
...
...
@@ -352,6 +352,20 @@ int SrsFFMPEG::start()
params
.
push_back
(
p
);
}
}
}
else
{
// for audio copy.
for
(
int
i
=
0
;
i
<
(
int
)
aparams
.
size
();)
{
std
::
string
pn
=
aparams
[
i
++
];
// aparams, the adts to asc filter "-bsf:a aac_adtstoasc"
if
(
pn
==
"-bsf:a"
&&
i
<
(
int
)
aparams
.
size
())
{
std
::
string
pv
=
aparams
[
i
++
];
if
(
pv
==
"aac_adtstoasc"
)
{
params
.
push_back
(
pn
);
params
.
push_back
(
pv
);
}
}
}
}
}
...
...
请
注册
或
登录
后发表评论