拿掉LOG
This commit is contained in:
parent
fdb88fc47a
commit
4a8fb55fc8
@ -94,8 +94,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun reloadVideoViews(list: List<List<Device>>?) = MainScope().launch {
|
private fun reloadVideoViews(list: List<List<Device>>?) {
|
||||||
val oldListCount = videoPageList.size
|
|
||||||
for (videoPage in videoPageList) {
|
for (videoPage in videoPageList) {
|
||||||
supportFragmentManager.commit {
|
supportFragmentManager.commit {
|
||||||
remove(videoPage)
|
remove(videoPage)
|
||||||
@ -104,9 +103,6 @@ class MainActivity : AppCompatActivity() {
|
|||||||
binding.viewPager.removeAllViews()
|
binding.viewPager.removeAllViews()
|
||||||
videoPageList.clear()
|
videoPageList.clear()
|
||||||
|
|
||||||
if (oldListCount > 0) {
|
|
||||||
delay(500L)
|
|
||||||
}
|
|
||||||
// 如果群組內沒有裝置,則顯示底圖
|
// 如果群組內沒有裝置,則顯示底圖
|
||||||
if (list.isNullOrEmpty()) {
|
if (list.isNullOrEmpty()) {
|
||||||
binding.viewPager.setBackgroundResource(R.drawable.bg_not_in_playing)
|
binding.viewPager.setBackgroundResource(R.drawable.bg_not_in_playing)
|
||||||
|
|||||||
@ -142,12 +142,12 @@ class GstLibrary(context: Context) : Closeable, SurfaceHolder.Callback, TextureV
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun surfaceChanged(holder: SurfaceHolder, format: Int, width: Int, height: Int) {
|
override fun surfaceChanged(holder: SurfaceHolder, format: Int, width: Int, height: Int) {
|
||||||
Log.d("$TAG+$tag", String.format("Surface changed, format: %d, width: %d, height: %d", format, width, height))
|
//Log.d("$TAG+$tag", String.format("Surface changed, format: %d, width: %d, height: %d", format, width, height))
|
||||||
/*setSurfaceHolder(holder);*/
|
/*setSurfaceHolder(holder);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun surfaceDestroyed(holder: SurfaceHolder) {
|
override fun surfaceDestroyed(holder: SurfaceHolder) {
|
||||||
Log.d("$TAG+$tag", "Surface destroyed")
|
//Log.d("$TAG+$tag", "Surface destroyed")
|
||||||
this.isInit = false
|
this.isInit = false
|
||||||
this.surface = null
|
this.surface = null
|
||||||
releaseSurface()
|
releaseSurface()
|
||||||
@ -156,22 +156,22 @@ class GstLibrary(context: Context) : Closeable, SurfaceHolder.Callback, TextureV
|
|||||||
override fun onSurfaceTextureAvailable(surface: SurfaceTexture, width: Int, height: Int) {
|
override fun onSurfaceTextureAvailable(surface: SurfaceTexture, width: Int, height: Int) {
|
||||||
this.surface = Surface(surface)
|
this.surface = Surface(surface)
|
||||||
this.surface?.let { nativeSurfaceInit(it) }
|
this.surface?.let { nativeSurfaceInit(it) }
|
||||||
Log.d("$TAG+$tag", "Surface onSurfaceTextureAvailable: $surface")
|
//Log.d("$TAG+$tag", "Surface onSurfaceTextureAvailable: $surface")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSurfaceTextureSizeChanged(surface: SurfaceTexture, width: Int, height: Int) {
|
override fun onSurfaceTextureSizeChanged(surface: SurfaceTexture, width: Int, height: Int) {
|
||||||
Log.d("$TAG+$tag", "Surface onSurfaceTextureSizeChanged: $surface")
|
//Log.d("$TAG+$tag", "Surface onSurfaceTextureSizeChanged: $surface")
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSurfaceTextureDestroyed(surface: SurfaceTexture): Boolean {
|
override fun onSurfaceTextureDestroyed(surface: SurfaceTexture): Boolean {
|
||||||
Log.d("$TAG+$tag", "Surface onSurfaceTextureDestroyed: $surface")
|
//Log.d("$TAG+$tag", "Surface onSurfaceTextureDestroyed: $surface")
|
||||||
this.isInit = false
|
this.isInit = false
|
||||||
this.surface = null
|
this.surface = null
|
||||||
return isInit
|
return isInit
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSurfaceTextureUpdated(surface: SurfaceTexture) {
|
override fun onSurfaceTextureUpdated(surface: SurfaceTexture) {
|
||||||
Log.d("$TAG+$tag", "Surface onSurfaceTextureUpdated: $surface")
|
//Log.d("$TAG+$tag", "Surface onSurfaceTextureUpdated: $surface")
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user