Make @HlsMediaSource.MetadataType TYPE_USE

PiperOrigin-RevId: 397717018
This commit is contained in:
andrewlewis 2021-09-20 12:21:53 +01:00 committed by Christos Tsilopoulos
parent 0f3a86b89d
commit 8a910fd0aa
2 changed files with 5 additions and 2 deletions

View file

@ -57,7 +57,9 @@ import com.google.android.exoplayer2.util.MimeTypes;
import com.google.android.exoplayer2.util.Util;
import java.io.IOException;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import java.util.Collections;
import java.util.List;
@ -83,6 +85,7 @@ public final class HlsMediaSource extends BaseMediaSource
*/
@Documented
@Retention(SOURCE)
@Target({ElementType.TYPE_USE})
@IntDef({METADATA_TYPE_ID3, METADATA_TYPE_EMSG})
public @interface MetadataType {}
@ -104,7 +107,7 @@ public final class HlsMediaSource extends BaseMediaSource
private DrmSessionManagerProvider drmSessionManagerProvider;
private LoadErrorHandlingPolicy loadErrorHandlingPolicy;
private boolean allowChunklessPreparation;
@MetadataType private int metadataType;
private @MetadataType int metadataType;
private boolean useSessionKeys;
private List<StreamKey> streamKeys;
@Nullable private Object tag;

View file

@ -135,7 +135,7 @@ import org.checkerframework.checker.nullness.qual.RequiresNonNull;
private final LoadErrorHandlingPolicy loadErrorHandlingPolicy;
private final Loader loader;
private final MediaSourceEventListener.EventDispatcher mediaSourceEventDispatcher;
@HlsMediaSource.MetadataType private final int metadataType;
private final @HlsMediaSource.MetadataType int metadataType;
private final HlsChunkSource.HlsChunkHolder nextChunkHolder;
private final ArrayList<HlsMediaChunk> mediaChunks;
private final List<HlsMediaChunk> readOnlyMediaChunks;