Java Code Examples for org.videolan.libvlc.Media#retain()
The following examples show how to use
org.videolan.libvlc.Media#retain() .
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: MediaBrowser.java From libvlc-android-sdk with GNU Lesser General Public License v2.1 | 5 votes |
/** * Get a media at a specified index. Should be released with {@link #release()}. */ @MainThread public Media getMediaAt(int index) { if (index < 0 || index >= getMediaCount()) throw new IndexOutOfBoundsException(); final Media media = mBrowserMediaList != null ? mBrowserMediaList.getMediaAt(index) : mDiscovererMediaArray.get(index); media.retain(); return media; }
Example 7
Source File: MediaBrowser.java From OTTLivePlayer_vlc with MIT License | 5 votes |
/** * Get a media at a specified index. Should be released with {@link #release()}. */ @MainThread public Media getMediaAt(int index) { if (index < 0 || index >= getMediaCount()) throw new IndexOutOfBoundsException(); final Media media = mBrowserMediaList != null ? mBrowserMediaList.getMediaAt(index) : mDiscovererMediaArray.get(index); media.retain(); return media; }
Example 8
Source File: MediaBrowser.java From OTTLivePlayer_vlc with MIT License | 5 votes |
/** * Get a media at a specified index. Should be released with {@link #release()}. */ @MainThread public Media getMediaAt(int index) { if (index < 0 || index >= getMediaCount()) throw new IndexOutOfBoundsException(); final Media media = mBrowserMediaList != null ? mBrowserMediaList.getMediaAt(index) : mDiscovererMediaArray.get(index); media.retain(); return media; }
Example 9
Source File: MediaBrowser.java From vlc-example-streamplayer with GNU General Public License v3.0 | 5 votes |
/** * Get a media at a specified index. Should be released with {@link #release()}. */ @MainThread public Media getMediaAt(int index) { if (index < 0 || index >= getMediaCount()) throw new IndexOutOfBoundsException(); final Media media = mBrowserMediaList != null ? mBrowserMediaList.getMediaAt(index) : mDiscovererMediaArray.get(index); media.retain(); return media; }
Example 10
Source File: MediaBrowser.java From libvlc-sdk-android with GNU General Public License v2.0 | 5 votes |
/** * Get a media at a specified index. Should be released with {@link #release()}. */ @MainThread public Media getMediaAt(int index) { if (index < 0 || index >= getMediaCount()) throw new IndexOutOfBoundsException(); final Media media = mBrowserMediaList != null ? mBrowserMediaList.getMediaAt(index) : mDiscovererMediaArray.get(index); media.retain(); return media; }
Example 11
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 12
Source File: MediaBrowser.java From VCL-Android with Apache License 2.0 | 5 votes |
/** * Get a media at a specified index. Should be released with {@link #release()}. */ public synchronized Media getMediaAt(int index) { if (index < 0 || index >= getMediaCount()) throw new IndexOutOfBoundsException(); final Media media = mBrowserMediaList != null ? mBrowserMediaList.getMediaAt(index) : mDiscovererMediaArray.get(index); media.retain(); return media; }
Example 13
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; }