@@ -13,12 +13,17 @@ import com.example.ivdemo.adapter.UserListAdapter
1313import com.tencent.iot.twcall.R
1414import com.tencent.iot.twcall.databinding.ActivityTweCallBinding
1515import com.tencent.iot.video.device.VideoNativeInterface
16+ import com.tencent.iot.video.device.annotations.AudioEncType
1617import com.tencent.iot.video.device.annotations.CallType
1718import com.tencent.iot.video.device.annotations.PixelType
1819import com.tencent.iot.video.device.annotations.StreamType
20+ import com.tencent.iot.video.device.annotations.VideoEncType
1921import com.tencent.iot.video.device.annotations.VoipActivateType
22+ import com.tencent.iot.video.device.annotations.VoipRecvVFpsType
23+ import com.tencent.iot.video.device.annotations.VoipRecvVRotateType
2024import com.tencent.iot.video.device.callback.IvVoipCallback
2125import com.tencent.iot.video.device.model.AvDataInfo
26+ import com.tencent.iot.video.device.model.VoipVideoInfo
2227import com.tencent.iotvideo.link.CameraRecorder
2328import com.tencent.iotvideo.link.SimplePlayer
2429import com.tencent.iotvideo.link.entity.UserEntity
@@ -280,9 +285,17 @@ class TweCallActivity : BaseIPCActivity<ActivityTweCallBinding>(), IvVoipCallbac
280285 if (isVideo) QualitySetting .getInstance(this @TweCallActivity).isWxCameraOn else true
281286 val callType =
282287 if (isVideo) CallType .IV_CM_STREAM_TYPE_VIDEO else CallType .IV_CM_STREAM_TYPE_AUDIO
288+ val videoInfo = VoipVideoInfo (
289+ VideoEncType .IV_CM_VENC_TYPE_H264 ,
290+ VideoEncType .IV_CM_VENC_TYPE_H264 ,
291+ recvPixel,
292+ AudioEncType .IV_CM_AENC_TYPE_AAC ,
293+ VoipRecvVFpsType .VOIP_RECV_V_FPS_MAX ,
294+ VoipRecvVRotateType .VOIP_RECV_V_ROTATE_NONE
295+ )
283296 val res = VideoNativeInterface .getInstance().doWxCloudVoipCall(
284297 modelId, wxaAppId, openId, deviceId,
285- callType, recvPixel , true , calleeCameraSwitch
298+ callType, videoInfo , true , calleeCameraSwitch
286299 )
287300 val result = when (res) {
288301 - 2 -> " 通话中"
@@ -310,8 +323,16 @@ class TweCallActivity : BaseIPCActivity<ActivityTweCallBinding>(), IvVoipCallbac
310323 if (isVideo) QualitySetting .getInstance(this @TweCallActivity).isWxCameraOn else true
311324 val callType =
312325 if (isVideo) CallType .IV_CM_STREAM_TYPE_VIDEO else CallType .IV_CM_STREAM_TYPE_AUDIO
326+ val videoInfo = VoipVideoInfo (
327+ VideoEncType .IV_CM_VENC_TYPE_H264 ,
328+ VideoEncType .IV_CM_VENC_TYPE_H264 ,
329+ recvPixel,
330+ AudioEncType .IV_CM_AENC_TYPE_AAC ,
331+ VoipRecvVFpsType .VOIP_RECV_V_FPS_MAX ,
332+ VoipRecvVRotateType .VOIP_RECV_V_ROTATE_NONE
333+ )
313334 val res = VideoNativeInterface .getInstance()
314- .doWxCloudVoipCallV2(openId, callType, recvPixel , true , calleeCameraSwitch)
335+ .doWxCloudVoipCallV2(openId, callType, videoInfo , true , calleeCameraSwitch)
315336 val result = when (res) {
316337 - 2 -> " 通话中"
317338 0 -> " 呼叫成功"
0 commit comments