mobile CCTV,mobile surveillance,police body worn cameras
标题:
使用付费SDK播放RTSP推RTMP到平台上的设备时,会有杂音,但实际客户那边的设备时没...
[打印本页]
author:
huixing
time:
2024-7-29 10:47
标题:
使用付费SDK播放RTSP推RTMP到平台上的设备时,会有杂音,但实际客户那边的设备时没...
使用付费SDK播放RTSP推RTMP到平台上的设备时,会有杂音,但实际客户那边的设备时没有音频,在Web端平台播放时也没有音频,下面是播放的代码
int
iDir =
this
.
playerInfo
.getBvcuiAVStreamDir()
;
//
当前设备媒体最大能力
if
(
this
.
playerInfo
.getBvcuiAVStreamDir() != -
1
) {
if
(iDir !=
0
) {
if
((iDir & BVCU_MediaDir.
BVCU_MEDIADIR_AUDIORECV
) == BVCU_MediaDir.
BVCU_MEDIADIR_AUDIORECV
&& (iDir & BVCU_MediaDir.
BVCU_MEDIADIR_VIDEORECV
) == BVCU_MediaDir.
BVCU_MEDIADIR_VIDEORECV
) {
iDir =
10
;
}
}
}
BVCU_DialogInfo dialogInfo =
new
BVCU_DialogInfo()
;
dialogInfo.
stParam
=
new
BVCU_DialogParam()
;
dialogInfo.
stParam
.
iTargetCount
=
1
;
dialogInfo.
stParam
.
pTarget
=
new
BVCU_DialogTarget[
1
]
;
dialogInfo.
stParam
.
pTarget
[
0
] =
new
BVCU_DialogTarget()
;
dialogInfo.
stParam
.
pTarget
[
0
].
iIndexMajor
=
0
;
dialogInfo.
stParam
.
pTarget
[
0
].
iIndexMinor
= -
1
;
dialogInfo.
stParam
.
pTarget
[
0
].
szID
=
this
.
playerInfo
.getBvcuPUID()
;
Log.
d
(
TAG
,
"
原始
iDir:"
+
playerInfo
.getBvcuiAVStreamDir())
;
Log.
d
(
TAG
,
"
输出的
iDir:"
+ iDir)
;
dialogInfo.
stParam
.
iAVStreamDir
= iDir
;
dialogInfo.
stControlParam
=
new
BVCU_DialogControlParam()
;
dialogInfo.
stControlParam
.
stRender
=
new
BVCU_DialogControlParam_Render()
;
dialogInfo.
stControlParam
.
stRender
.
hWnd
=
streamPlayerSurfaceHolder
.getSurface()
;
BVCU_Display_Param display_param =
new
BVCU_Display_Param()
;
display_param.
fMulZoom
=
0
;
display_param.
iAngle
=
0
;
if
(
nowPlayerSize
==
1
&& StringUtils.
equals
(
playerInfo
.getType()
,
"0"
) &&
phoneFullFlag
) {
display_param.
iAngle
=
90
;
}
dialogInfo.
stControlParam
.
stRender
.
stDisplayParam
= display_param
;
if
(dialogInfo.
stControlParam
==
null
) {
dialogInfo.
stControlParam
=
new
BVCU_DialogControlParam()
;
}
if
(dialogInfo.
stControlParam
.
stNetwork
==
null
) {
dialogInfo.
stControlParam
.
stNetwork
=
new
BVCU_DialogControlParam_Network()
;
}
dialogInfo.
stControlParam
.
stNetwork
.
iDelayMax
=
5000
;
dialogInfo.
stControlParam
.
stNetwork
.
iDelayMin
=
500
;
dialogInfo.
stControlParam
.
stNetwork
.
iDelayVsSmooth
=
3
;
int
videoToken = BVCU.
getSDK
().openDialog(dialogInfo)
;
this
.
playerInfo
.setBvcuVideoToken(videoToken)
;
BVCU.
getSDK
().controlDialog(videoToken
,
dialogInfo.
stControlParam
)
;
author:
Arthur
time:
2024-7-30 11:23
发个更新的库文件给你们再试试。
欢迎光临 mobile CCTV,mobile surveillance,police body worn cameras (http://bbs.besovideo.com:8067/)
Powered by Discuz! X3.2