本文整理汇总了Java中org.videolan.libvlc.Media.retain方法的典型用法代码示例。如果您正苦于以下问题:Java Media.retain方法的具体用法?Java Media.retain怎么用?Java Media.retain使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.videolan.libvlc.Media
的用法示例。
在下文中一共展示了Media.retain方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: browse
import org.videolan.libvlc.Media; //导入方法依赖的package包/类
/**
* 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;
}
示例2: browse
import org.videolan.libvlc.Media; //导入方法依赖的package包/类
/**
* 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");
int mediaFlags = Media.Parse.ParseNetwork;
if ((flags & Flag.Interact) != 0)
mediaFlags |= Media.Parse.DoInteract;
reset();
mBrowserMediaList = media.subItems();
mBrowserMediaList.setEventListener(mBrowserMediaListEventListener);
media.parseAsync(mediaFlags, 0);
mMedia = media;
}
示例3: getMediaAt
import org.videolan.libvlc.Media; //导入方法依赖的package包/类
/**
* 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;
}
示例4: browse
import org.videolan.libvlc.Media; //导入方法依赖的package包/类
/**
* 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;
}
示例5: getMediaAt
import org.videolan.libvlc.Media; //导入方法依赖的package包/类
/**
* 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;
}
示例6: browse
import org.videolan.libvlc.Media; //导入方法依赖的package包/类
/**
* 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;
}