Search in sources :

Example 26 with MainThread

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();
}
Also used : IMedia(org.videolan.libvlc.interfaces.IMedia) MainThread(androidx.annotation.MainThread)

Example 27 with MainThread

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;
}
Also used : IMedia(org.videolan.libvlc.interfaces.IMedia) MainThread(androidx.annotation.MainThread)

Aggregations

MainThread (androidx.annotation.MainThread)27 Animator (android.animation.Animator)4 NonNull (androidx.annotation.NonNull)3 IMedia (org.videolan.libvlc.interfaces.IMedia)3 Uri (android.net.Uri)2 ArrayMap (android.util.ArrayMap)2 AlphaAnimation (android.view.animation.AlphaAnimation)2 Animation (android.view.animation.Animation)2 AnimationSet (android.view.animation.AnimationSet)2 OvershootInterpolator (android.view.animation.OvershootInterpolator)2 TranslateAnimation (android.view.animation.TranslateAnimation)2 TextView (android.widget.TextView)2 RequiresApi (androidx.annotation.RequiresApi)2 AlertDialog (androidx.appcompat.app.AlertDialog)2 DefaultLifecycleObserver (androidx.lifecycle.DefaultLifecycleObserver)2 LifecycleOwner (androidx.lifecycle.LifecycleOwner)2 ProcessLifecycleOwner (androidx.lifecycle.ProcessLifecycleOwner)2 MediaItem (com.google.android.exoplayer2.MediaItem)2 AnimationCompleteListener (org.thoughtcrime.securesms.animation.AnimationCompleteListener)2 CallParticipant (org.thoughtcrime.securesms.events.CallParticipant)2