Java Code Examples for org.videolan.libvlc.Media#subItems()
The following examples show how to use
org.videolan.libvlc.Media#subItems() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MediaBrowser.java From libvlc-android-sdk with GNU Lesser General Public License v2.1 | 6 votes |
/** * Browse to the specified media. * * @param media Can be a media returned by MediaBrowser. * @param flags see {@link Flag} */ @MainThread public void browse(Media media, int flags) { /* media can be associated with a medialist, * so increment ref count in order to don't clean it with the medialist */ media.retain(); media.addOption(IGNORE_LIST_OPTION + mIgnoreList); if ((flags & Flag.NoSlavesAutodetect) != 0) media.addOption(":no-sub-autodetect-file"); if ((flags & Flag.ShowHiddenFiles) != 0) media.addOption(":show-hiddenfiles"); int mediaFlags = Media.Parse.ParseNetwork; if ((flags & Flag.Interact) != 0) mediaFlags |= Media.Parse.DoInteract; reset(); mBrowserMediaList = media.subItems(); mBrowserMediaList.setEventListener(mBrowserMediaListEventListener, mHandler); media.parseAsync(mediaFlags, 0); mMedia = media; }
Example 2
Source File: MediaBrowser.java From OTTLivePlayer_vlc with MIT License | 6 votes |
/** * Browse to the specified media. * * @param media Can be a media returned by MediaBrowser. * @param flags see {@link MediaBrowser.Flag} */ @MainThread public void browse(Media media, int flags) { /* media can be associated with a medialist, * so increment ref count in order to don't clean it with the medialist */ media.retain(); media.addOption(IGNORE_LIST_OPTION + mIgnoreList); if ((flags & Flag.NoSlavesAutodetect) != 0) media.addOption(":no-sub-autodetect-file"); if ((flags & Flag.ShowHiddenFiles) != 0) media.addOption(":show-hiddenfiles"); int mediaFlags = Media.Parse.ParseNetwork; if ((flags & Flag.Interact) != 0) mediaFlags |= Media.Parse.DoInteract; reset(); mBrowserMediaList = media.subItems(); mBrowserMediaList.setEventListener(mBrowserMediaListEventListener, mHandler); media.parseAsync(mediaFlags, 0); mMedia = media; }
Example 3
Source File: MediaBrowser.java From OTTLivePlayer_vlc with MIT License | 6 votes |
/** * Browse to the specified media. * * @param media Can be a media returned by MediaBrowser. * @param flags see {@link MediaBrowser.Flag} */ @MainThread public void browse(Media media, int flags) { /* media can be associated with a medialist, * so increment ref count in order to don't clean it with the medialist */ media.retain(); media.addOption(IGNORE_LIST_OPTION + mIgnoreList); if ((flags & Flag.NoSlavesAutodetect) != 0) media.addOption(":no-sub-autodetect-file"); if ((flags & Flag.ShowHiddenFiles) != 0) media.addOption(":show-hiddenfiles"); int mediaFlags = Media.Parse.ParseNetwork; if ((flags & Flag.Interact) != 0) mediaFlags |= Media.Parse.DoInteract; reset(); mBrowserMediaList = media.subItems(); mBrowserMediaList.setEventListener(mBrowserMediaListEventListener, mHandler); media.parseAsync(mediaFlags, 0); mMedia = media; }
Example 4
Source File: MediaBrowser.java From vlc-example-streamplayer with GNU General Public License v3.0 | 6 votes |
/** * Browse to the specified media. * * @param media Can be a media returned by MediaBrowser. * @param flags see {@link Flag} */ @MainThread public void browse(Media media, int flags) { /* media can be associated with a medialist, * so increment ref count in order to don't clean it with the medialist */ media.retain(); media.addOption(IGNORE_LIST_OPTION + mIgnoreList); if ((flags & Flag.NoSlavesAutodetect) != 0) media.addOption(":no-sub-autodetect-file"); if ((flags & Flag.ShowHiddenFiles) != 0) media.addOption(":show-hiddenfiles"); int mediaFlags = Media.Parse.ParseNetwork; if ((flags & Flag.Interact) != 0) mediaFlags |= Media.Parse.DoInteract; reset(); mBrowserMediaList = media.subItems(); mBrowserMediaList.setEventListener(mBrowserMediaListEventListener, mHandler); media.parseAsync(mediaFlags, 0); mMedia = media; }
Example 5
Source File: MediaBrowser.java From libvlc-sdk-android with GNU General Public License v2.0 | 6 votes |
/** * Browse to the specified media. * * @param media Can be a media returned by MediaBrowser. * @param flags see {@link MediaBrowser.Flag} */ @MainThread public void browse(Media media, int flags) { /* media can be associated with a medialist, * so increment ref count in order to don't clean it with the medialist */ media.retain(); media.addOption(IGNORE_LIST_OPTION + mIgnoreList); if ((flags & Flag.NoSlavesAutodetect) != 0) media.addOption(":no-sub-autodetect-file"); if ((flags & Flag.ShowHiddenFiles) != 0) media.addOption(":show-hiddenfiles"); int mediaFlags = Media.Parse.ParseNetwork; if ((flags & Flag.Interact) != 0) mediaFlags |= Media.Parse.DoInteract; reset(); mBrowserMediaList = media.subItems(); mBrowserMediaList.setEventListener(mBrowserMediaListEventListener, mHandler); media.parseAsync(mediaFlags, 0); mMedia = media; }
Example 6
Source File: PlaybackService.java From VCL-Android with Apache License 2.0 | 6 votes |
/** * Expand the current media. * @return the index of the media was expanded, and -1 if no media was expanded */ @MainThread public int expand() { final Media media = mMediaPlayer.getMedia(); if (media == null) return -1; final MediaList ml = media.subItems(); media.release(); int ret; if (ml.getCount() > 0) { mMediaList.remove(mCurrentIndex); for (int i = ml.getCount() - 1; i >= 0; --i) { final Media child = ml.getMediaAt(i); child.parse(); mMediaList.insert(mCurrentIndex, new MediaWrapper(child)); child.release(); } ret = 0; } else { ret = -1; } ml.release(); return ret; }
Example 7
Source File: MediaBrowser.java From VCL-Android with Apache License 2.0 | 5 votes |
/** * Browse to the specified media. * * @param media Can be a media returned by MediaBrowser. */ public synchronized void browse(Media media) { /* media can be associated with a medialist, * so increment ref count in order to don't clean it with the medialist */ media.retain(); media.addOption(IGNORE_LIST_OPTION+mIgnoreList); reset(); mBrowserMediaList = media.subItems(); mBrowserMediaList.setEventListener(mBrowserMediaListEventListener); media.parseAsync(Media.Parse.ParseNetwork); mMedia = media; }
Example 8
Source File: MediaBrowser.java From Exoplayer_VLC with Apache License 2.0 | 5 votes |
/** * Browse to the specified media. * * @param media Can be a media returned by MediaBrowser. */ public synchronized void browse(Media media) { /* media can be associated with a medialist, * so increment ref count in order to don't clean it with the medialist */ media.retain(); reset(); mBrowserMediaList = media.subItems(); mBrowserMediaList.setEventListener(mBrowserMediaListEventListener); media.parseAsync(Media.Parse.ParseNetwork); mMedia = media; }