[Android] VideoPlayerActivity: hack to fix lost overlay controls
Felix Abecassis
felix.abecassis at gmail.com
Mon Jul 7 12:07:56 CEST 2014
2014-07-07 2:57 GMT+02:00 Edward Wang <git at videolan.org>:
> vlc-ports/android | branch: master | Edward Wang <
> edward.c.wang at compdigitec.com> | Sun Jul 6 20:29:48 2014 -0400|
> [f32afe5e1d76b4d3ba9c0acddafb81b7221eb05d] | 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=f32afe5e1d76b4d3ba9c0acddafb81b7221eb05d
> ---
>
> .../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..1d97343 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: assume that any media with >1 titles = DVD with
> menus
> + * Should be replaced with a more robust title/chapter selection
> popup
> + */
>
Do you want to add a new selection list (like subtitles/audio) with the
following layout?
* Title 0:
- Chapter 0
- Chapter 1
* Title 1:
- Chapter 0
- Chapter 1
- Chapter 2
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.
>
> - 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
>
> _______________________________________________
> Android mailing list
> Android at videolan.org
> https://mailman.videolan.org/listinfo/android
>
--
Félix Abecassis
http://felix.abecassis.me
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/android/attachments/20140707/723675cb/attachment.html>
More information about the Android
mailing list