[Android] Benchmark: fix hardware decoding
Duncan McNamara
git at videolan.org
Thu Oct 1 10:03:29 CEST 2020
vlc-android | branch: master | Duncan McNamara <dcn.mcnamara at gmail.com> | Wed Sep 30 10:24:35 2020 +0200| [b4c108937abc1a1f8335b69222dc0b5e14d00c21] | committer: Duncan McNamara
Benchmark: fix hardware decoding
There was a change with the player restart which is needed when forcing
android-surface vout instead of gles2. This meant that the playlist
manager was restarted instead of the video player. This adds a separate
restart for the playlist manager
> https://code.videolan.org/videolan/vlc-android/commit/b4c108937abc1a1f8335b69222dc0b5e14d00c21
---
application/vlc-android/src/org/videolan/vlc/PlaybackService.kt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt b/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
index bf609a006..80df233e9 100644
--- a/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
+++ b/application/vlc-android/src/org/videolan/vlc/PlaybackService.kt
@@ -41,7 +41,6 @@ import androidx.annotation.MainThread
import androidx.annotation.RequiresApi
import androidx.core.app.NotificationManagerCompat
import androidx.core.app.ServiceCompat
-import androidx.core.content.ContextCompat
import androidx.core.content.getSystemService
import androidx.core.os.bundleOf
import androidx.lifecycle.Lifecycle
@@ -497,7 +496,7 @@ class PlaybackService : MediaBrowserServiceCompat(), LifecycleOwner {
keyguardManager = getSystemService()!!
renderer.observe(this, Observer { setRenderer(it) })
- restartPlayer.observe(this, Observer { restartMediaPlayer() })
+ restartPlayer.observe(this, Observer { restartPlaylistManager() })
headSetDetection.observe(this, Observer { detectHeadset(it) })
equalizer.observe(this, Observer { setEqualizer(it) })
serviceFlow.value = this
@@ -1034,7 +1033,8 @@ class PlaybackService : MediaBrowserServiceCompat(), LifecycleOwner {
@MainThread
fun removeCallback(cb: Callback) = cbActor.safeOffer(CbRemove(cb))
- fun restartMediaPlayer() = playlistManager.restart()
+ private fun restartPlaylistManager() = playlistManager.restart()
+ fun restartMediaPlayer() = playlistManager.player.restart()
fun saveMediaMeta() = playlistManager.saveMediaMeta()
More information about the Android
mailing list