Skip to content

Commit 8e0f48e

Browse files
committed
升级 sdk
1 parent a63001b commit 8e0f48e

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,5 @@ dependencies {
7979
implementation libs.androidx.core.ktx
8080
implementation libs.kotlinx.coroutines.android
8181
implementation libs.gson
82-
implementation 'com.tencent.iot.video:video-device-android:1.0.8'
82+
implementation 'com.tencent.iot.video:video-device-android:1.0.9.01-SNAPSHOT'
8383
}

app/src/main/java/com/example/ivdemo/TweCallActivity.kt

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,17 @@ import com.example.ivdemo.adapter.UserListAdapter
1313
import com.tencent.iot.twcall.R
1414
import com.tencent.iot.twcall.databinding.ActivityTweCallBinding
1515
import com.tencent.iot.video.device.VideoNativeInterface
16+
import com.tencent.iot.video.device.annotations.AudioEncType
1617
import com.tencent.iot.video.device.annotations.CallType
1718
import com.tencent.iot.video.device.annotations.PixelType
1819
import com.tencent.iot.video.device.annotations.StreamType
20+
import com.tencent.iot.video.device.annotations.VideoEncType
1921
import 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
2024
import com.tencent.iot.video.device.callback.IvVoipCallback
2125
import com.tencent.iot.video.device.model.AvDataInfo
26+
import com.tencent.iot.video.device.model.VoipVideoInfo
2227
import com.tencent.iotvideo.link.CameraRecorder
2328
import com.tencent.iotvideo.link.SimplePlayer
2429
import 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

Comments
 (0)