docs/doc/reference/com/google/android/exoplayer2/audio/MpegAudioUtil.Header.html
Package com.google.android.exoplayer2.audio
Enclosing class:MpegAudioUtil
public static final classMpegAudioUtil.Headerextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")
Stores the metadata for an MPEG audio frame.
Fields | Modifier and Type | Field | Description |
| --- | --- | --- |
| int | bitrate |
Bitrate of the frame in bit/s.
|
| int | channels |
Number of audio channels in the frame.
|
| int | frameSize |
Size of the frame associated with this header, in bytes.
|
| String | mimeType |
The MIME type.
|
| int | sampleRate |
Sample rate in samples per second.
|
| int | samplesPerFrame |
Number of samples stored in the frame.
|
| int | version |
MPEG audio header version.
|
Constructors | Constructor | Description |
| --- | --- |
| Header() | |
All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description |
| --- | --- | --- |
| boolean | setForHeaderData(int headerData) |
Populates the fields in this instance to reflect the MPEG audio header in headerData, returning whether the header was valid.
|
-
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
public int version
MPEG audio header version.
-
@Nullable
public[String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")mimeType
The MIME type.
-
public int frameSize
Size of the frame associated with this header, in bytes.
-
public int sampleRate
Sample rate in samples per second.
-
public int channels
Number of audio channels in the frame.
-
public int bitrate
Bitrate of the frame in bit/s.
-
public int samplesPerFrame
Number of samples stored in the frame.
-
public Header()
-
public boolean setForHeaderData(int headerData)
Populates the fields in this instance to reflect the MPEG audio header in headerData, returning whether the header was valid. If false, the values of the fields in this instance will not be updated.
Parameters:headerData - Header data to parse.Returns:True if the fields were populated. False otherwise, indicating that headerData is not a valid MPEG audio header.