Class AdtsPacketHeader


  • public class AdtsPacketHeader
    extends java.lang.Object
    ADTS packet header.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int channels
      Number of channels.
      boolean isProtectionAbsent
      If this is false, then the packet header is followed by a 2-byte CRC.
      int payloadLength
      Packet payload length, excluding the CRC after this header.
      int profile
      Decoder profile (2 is AAC-LC).
      int sampleRate
      Sample rate.
    • Constructor Summary

      Constructors 
      Constructor Description
      AdtsPacketHeader​(boolean isProtectionAbsent, int profile, int sampleRate, int channels, int payloadLength)  
    • 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.