本文整理汇总了Java中org.videolan.libvlc.Media.subItems方法的典型用法代码示例。如果您正苦于以下问题:Java Media.subItems方法的具体用法?Java Media.subItems怎么用?Java Media.subItems使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.videolan.libvlc.Media
的用法示例。
在下文中一共展示了Media.subItems方法的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: expand
import org.videolan.libvlc.Media; //导入方法依赖的package包/类
/**
* 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 = 0; i < ml.getCount(); ++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;
}
示例4: expand
import org.videolan.libvlc.Media; //导入方法依赖的package包/类
/**
* 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;
}
示例5: 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;
}
示例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;
}