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.ABitmapLoaderimplementation that uses aDataSourceto support fetching images from URIs.Loading tasks are delegated to a
ListeningExecutorServicedefined 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_SERVICEDeprecated.
-
Constructor Summary
Constructors Constructor Description DataSourceBitmapLoader(Context context)Deprecated.Creates an instance that uses aDefaultHttpDataSourcefor 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 aDefaultHttpDataSourcefor 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.Factorythat creates theDataSourceused to load the image.
-
-
Method Detail
-
decodeBitmap
public ListenableFuture<Bitmap> decodeBitmap(byte[] data)
Deprecated.Description copied from interface:BitmapLoaderDecodes an image from compressed binary data.- Specified by:
decodeBitmapin interfaceBitmapLoader
-
loadBitmap
public ListenableFuture<Bitmap> loadBitmap(Uri uri)
Deprecated.Loads an image from aUri.- Specified by:
loadBitmapin interfaceBitmapLoader
-
-