@@ -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