org.jaudiotagger.audio.mp4.atom
Class Mp4Mp4aBox

java.lang.Object
  extended by org.jaudiotagger.audio.mp4.atom.AbstractMp4Box
      extended by org.jaudiotagger.audio.mp4.atom.Mp4Mp4aBox

public class Mp4Mp4aBox
extends AbstractMp4Box

Mp4aBox ( sample (frame encoding) description box)

At first glance appears to hold no of channels but actually always returns 2 even for mono recordings so just need to skip over data in order to get to child atom esds

4 bytes version/flags = byte hex version + 24-bit hex flags (current = 0)

-> 6 bytes reserved = 48-bit value set to zero -> 2 bytes data reference index = short unsigned index from 'dref' box -> 2 bytes QUICKTIME audio encoding version = short hex version - default = 0 ; audio data size before decompression = 1 -> 2 bytes QUICKTIME audio encoding revision level = byte hex version - default = 0 ; video can revise this value -> 4 bytes QUICKTIME audio encoding vendor = long ASCII text string - default = 0 -> 2 bytes audio channels = short unsigned count (mono = 1 ; stereo = 2) -> 2 bytes audio sample size = short unsigned value (8 or 16) -> 2 bytes QUICKTIME audio compression id = short integer value - default = 0 -> 2 bytes QUICKTIME audio packet size = short value set to zero -> 4 bytes audio sample rate = long unsigned fixed point rate


Field Summary
static int AUDIO_COMPRESSION_ID_LENGTH
           
static int AUDIO_COMPRESSION_ID_POS
           
static int AUDIO_ENCODING_LENGTH
           
static int AUDIO_ENCODING_POS
           
static int AUDIO_ENCODING_VENDOR_LENGTH
           
static int AUDIO_ENCODING_VENDOR_POS
           
static int AUDIO_PACKET_SIZE_LENGTH
           
static int AUDIO_PACKET_SIZE_POS
           
static int AUDIO_REVISION_LENGTH
           
static int AUDIO_REVISION_POS
           
static int AUDIO_SAMPLE_RATE_LENGTH
           
static int AUDIO_SAMPLE_RATE_POS
           
static int AUDIO_SAMPLE_SIZE_LENGTH
           
static int AUDIO_SAMPLE_SIZE_POS
           
static int CHANNELS_LENGTH
           
static int CHANNELS_POS
           
static int REFERENCE_INDEX_LENGTH
           
static int REFERENCE_INDEX_POS
           
static int RESERVED_LENGTH
           
static int RESERVED_POS
           
static int TOTAL_LENGTH
           
 
Fields inherited from class org.jaudiotagger.audio.mp4.atom.AbstractMp4Box
dataBuffer, header
 
Constructor Summary
Mp4Mp4aBox(Mp4BoxHeader header, java.nio.ByteBuffer dataBuffer)
           
 
Method Summary
 void processData()
           
 
Methods inherited from class org.jaudiotagger.audio.mp4.atom.AbstractMp4Box
getData, getHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESERVED_POS

public static final int RESERVED_POS
See Also:
Constant Field Values

REFERENCE_INDEX_POS

public static final int REFERENCE_INDEX_POS
See Also:
Constant Field Values

AUDIO_ENCODING_POS

public static final int AUDIO_ENCODING_POS
See Also:
Constant Field Values

AUDIO_REVISION_POS

public static final int AUDIO_REVISION_POS
See Also:
Constant Field Values

AUDIO_ENCODING_VENDOR_POS

public static final int AUDIO_ENCODING_VENDOR_POS
See Also:
Constant Field Values

CHANNELS_POS

public static final int CHANNELS_POS
See Also:
Constant Field Values

AUDIO_SAMPLE_SIZE_POS

public static final int AUDIO_SAMPLE_SIZE_POS
See Also:
Constant Field Values

AUDIO_COMPRESSION_ID_POS

public static final int AUDIO_COMPRESSION_ID_POS
See Also:
Constant Field Values

AUDIO_PACKET_SIZE_POS

public static final int AUDIO_PACKET_SIZE_POS
See Also:
Constant Field Values

AUDIO_SAMPLE_RATE_POS

public static final int AUDIO_SAMPLE_RATE_POS
See Also:
Constant Field Values

RESERVED_LENGTH

public static final int RESERVED_LENGTH
See Also:
Constant Field Values

REFERENCE_INDEX_LENGTH

public static final int REFERENCE_INDEX_LENGTH
See Also:
Constant Field Values

AUDIO_ENCODING_LENGTH

public static final int AUDIO_ENCODING_LENGTH
See Also:
Constant Field Values

AUDIO_REVISION_LENGTH

public static final int AUDIO_REVISION_LENGTH
See Also:
Constant Field Values

AUDIO_ENCODING_VENDOR_LENGTH

public static final int AUDIO_ENCODING_VENDOR_LENGTH
See Also:
Constant Field Values

CHANNELS_LENGTH

public static final int CHANNELS_LENGTH
See Also:
Constant Field Values

AUDIO_SAMPLE_SIZE_LENGTH

public static final int AUDIO_SAMPLE_SIZE_LENGTH
See Also:
Constant Field Values

AUDIO_COMPRESSION_ID_LENGTH

public static final int AUDIO_COMPRESSION_ID_LENGTH
See Also:
Constant Field Values

AUDIO_PACKET_SIZE_LENGTH

public static final int AUDIO_PACKET_SIZE_LENGTH
See Also:
Constant Field Values

AUDIO_SAMPLE_RATE_LENGTH

public static final int AUDIO_SAMPLE_RATE_LENGTH
See Also:
Constant Field Values

TOTAL_LENGTH

public static final int TOTAL_LENGTH
See Also:
Constant Field Values
Constructor Detail

Mp4Mp4aBox

public Mp4Mp4aBox(Mp4BoxHeader header,
                  java.nio.ByteBuffer dataBuffer)
Parameters:
header - header info
dataBuffer - data of box (doesnt include header data)
Method Detail

processData

public void processData()
                 throws CannotReadException
Throws:
CannotReadException