Skip to content

Commit 5ff590c

Browse files
committed
修改video直连的tag
1 parent 9c2eccc commit 5ff590c

File tree

2 files changed

+121
-86
lines changed

2 files changed

+121
-86
lines changed

sdkdemo/src/main/java/com/tencent/iot/explorer/link/demo/video/preview/VideoPreviewActivity.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ class VideoPreviewActivity : VideoPreviewBaseActivity(), EventView,
248248
}
249249

250250
override fun onSurfaceTextureAvailable(surface: SurfaceTexture?, width: Int, height: Int) {
251+
Log.d(tag,"onSurfaceTextureAvailable")
251252
surface?.let {
252253
this.surface = Surface(surface)
253254
player.setSurface(this.surface)
@@ -547,6 +548,7 @@ class VideoPreviewActivity : VideoPreviewBaseActivity(), EventView,
547548
}
548549

549550
override fun onSurfaceTextureSizeChanged(surface: SurfaceTexture?, width: Int, height: Int) {
551+
Log.d(tag,"onSurfaceTextureSizeChanged")
550552
val layoutParams = v_preview.layoutParams
551553
if (orientationV) {
552554
layoutParams.width = (player.videoWidth * (screenWidth * 16 / 9)) / player.videoHeight
@@ -559,6 +561,7 @@ class VideoPreviewActivity : VideoPreviewBaseActivity(), EventView,
559561
}
560562

561563
override fun onSurfaceTextureDestroyed(surface: SurfaceTexture?): Boolean {
564+
Log.d(tag,"onSurfaceTextureDestroyed")
562565
return false
563566
}
564567

@@ -645,6 +648,7 @@ class VideoPreviewActivity : VideoPreviewBaseActivity(), EventView,
645648
CommonUtils.refreshVideoList(this@VideoPreviewActivity, filePath)
646649
}
647650
player.release()
651+
surface.release()
648652
}
649653

650654
override fun onDestroy() {

0 commit comments

Comments
 (0)