Back to Exoplayer

FlacStreamMetadata (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/extractor/FlacStreamMetadata.html

latest12.8 KB
Original Source

Package com.google.android.exoplayer2.extractor

Class FlacStreamMetadata


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classFlacStreamMetadataextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

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.

Holder for FLAC metadata.

See the following spec references:

Nested Class Summary

Nested Classes | Modifier and Type | Class | Description | | --- | --- | --- | | static class | FlacStreamMetadata.SeekTable | Deprecated.

A FLAC seek table. |

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | int | bitsPerSample | Deprecated.

Number of bits per sample. | | int | bitsPerSampleLookupKey | Deprecated.

Lookup key corresponding to the number of bits per sample of the stream, or NOT_IN_LOOKUP_TABLE if it is not in the lookup table. | | int | channels | Deprecated.

Number of audio channels. | | int | maxBlockSizeSamples | Deprecated.

Maximum number of samples per block. | | int | maxFrameSize | Deprecated.

Maximum frame size in bytes, or 0 if the value is unknown. | | int | minBlockSizeSamples | Deprecated.

Minimum number of samples per block. | | int | minFrameSize | Deprecated.

Minimum frame size in bytes, or 0 if the value is unknown. | | static int | NOT_IN_LOOKUP_TABLE | Deprecated.

Indicates that a value is not in the corresponding lookup table. | | int | sampleRate | Deprecated.

Sample rate in Hertz. | | int | sampleRateLookupKey | Deprecated.

Lookup key corresponding to the stream sample rate, or NOT_IN_LOOKUP_TABLE if it is not in the lookup table. | | FlacStreamMetadata.SeekTable | seekTable | Deprecated.

Seek table, or null if it is not provided. | | long | totalSamples | Deprecated.

Total number of samples, or 0 if the value is unknown. |

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | FlacStreamMetadata​(byte[] data, int offset) | Deprecated.

Parses binary FLAC stream info metadata. | | FlacStreamMetadata​(int minBlockSizeSamples, int maxBlockSizeSamples, int minFrameSize, int maxFrameSize, int sampleRate, int channels, int bitsPerSample, long totalSamples, ArrayList<String> vorbisComments, ArrayList<PictureFrame> pictureFrames) | Deprecated. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | FlacStreamMetadata | copyWithPictureFrames​(List<PictureFrame> pictureFrames) | Deprecated.

Returns a copy of this with the given picture frames added to the metadata. | | FlacStreamMetadata | copyWithSeekTable​(FlacStreamMetadata.SeekTable seekTable) | Deprecated.

Returns a copy of this with the seek table replaced by the one given. | | FlacStreamMetadata | copyWithVorbisComments​(List<String> vorbisComments) | Deprecated.

Returns a copy of this with the given Vorbis comments added to the metadata. | | long | getApproxBytesPerFrame() | Deprecated.

Returns the approximate number of bytes per frame for the current FLAC stream. | | int | getDecodedBitrate() | Deprecated.

Returns the bitrate of the stream after it's decoded into PCM. | | long | getDurationUs() | Deprecated.

Returns the duration of the FLAC stream in microseconds, or C.TIME_UNSET if the total number of samples if unknown. | | Format | getFormat​(byte[] streamMarkerAndInfoBlock, Metadata id3Metadata) | Deprecated.

Returns a Format extracted from the FLAC stream metadata. | | int | getMaxDecodedFrameSize() | Deprecated.

Returns the maximum size for a decoded frame from the FLAC stream. | | Metadata | getMetadataCopyWithAppendedEntriesFrom​(Metadata other) | Deprecated.

Returns a copy of the content metadata with entries from other appended. | | long | getSampleNumber​(long timeUs) | Deprecated.

Returns the sample number of the sample at a given time. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

- 

NOT_IN_LOOKUP_TABLE

public static final int NOT_IN_LOOKUP_TABLE

Deprecated.

Indicates that a value is not in the corresponding lookup table. See Also:Constant Field Values

- 

minBlockSizeSamples

public final int minBlockSizeSamples

Deprecated.

Minimum number of samples per block.

- 

maxBlockSizeSamples

public final int maxBlockSizeSamples

Deprecated.

Maximum number of samples per block.

- 

minFrameSize

public final int minFrameSize

Deprecated.

Minimum frame size in bytes, or 0 if the value is unknown.

- 

maxFrameSize

public final int maxFrameSize

Deprecated.

Maximum frame size in bytes, or 0 if the value is unknown.

- 

sampleRate

public final int sampleRate

Deprecated.

Sample rate in Hertz.

- 

sampleRateLookupKey

public final int sampleRateLookupKey

Deprecated.

Lookup key corresponding to the stream sample rate, or NOT_IN_LOOKUP_TABLE if it is not in the lookup table.

This key is used to indicate the sample rate in the frame header for the most common values.

The sample rate lookup table is described in https://xiph.org/flac/format.html#frame\_header.

- 

channels

public final int channels

Deprecated.

Number of audio channels.

- 

bitsPerSample

public final int bitsPerSample

Deprecated.

Number of bits per sample.

- 

bitsPerSampleLookupKey

public final int bitsPerSampleLookupKey

Deprecated.

Lookup key corresponding to the number of bits per sample of the stream, or NOT_IN_LOOKUP_TABLE if it is not in the lookup table.

This key is used to indicate the number of bits per sample in the frame header for the most common values.

The sample size lookup table is described in https://xiph.org/flac/format.html#frame\_header.

- 

totalSamples

public final long totalSamples

Deprecated.

Total number of samples, or 0 if the value is unknown.

- 

seekTable

@Nullable
public final[FlacStreamMetadata.SeekTable](FlacStreamMetadata.SeekTable.html "class in com.google.android.exoplayer2.extractor")seekTable

Deprecated.

Seek table, or null if it is not provided.

Constructor Detail

- 

FlacStreamMetadata

public FlacStreamMetadata​(byte[] data,
                          int offset)

Deprecated.

Parses binary FLAC stream info metadata. Parameters:data - An array containing binary FLAC stream info block.offset - The offset of the stream info block in data, excluding the header (i.e. the offset points to the first byte of the minimum block size).

- 

FlacStreamMetadata

public FlacStreamMetadata​(int minBlockSizeSamples,
                          int maxBlockSizeSamples,
                          int minFrameSize,
                          int maxFrameSize,
                          int sampleRate,
                          int channels,
                          int bitsPerSample,
                          long totalSamples,[ArrayList](https://developer.android.com/reference/java/util/ArrayList.html "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> vorbisComments,[ArrayList](https://developer.android.com/reference/java/util/ArrayList.html "class or interface in java.util")<[PictureFrame](../metadata/flac/PictureFrame.html "class in com.google.android.exoplayer2.metadata.flac")> pictureFrames)

Deprecated.

Method Detail

- 

getMaxDecodedFrameSize

public int getMaxDecodedFrameSize()

Deprecated.

Returns the maximum size for a decoded frame from the FLAC stream.

- 

getDecodedBitrate

public int getDecodedBitrate()

Deprecated.

Returns the bitrate of the stream after it's decoded into PCM.

- 

getDurationUs

public long getDurationUs()

Deprecated.

Returns the duration of the FLAC stream in microseconds, or C.TIME_UNSET if the total number of samples if unknown.

- 

getSampleNumber

public long getSampleNumber​(long timeUs)

Deprecated.

Returns the sample number of the sample at a given time. Parameters:timeUs - Time position in microseconds in the FLAC stream.Returns:The sample number corresponding to the time position.

- 

getApproxBytesPerFrame

public long getApproxBytesPerFrame()

Deprecated.

Returns the approximate number of bytes per frame for the current FLAC stream.

- 

getFormat

public[Format](../Format.html "class in com.google.android.exoplayer2")getFormat​(byte[] streamMarkerAndInfoBlock,
                        @Nullable[Metadata](../metadata/Metadata.html "class in com.google.android.exoplayer2.metadata")id3Metadata)

Deprecated.

Returns a Format extracted from the FLAC stream metadata.

streamMarkerAndInfoBlock is updated to set the bit corresponding to the stream info last metadata block flag to true.

Parameters:streamMarkerAndInfoBlock - An array containing the FLAC stream marker followed by the stream info block.id3Metadata - The ID3 metadata of the stream, or null if there is no such data.Returns:The extracted Format.

- 

getMetadataCopyWithAppendedEntriesFrom

@Nullable
public[Metadata](../metadata/Metadata.html "class in com.google.android.exoplayer2.metadata")getMetadataCopyWithAppendedEntriesFrom​(@Nullable[Metadata](../metadata/Metadata.html "class in com.google.android.exoplayer2.metadata")other)

Deprecated.

Returns a copy of the content metadata with entries from other appended.

- 

copyWithSeekTable

public[FlacStreamMetadata](FlacStreamMetadata.html "class in com.google.android.exoplayer2.extractor")copyWithSeekTable​(@Nullable[FlacStreamMetadata.SeekTable](FlacStreamMetadata.SeekTable.html "class in com.google.android.exoplayer2.extractor")seekTable)

Deprecated.

Returns a copy of this with the seek table replaced by the one given.

- 

copyWithVorbisComments

public[FlacStreamMetadata](FlacStreamMetadata.html "class in com.google.android.exoplayer2.extractor")copyWithVorbisComments​([List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> vorbisComments)

Deprecated.

Returns a copy of this with the given Vorbis comments added to the metadata.

- 

copyWithPictureFrames

public[FlacStreamMetadata](FlacStreamMetadata.html "class in com.google.android.exoplayer2.extractor")copyWithPictureFrames​([List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[PictureFrame](../metadata/flac/PictureFrame.html "class in com.google.android.exoplayer2.metadata.flac")> pictureFrames)

Deprecated.

Returns a copy of this with the given picture frames added to the metadata.