[Android] Get 360° videos zoom more linear
Geoffrey Métais
git at videolan.org
Wed Mar 22 11:32:59 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Mar 22 11:32:33 2017 +0100| [08c2b0faf4908ab53ee514b5e278ce97ea17529a] | committer: Geoffrey Métais
Get 360° videos zoom more linear
> https://code.videolan.org/videolan/vlc-android/commit/08c2b0faf4908ab53ee514b5e278ce97ea17529a
---
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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 cf2e38e..46b565c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -168,6 +168,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
public final static int RESULT_PLAYBACK_ERROR = RESULT_FIRST_USER + 2;
public final static int RESULT_HARDWARE_ACCELERATION_ERROR = RESULT_FIRST_USER + 3;
public final static int RESULT_VIDEO_TRACK_LOST = RESULT_FIRST_USER + 4;
+ private static final float DEFAULT_FOV = 80f;
private final PlaybackServiceActivity.Helper mHelper = new PlaybackServiceActivity.Helper(this, this);
protected PlaybackService mService;
@@ -2454,7 +2455,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
}
@Override
public boolean onScale(ScaleGestureDetector detector) {
- float fov_changed = mFov * (detector.getPreviousSpan()-detector.getCurrentSpan())/(float)mSurfaceXDisplayRange;
+ float fov_changed = DEFAULT_FOV * (detector.getPreviousSpan()-detector.getCurrentSpan())/(float)mSurfaceXDisplayRange;
if (mService.updateViewpoint(0, 0, 0, fov_changed, false)) {
mFov += fov_changed;
return true;
More information about the Android
mailing list