Class DataSourceBitmapLoader
- java.lang.Object
-
- com.google.android.exoplayer2.upstream.DataSourceBitmapLoader
-
- All Implemented Interfaces:
BitmapLoader
@Deprecated public final class DataSourceBitmapLoader extends Object implements BitmapLoader
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.ABitmapLoader
implementation that uses aDataSource
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.
-
-
Field Summary
Fields Modifier and Type Field Description static Supplier<ListeningExecutorService>
DEFAULT_EXECUTOR_SERVICE
Deprecated.
-
Constructor Summary
Constructors Constructor Description DataSourceBitmapLoader(Context context)
Deprecated.Creates an instance that uses aDefaultHttpDataSource
for image loading and delegates loading tasks to aExecutors.newSingleThreadExecutor()
.DataSourceBitmapLoader(ListeningExecutorService listeningExecutorService, DataSource.Factory dataSourceFactory)
Deprecated.Creates an instance that delegates loading tasks to theListeningExecutorService
.
-
Method Summary
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 aUri
.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.google.android.exoplayer2.util.BitmapLoader
loadBitmapFromMetadata
-
-
-
-
Field Detail
-
DEFAULT_EXECUTOR_SERVICE
public static final Supplier<ListeningExecutorService> DEFAULT_EXECUTOR_SERVICE
Deprecated.
-
-
Constructor Detail
-
DataSourceBitmapLoader
public DataSourceBitmapLoader(Context context)
Deprecated.Creates an instance that uses aDefaultHttpDataSource
for image loading and delegates loading tasks to aExecutors.newSingleThreadExecutor()
.
-
DataSourceBitmapLoader
public DataSourceBitmapLoader(ListeningExecutorService listeningExecutorService, DataSource.Factory dataSourceFactory)
Deprecated.Creates an instance that delegates loading tasks to theListeningExecutorService
.- Parameters:
listeningExecutorService
- TheListeningExecutorService
.dataSourceFactory
- TheDataSource.Factory
that creates theDataSource
used to load the image.
-
-
Method Detail
-
decodeBitmap
public ListenableFuture<Bitmap> decodeBitmap(byte[] data)
Deprecated.Description copied from interface:BitmapLoader
Decodes an image from compressed binary data.- Specified by:
decodeBitmap
in interfaceBitmapLoader
-
loadBitmap
public ListenableFuture<Bitmap> loadBitmap(Uri uri)
Deprecated.Loads an image from aUri
.- Specified by:
loadBitmap
in interfaceBitmapLoader
-
-