@UnstableApi
public final class Id3Peeker


Peeks data from the beginning of an ExtractorInput to determine if there is any ID3 tag.

Summary

Public constructors

Public methods

@Nullable Metadata
@InlineMe(replacement = "this.peekId3Data(input, id3FramePredicate, /* maxTagPeekBytes= */ 0)")
peekId3Data(
    ExtractorInput input,
    @Nullable Id3Decoder.FramePredicate id3FramePredicate
)

This method is deprecated.

Use peekId3Data instead.

@Nullable Metadata
peekId3Data(
    ExtractorInput input,
    @Nullable Id3Decoder.FramePredicate id3FramePredicate,
    int maxTagPeekBytes
)

Peeks ID3 data from the input and parses the first ID3 tag.

Public constructors

Id3Peeker

public Id3Peeker()

Public methods

peekId3Data

@InlineMe(replacement = "this.peekId3Data(input, id3FramePredicate, /* maxTagPeekBytes= */ 0)")
public @Nullable Metadata peekId3Data(
    ExtractorInput input,
    @Nullable Id3Decoder.FramePredicate id3FramePredicate
)

peekId3Data

public @Nullable Metadata peekId3Data(
    ExtractorInput input,
    @Nullable Id3Decoder.FramePredicate id3FramePredicate,
    int maxTagPeekBytes
)

Peeks ID3 data from the input and parses the first ID3 tag.

Parameters
ExtractorInput input

The ExtractorInput from which data should be peeked.

@Nullable Id3Decoder.FramePredicate id3FramePredicate

Determines which ID3 frames are decoded. May be null to decode all frames.

int maxTagPeekBytes

The maximum number of bytes to peek when searching for each ID3 tag before giving up.

Returns
@Nullable Metadata

The first ID3 tag decoded into a Metadata object. May be null if ID3 tag is not present in the input.

Throws
java.io.IOException

If an error occurred peeking from the input.