Search in sources :

Example 1 with BitmapCache

use of org.videolan.vlc.gui.helpers.BitmapCache in project vlc-android by GeoffreyMetais.

the class ThumbnailsProvider method getComposedImage.

@WorkerThread
public static Bitmap getComposedImage(MediaGroup group) {
    final BitmapCache bmc = BitmapCache.getInstance();
    final String key = "group:" + group.getTitle();
    Bitmap composedImage = bmc.getBitmapFromMemCache(key);
    if (composedImage == null) {
        composedImage = composeImage(group);
        if (composedImage != null)
            bmc.addBitmapToMemCache(key, composedImage);
    }
    return composedImage;
}
Also used : AudioUtil.readCoverBitmap(org.videolan.vlc.gui.helpers.AudioUtil.readCoverBitmap) Bitmap(android.graphics.Bitmap) BitmapCache(org.videolan.vlc.gui.helpers.BitmapCache) WorkerThread(android.support.annotation.WorkerThread)

Example 2 with BitmapCache

use of org.videolan.vlc.gui.helpers.BitmapCache in project vlc-android by videolan.

the class ThumbnailsProvider method getComposedImage.

@WorkerThread
public static Bitmap getComposedImage(MediaGroup group) {
    final BitmapCache bmc = BitmapCache.getInstance();
    final String key = "group:" + group.getTitle();
    Bitmap composedImage = bmc.getBitmapFromMemCache(key);
    if (composedImage == null) {
        composedImage = composeImage(group);
        if (composedImage != null)
            bmc.addBitmapToMemCache(key, composedImage);
    }
    return composedImage;
}
Also used : AudioUtil.readCoverBitmap(org.videolan.vlc.gui.helpers.AudioUtil.readCoverBitmap) Bitmap(android.graphics.Bitmap) BitmapCache(org.videolan.vlc.gui.helpers.BitmapCache) WorkerThread(android.support.annotation.WorkerThread)

Aggregations

Bitmap (android.graphics.Bitmap)2 WorkerThread (android.support.annotation.WorkerThread)2 AudioUtil.readCoverBitmap (org.videolan.vlc.gui.helpers.AudioUtil.readCoverBitmap)2 BitmapCache (org.videolan.vlc.gui.helpers.BitmapCache)2