当前位置: 首页>>代码示例>>Java>>正文


Java Media.subItems方法代码示例

本文整理汇总了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;
}
 
开发者ID:pedroSG94,项目名称:vlc-example-streamplayer,代码行数:27,代码来源:MediaBrowser.java

示例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;
}
 
开发者ID:m-damavandi,项目名称:Android-VLC-Sample,代码行数:25,代码来源:MediaBrowser.java

示例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;
}
 
开发者ID:jiaZengShen,项目名称:vlc_android_win,代码行数:29,代码来源:PlaybackService.java

示例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;
}
 
开发者ID:hanhailong,项目名称:VCL-Android,代码行数:29,代码来源:PlaybackService.java

示例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;
}
 
开发者ID:PTCE,项目名称:popcorn-android,代码行数:18,代码来源:MediaBrowser.java

示例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;
}
 
开发者ID:tyazid,项目名称:Exoplayer_VLC,代码行数:17,代码来源:MediaBrowser.java


注:本文中的org.videolan.libvlc.Media.subItems方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。