[Android] Set player properties nullable

Geoffrey Métais git at videolan.org
Fri Feb 2 10:10:25 CET 2018


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Feb  2 09:45:34 2018 +0100| [29b428adac5f2d237492923d76cb38d031cad7de] | committer: Geoffrey Métais

Set player properties nullable

> https://code.videolan.org/videolan/vlc-android/commit/29b428adac5f2d237492923d76cb38d031cad7de
---

 vlc-android/src/org/videolan/vlc/media/PlayerController.kt | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/media/PlayerController.kt b/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
index 6f1a9b7f7..ce71a0773 100644
--- a/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
+++ b/vlc-android/src/org/videolan/vlc/media/PlayerController.kt
@@ -36,7 +36,7 @@ class PlayerController : IVLCVout.Callback, MediaPlayer.EventListener {
     @Volatile var hasRenderer = false
         private set
 
-    fun getVout() = mediaplayer.vlcVout
+    fun getVout(): IVLCVout? = mediaplayer.vlcVout
 
     fun getMedia(): Media? = mediaplayer.media
 
@@ -106,15 +106,15 @@ class PlayerController : IVLCVout.Callback, MediaPlayer.EventListener {
 
     fun getVideoTracksCount() = if (mediaplayer.hasMedia()) mediaplayer.videoTracksCount else 0
 
-    fun getVideoTracks() = mediaplayer.videoTracks
+    fun getVideoTracks(): Array<out MediaPlayer.TrackDescription>? = mediaplayer.videoTracks
 
     fun getVideoTrack() = mediaplayer.videoTrack
 
-    fun getCurrentVideoTrack() = mediaplayer.currentVideoTrack
+    fun getCurrentVideoTrack(): Media.VideoTrack? = mediaplayer.currentVideoTrack
 
     fun getAudioTracksCount() = mediaplayer.audioTracksCount
 
-    fun getAudioTracks() = mediaplayer.audioTracks
+    fun getAudioTracks(): Array<out MediaPlayer.TrackDescription>? = mediaplayer.audioTracks
 
     fun getAudioTrack() = mediaplayer.audioTrack
 
@@ -134,7 +134,7 @@ class PlayerController : IVLCVout.Callback, MediaPlayer.EventListener {
 
     fun addSubtitleTrack(uri: Uri, select: Boolean) = mediaplayer.addSlave(Media.Slave.Type.Subtitle, uri, select)
 
-    fun getSpuTracks() = mediaplayer.spuTracks
+    fun getSpuTracks(): Array<out MediaPlayer.TrackDescription>? = mediaplayer.spuTracks
 
     fun getSpuTrack() = mediaplayer.spuTrack
 



More information about the Android mailing list