use of androidx.annotation.MainThread in project vlc-android by videolan.
the class MediaBrowser method browse.
/**
* Browse to the specified local path starting with '/'.
*
* @param path
* @param flags see {@link MediaBrowser.Flag}
*/
@MainThread
public void browse(String path, int flags) {
final IMedia media = mFactory.getFromLocalPath(mILibVlc, path);
browse(media, flags);
media.release();
}
use of androidx.annotation.MainThread in project vlc-android by videolan.
the class MediaBrowser method getMediaAt.
/**
* Get a media at a specified index. Should be released with {@link #release()}.
*/
@MainThread
public IMedia getMediaAt(int index) {
if (index < 0 || index >= getMediaCount())
throw new IndexOutOfBoundsException();
final IMedia media = mBrowserMediaList != null ? mBrowserMediaList.getMediaAt(index) : mDiscovererMediaArray.get(index);
media.retain();
return media;
}
Aggregations