Coverage Report - org.jaudiotagger.audio.mp4.atom.Mp4StsdBox
 
Classes in this File Line Coverage Branch Coverage Complexity
Mp4StsdBox
100%
6/6
N/A
1
 
 1  
 package org.jaudiotagger.audio.mp4.atom;
 2  
 
 3  
 import org.jaudiotagger.audio.exceptions.CannotReadException;
 4  
 
 5  
 import java.nio.ByteBuffer;
 6  
 
 7  
 /**
 8  
  * StsdBox ( sample (frame encoding) description box)
 9  
  * <p/>
 10  
  * <p>4 bytes version/flags = byte hex version + 24-bit hex flags
 11  
  * (current = 0)
 12  
  * - > 4 bytes number of descriptions = long unsigned total
 13  
  * (default = 1)
 14  
  * Then if audio contains mp4a,alac or drms box
 15  
  */
 16  
 public class Mp4StsdBox extends AbstractMp4Box
 17  
 {
 18  
     public static final int VERSION_FLAG_POS = 0;
 19  
     public static final int OTHER_FLAG_POS = 1;
 20  
     public static final int NO_OF_DESCRIPTIONS_POS = 4;
 21  
 
 22  
     public static final int VERSION_FLAG_LENGTH = 1;
 23  
     public static final int OTHER_FLAG_LENGTH = 3;
 24  
     public static final int NO_OF_DESCRIPTIONS_POS_LENGTH = 4;
 25  
 
 26  
     /**
 27  
      * @param header     header info
 28  
      * @param dataBuffer data of box (doesnt include header data)
 29  
      */
 30  
     public Mp4StsdBox(Mp4BoxHeader header, ByteBuffer dataBuffer)
 31  117
     {
 32  117
         this.header = header;
 33  117
         this.dataBuffer = dataBuffer;
 34  117
     }
 35  
 
 36  
     public void processData() throws CannotReadException
 37  
     {
 38  
         //Skip the data
 39  117
         dataBuffer.position(dataBuffer.position() + VERSION_FLAG_LENGTH + OTHER_FLAG_LENGTH + NO_OF_DESCRIPTIONS_POS_LENGTH);
 40  117
     }
 41  
 }