parent
ecd8a33f01
commit
5dd377fb7b
@ -24,10 +24,6 @@
|
||||
* Extractors:
|
||||
* Allow `Mp4Extractor` to identify H264 samples that are not used as
|
||||
reference by subsequent samples.
|
||||
* DataSource:
|
||||
* Update `HttpEngineDataSource` to allow use starting at version S
|
||||
extension 7 instead of API level 34
|
||||
([#1262](https://github.com/androidx/media/issues/1262)).
|
||||
* Audio:
|
||||
* Video:
|
||||
* Text:
|
||||
|
@ -38,7 +38,8 @@ project.ext {
|
||||
errorProneVersion = '2.18.0'
|
||||
jsr305Version = '3.0.2'
|
||||
kotlinAnnotationsVersion = '1.9.0'
|
||||
androidxAnnotationVersion = '1.6.0'
|
||||
// Updating this to 1.4.0+ will import Kotlin stdlib [internal ref: b/277891049].
|
||||
androidxAnnotationVersion = '1.3.0'
|
||||
androidxAnnotationExperimentalVersion = '1.3.1'
|
||||
androidxAppCompatVersion = '1.6.1'
|
||||
androidxCollectionVersion = '1.2.0'
|
||||
|
@ -18,7 +18,6 @@ package androidx.media3.demo.main;
|
||||
import android.content.Context;
|
||||
import android.net.http.HttpEngine;
|
||||
import android.os.Build;
|
||||
import android.os.ext.SdkExtensions;
|
||||
import androidx.annotation.OptIn;
|
||||
import androidx.media3.database.DatabaseProvider;
|
||||
import androidx.media3.database.StandaloneDatabaseProvider;
|
||||
@ -107,8 +106,7 @@ public final class DemoUtil {
|
||||
return httpDataSourceFactory;
|
||||
}
|
||||
context = context.getApplicationContext();
|
||||
if (Build.VERSION.SDK_INT >= 30
|
||||
&& SdkExtensions.getExtensionVersion(Build.VERSION_CODES.S) >= 7) {
|
||||
if (Build.VERSION.SDK_INT >= 34) {
|
||||
HttpEngine httpEngine = new HttpEngine.Builder(context).build();
|
||||
httpDataSourceFactory =
|
||||
new HttpEngineDataSource.Factory(httpEngine, Executors.newSingleThreadExecutor());
|
||||
|
@ -19,13 +19,12 @@ import static java.lang.Math.min;
|
||||
|
||||
import android.net.http.UploadDataProvider;
|
||||
import android.net.http.UploadDataSink;
|
||||
import android.os.Build;
|
||||
import androidx.annotation.RequiresExtension;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
|
||||
/** A {@link UploadDataProvider} implementation that provides data from a {@code byte[]}. */
|
||||
@RequiresExtension(extension = Build.VERSION_CODES.S, version = 7)
|
||||
@RequiresApi(34)
|
||||
/* package */ final class ByteArrayUploadDataProvider extends UploadDataProvider {
|
||||
|
||||
private final byte[] data;
|
||||
|
@ -26,10 +26,9 @@ import android.net.http.NetworkException;
|
||||
import android.net.http.UrlRequest;
|
||||
import android.net.http.UrlRequest.Status;
|
||||
import android.net.http.UrlResponseInfo;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.RequiresExtension;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.media3.common.C;
|
||||
import androidx.media3.common.PlaybackException;
|
||||
@ -66,7 +65,7 @@ import java.util.concurrent.Executor;
|
||||
* priority) the {@code dataSpec}, {@link #setRequestProperty} and the default parameters used to
|
||||
* construct the instance.
|
||||
*/
|
||||
@RequiresExtension(extension = Build.VERSION_CODES.S, version = 7)
|
||||
@RequiresApi(34)
|
||||
@UnstableApi
|
||||
public final class HttpEngineDataSource extends BaseDataSource implements HttpDataSource {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user