Class AdtsPacketHeader
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.container.adts.AdtsPacketHeader
-
public class AdtsPacketHeader extends java.lang.ObjectADTS packet header.
-
-
Field Summary
Fields Modifier and Type Field Description intchannelsNumber of channels.booleanisProtectionAbsentIf this is false, then the packet header is followed by a 2-byte CRC.intpayloadLengthPacket payload length, excluding the CRC after this header.intprofileDecoder profile (2 is AAC-LC).intsampleRateSample rate.
-
Constructor Summary
Constructors Constructor Description AdtsPacketHeader(boolean isProtectionAbsent, int profile, int sampleRate, int channels, int payloadLength)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanUseSameDecoder(AdtsPacketHeader packetHeader)
-
-
-
Field Detail
-
isProtectionAbsent
public final boolean isProtectionAbsent
If this is false, then the packet header is followed by a 2-byte CRC.
-
profile
public final int profile
Decoder profile (2 is AAC-LC).
-
sampleRate
public final int sampleRate
Sample rate.
-
channels
public final int channels
Number of channels.
-
payloadLength
public final int payloadLength
Packet payload length, excluding the CRC after this header.
-
-
Constructor Detail
-
AdtsPacketHeader
public AdtsPacketHeader(boolean isProtectionAbsent, int profile, int sampleRate, int channels, int payloadLength)- Parameters:
isProtectionAbsent- If this is false, then the packet header is followed by a 2-byte CRC.profile- Decoder profile (2 is AAC-LC).sampleRate- Sample rate.channels- Number of channels.payloadLength- Packet payload length, excluding the CRC after this header.
-
-
Method Detail
-
canUseSameDecoder
public boolean canUseSameDecoder(AdtsPacketHeader packetHeader)
- Parameters:
packetHeader- The packet to check against.- Returns:
- True if the decoder does not have to be reconfigured between these two packets.
-
-