[Android] VideoPlayerActivity: detect projection from EsSelected events
Thomas Guillem
git at videolan.org
Mon Apr 3 14:29:47 CEST 2017
vlc-android | branch: master | Thomas Guillem <thomas at gllm.fr> | Fri Mar 31 11:56:44 2017 +0200| [6769b034a6bcc3c6bfed25a5dff613b527ee1b6e] | committer: Geoffrey Métais
VideoPlayerActivity: detect projection from EsSelected events
> https://code.videolan.org/videolan/vlc-android/commit/6769b034a6bcc3c6bfed25a5dff613b527ee1b6e
---
.../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 6c931bb..57bff79 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1626,6 +1626,13 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
}
invalidateESTracks(event.getEsChangedType());
break;
+ case MediaPlayer.Event.ESSelected:
+ if (event.getEsChangedType() == Media.VideoTrack.Type.Video) {
+ Media.VideoTrack vt = mService.getCurrentVideoTrack();
+ if (vt != null)
+ mFov = vt.projection == Media.VideoTrack.Projection.Rectangular ? 0f : DEFAULT_FOV;
+ }
+ break;
case MediaPlayer.Event.SeekableChanged:
updateSeekable(event.getSeekable());
break;
@@ -1778,10 +1785,6 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
final IVLCVout vlcVout = mService.getVLCVout();
if (vlcVout.areViewsAttached() && voutCount == 0) {
mHandler.postDelayed(mSwitchAudioRunnable, 4000);
- } else if (voutCount > 0) {
- Media.VideoTrack vt = mService.getCurrentVideoTrack();
- if (vt != null)
- mFov = vt.projection == Media.VideoTrack.Projection.Rectangular ? 0f : DEFAULT_FOV;
}
}
More information about the Android
mailing list