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


Java Media.retain方法代码示例

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

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

示例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;
}
 
开发者ID:PTCE,项目名称:popcorn-android,代码行数:12,代码来源: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.retain方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。