docs/doc/reference/com/google/android/exoplayer2/upstream/DataSourceBitmapLoader.html
Package com.google.android.exoplayer2.upstream
All Implemented Interfaces:BitmapLoader
[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classDataSourceBitmapLoaderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[BitmapLoader](../util/BitmapLoader.html "interface in com.google.android.exoplayer2.util")
Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.
A BitmapLoader implementation that uses a DataSource to support fetching images from URIs.
Loading tasks are delegated to a ListeningExecutorService defined during construction. If no executor service is passed, all tasks are delegated to a single-thread executor service that is shared between instances of this class.
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| static Supplier<ListeningExecutorService> | DEFAULT_EXECUTOR_SERVICE |
Deprecated.
|
Constructors | Constructor | Description |
| --- | --- |
| DataSourceBitmapLoader(Context context) |
Deprecated.
Creates an instance that uses a DefaultHttpDataSource for image loading and delegates loading tasks to a Executors.newSingleThreadExecutor().
|
| DataSourceBitmapLoader(ListeningExecutorService listeningExecutorService, DataSource.Factory dataSourceFactory) |
Deprecated.
Creates an instance that delegates loading tasks to the ListeningExecutorService.
|
All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| ListenableFuture<Bitmap> | decodeBitmap(byte[] data) |
Deprecated.
Decodes an image from compressed binary data.
|
| ListenableFuture<Bitmap> | loadBitmap(Uri uri) |
Deprecated.
Loads an image from a Uri.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
loadBitmapFromMetadata
-
public static final[Supplier](https://guava.dev/releases/31.1-android/api/docs/com/google/common/base/Supplier.html?is-external=true "class or interface in com.google.common.base")<[ListeningExecutorService](https://guava.dev/releases/31.1-android/api/docs/com/google/common/util/concurrent/ListeningExecutorService.html?is-external=true "class or interface in com.google.common.util.concurrent")> DEFAULT_EXECUTOR_SERVICE
Deprecated.
-
public DataSourceBitmapLoader([Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context)
Deprecated.
Creates an instance that uses a DefaultHttpDataSource for image loading and delegates loading tasks to a Executors.newSingleThreadExecutor().
-
public DataSourceBitmapLoader([ListeningExecutorService](https://guava.dev/releases/31.1-android/api/docs/com/google/common/util/concurrent/ListeningExecutorService.html?is-external=true "class or interface in com.google.common.util.concurrent")listeningExecutorService,[DataSource.Factory](DataSource.Factory.html "interface in com.google.android.exoplayer2.upstream")dataSourceFactory)
Deprecated.
Creates an instance that delegates loading tasks to the ListeningExecutorService.
Parameters:listeningExecutorService - The ListeningExecutorService.dataSourceFactory - The DataSource.Factory that creates the DataSource used to load the image.
-
public[ListenableFuture](https://guava.dev/releases/31.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true "class or interface in com.google.common.util.concurrent")<[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html "class or interface in android.graphics")> decodeBitmap(byte[] data)
Deprecated.
Description copied from interface: BitmapLoader
Decodes an image from compressed binary data.
Specified by:decodeBitmap in interface BitmapLoader
-
public[ListenableFuture](https://guava.dev/releases/31.1-android/api/docs/com/google/common/util/concurrent/ListenableFuture.html?is-external=true "class or interface in com.google.common.util.concurrent")<[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html "class or interface in android.graphics")> loadBitmap([Uri](https://developer.android.com/reference/android/net/Uri.html?is-external=true "class or interface in android.net")uri)
Deprecated.
Loads an image from a Uri.
Specified by:loadBitmap in interface BitmapLoader