mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Remove unused field in MediaCodecAdapter
The field is always 0 as the only publicly accessible creator methods set it to zero in all cases. PiperOrigin-RevId: 652858810
This commit is contained in:
parent
f68cf30791
commit
b4975a1b49
@ -26,6 +26,8 @@
|
|||||||
* Add `BasePreloadManager.Listener` to propagate preload events to apps.
|
* Add `BasePreloadManager.Listener` to propagate preload events to apps.
|
||||||
* Allow changing SNTP client timeout
|
* Allow changing SNTP client timeout
|
||||||
([#1540](https://github.com/androidx/media/issues/1540)).
|
([#1540](https://github.com/androidx/media/issues/1540)).
|
||||||
|
* Remove `MediaCodecAdapter.Configuration.flags` as the field was always
|
||||||
|
zero.
|
||||||
* Transformer:
|
* Transformer:
|
||||||
* Add `SurfaceAssetLoader`, which supports queueing video data to
|
* Add `SurfaceAssetLoader`, which supports queueing video data to
|
||||||
Transformer via a `Surface`.
|
Transformer via a `Surface`.
|
||||||
|
@ -103,7 +103,7 @@ import java.nio.ByteBuffer;
|
|||||||
try {
|
try {
|
||||||
TraceUtil.beginSection("createCodec:" + codecName);
|
TraceUtil.beginSection("createCodec:" + codecName);
|
||||||
codec = MediaCodec.createByCodecName(codecName);
|
codec = MediaCodec.createByCodecName(codecName);
|
||||||
int flags = configuration.flags;
|
int flags = 0;
|
||||||
MediaCodecBufferEnqueuer bufferEnqueuer;
|
MediaCodecBufferEnqueuer bufferEnqueuer;
|
||||||
if (enableSynchronousBufferQueueingWithAsyncCryptoFlag
|
if (enableSynchronousBufferQueueingWithAsyncCryptoFlag
|
||||||
&& useSynchronousBufferQueueingWithAsyncCryptoFlag(configuration.format)) {
|
&& useSynchronousBufferQueueingWithAsyncCryptoFlag(configuration.format)) {
|
||||||
|
@ -57,8 +57,7 @@ public interface MediaCodecAdapter {
|
|||||||
MediaFormat mediaFormat,
|
MediaFormat mediaFormat,
|
||||||
Format format,
|
Format format,
|
||||||
@Nullable MediaCrypto crypto) {
|
@Nullable MediaCrypto crypto) {
|
||||||
return new Configuration(
|
return new Configuration(codecInfo, mediaFormat, format, /* surface= */ null, crypto);
|
||||||
codecInfo, mediaFormat, format, /* surface= */ null, crypto, /* flags= */ 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -77,7 +76,7 @@ public interface MediaCodecAdapter {
|
|||||||
Format format,
|
Format format,
|
||||||
@Nullable Surface surface,
|
@Nullable Surface surface,
|
||||||
@Nullable MediaCrypto crypto) {
|
@Nullable MediaCrypto crypto) {
|
||||||
return new Configuration(codecInfo, mediaFormat, format, surface, crypto, /* flags= */ 0);
|
return new Configuration(codecInfo, mediaFormat, format, surface, crypto);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Information about the {@link MediaCodec} being configured. */
|
/** Information about the {@link MediaCodec} being configured. */
|
||||||
@ -99,22 +98,17 @@ public interface MediaCodecAdapter {
|
|||||||
/** For DRM protected playbacks, a {@link MediaCrypto} to use for decryption. */
|
/** For DRM protected playbacks, a {@link MediaCrypto} to use for decryption. */
|
||||||
@Nullable public final MediaCrypto crypto;
|
@Nullable public final MediaCrypto crypto;
|
||||||
|
|
||||||
/** See {@link MediaCodec#configure}. */
|
|
||||||
public final int flags;
|
|
||||||
|
|
||||||
private Configuration(
|
private Configuration(
|
||||||
MediaCodecInfo codecInfo,
|
MediaCodecInfo codecInfo,
|
||||||
MediaFormat mediaFormat,
|
MediaFormat mediaFormat,
|
||||||
Format format,
|
Format format,
|
||||||
@Nullable Surface surface,
|
@Nullable Surface surface,
|
||||||
@Nullable MediaCrypto crypto,
|
@Nullable MediaCrypto crypto) {
|
||||||
int flags) {
|
|
||||||
this.codecInfo = codecInfo;
|
this.codecInfo = codecInfo;
|
||||||
this.mediaFormat = mediaFormat;
|
this.mediaFormat = mediaFormat;
|
||||||
this.format = format;
|
this.format = format;
|
||||||
this.surface = surface;
|
this.surface = surface;
|
||||||
this.crypto = crypto;
|
this.crypto = crypto;
|
||||||
this.flags = flags;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,10 +50,7 @@ public final class SynchronousMediaCodecAdapter implements MediaCodecAdapter {
|
|||||||
codec = createCodec(configuration);
|
codec = createCodec(configuration);
|
||||||
TraceUtil.beginSection("configureCodec");
|
TraceUtil.beginSection("configureCodec");
|
||||||
codec.configure(
|
codec.configure(
|
||||||
configuration.mediaFormat,
|
configuration.mediaFormat, configuration.surface, configuration.crypto, /* flags= */ 0);
|
||||||
configuration.surface,
|
|
||||||
configuration.crypto,
|
|
||||||
configuration.flags);
|
|
||||||
TraceUtil.endSection();
|
TraceUtil.endSection();
|
||||||
TraceUtil.beginSection("startCodec");
|
TraceUtil.beginSection("startCodec");
|
||||||
codec.start();
|
codec.start();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user