[Android] VideoPlayerActivity: hack to fix lost overlay controls
Edward Wang
git at videolan.org
Mon Jul 7 02:55:43 CEST 2014
vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Sun Jul 6 20:29:48 2014 -0400| [bbb591bac8f5a196180fd71db14e88c8422f3e2a] | committer: Edward Wang
VideoPlayerActivity: hack to fix lost overlay controls
DVDs are not the only type of media that can contain titles and chapters.
But most other media only have one title (e.g. MKVs) unlike DVDs, so don't hide the overlay for normal files.
A better solution is a button to simply select the title/chapter desired and would work with both DVD and normal media.
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=bbb591bac8f5a196180fd71db14e88c8422f3e2a
---
.../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 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 5c3dac6..3ce87e1 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -2229,9 +2229,16 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {
private void updateNavStatus() {
mHasChapters = mLibVLC.getChapterCountForTitle(0) > 1;
- mIsNavMenu = mHasChapters && mLibVLC.getTitle() == 0;
+ mIsNavMenu = mHasChapters && mLibVLC.getTitle() == 0 && mLibVLC.getTitleCount() > 1;
+ /***
+ * HACK ALERT: assuming that any media with >1 titles is a DVD with menus
+ * Should be replaced with a more robust title/chapter selection popup
+ */
- Log.e(TAG, "UpdateNavStatus: " + mHasChapters + " " + mIsNavMenu);
+ Log.d(TAG,
+ "updateNavStatus: getChapterCountForTitle(0) = "
+ + mLibVLC.getChapterCountForTitle(0)
+ + ", getTitleCount() = " + mLibVLC.getTitleCount());
if (mIsNavMenu) {
/*
* Keep the overlay hidden in order to have touch events directly
More information about the Android
mailing list