<div dir="ltr"><br><div class="gmail_extra">2014-07-07 2:57 GMT+02:00 Edward Wang <span dir="ltr"><<a href="mailto:git@videolan.org" target="_blank">git@videolan.org</a>></span>:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

vlc-ports/android | branch: master | Edward Wang <<a href="mailto:edward.c.wang@compdigitec.com">edward.c.wang@compdigitec.com</a>> | Sun Jul  6 20:29:48 2014 -0400| [f32afe5e1d76b4d3ba9c0acddafb81b7221eb05d] | committer: Edward Wang<br>


<div class=""><br>
VideoPlayerActivity: hack to fix lost overlay controls<br>
<br>
DVDs are not the only type of media that can contain titles and chapters.<br>
<br>
But most other media only have one title (e.g. MKVs) unlike DVDs, so don't hide the overlay for normal files.<br>
<br>
A better solution is a button to simply select the title/chapter desired and would work with both DVD and normal media.<br>
<br>
</div>> <a href="http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=f32afe5e1d76b4d3ba9c0acddafb81b7221eb05d" target="_blank">http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=f32afe5e1d76b4d3ba9c0acddafb81b7221eb05d</a><br>


<div class="">---<br>
<br>
 .../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java |   11 +++++++++--<br>
 1 file changed, 9 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java<br>
</div>index 5c3dac6..1d97343 100644<br>
<div class="">--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java<br>
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java<br>
@@ -2229,9 +2229,16 @@ public class VideoPlayerActivity extends Activity implements IVideoPlayer {<br>
<br>
     private void updateNavStatus() {<br>
         mHasChapters = mLibVLC.getChapterCountForTitle(0) > 1;<br>
-        mIsNavMenu = mHasChapters && mLibVLC.getTitle() == 0;<br>
+        mIsNavMenu = mHasChapters && mLibVLC.getTitle() == 0 && mLibVLC.getTitleCount() > 1;<br>
+        /***<br>
</div>+         * HACK ALERT: assume that any media with >1 titles = DVD with menus<br>
<div class="HOEnZb"><div class="h5">+         * Should be replaced with a more robust title/chapter selection popup<br>
+         */<br></div></div></blockquote><div><br></div><div>Do you want to add a new selection list (like subtitles/audio) with the following layout?<br></div><div>* Title 0:<br></div><div>  - Chapter 0<br></div><div>  - Chapter 1<br>

</div><div>* Title 1:<br></div><div>  - Chapter 0<br></div><div>  - Chapter 1<br></div><div>  - Chapter 2<br></div><div>Some samples have dozens of chapters on some titles, the list would be too long imo. We should only list the titles and maybe have a separate list for chapters (but I'm not convinced we need this list in the first place). Having a list of titles might be confusing though, many titles seems to be unnamed.<br>

<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
<br>
-        Log.e(TAG, "UpdateNavStatus: " + mHasChapters + " " + mIsNavMenu);<br>
+        Log.d(TAG,<br>
+                "updateNavStatus: getChapterCountForTitle(0) = "<br>
+                        + mLibVLC.getChapterCountForTitle(0)<br>
+                        + ", getTitleCount() = " + mLibVLC.getTitleCount());<br>
         if (mIsNavMenu) {<br>
             /*<br>
              * Keep the overlay hidden in order to have touch events directly<br>
<br>
_______________________________________________<br>
Android mailing list<br>
<a href="mailto:Android@videolan.org">Android@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/android" target="_blank">https://mailman.videolan.org/listinfo/android</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Félix Abecassis<div><a href="http://felix.abecassis.me" target="_blank">http://felix.abecassis.me</a></div>
</div></div>