public long create_composition_time_to_sample_atom(MP4DataStream bitstream) throws IOException {
  log.trace("Composition time to sample atom");
  create_full_atom(bitstream);
  comptimeToSamplesRecords=new Vector<CompositionTimeSampleRecord>();
  entryCount=(int)bitstream.readBytes(4);
  log.trace("Composition time to sample entries: {}",entryCount);
  readed+=4;
  for (int i=0; i < entryCount; i++) {
    int sampleCount=(int)bitstream.readBytes(4);
    int sampleOffset=(int)bitstream.readBytes(4);
    comptimeToSamplesRecords.addElement(new CompositionTimeSampleRecord(sampleCount,sampleOffset));
    readed+=8;
  }
  return readed;
}

public long create_composition_time_to_sample_atom ( MP4DataStream bitstream ) throws IOException { log . trace ( "Composition time to sample atom" ) ; create_full_atom ( bitstream ) ; comptimeToSamplesRecords = new Vector < CompositionTimeSampleRecord > ( ) ; entryCount = ( int ) bitstream . readBytes ( 4 ) ; log . trace ( "Composition time to sample entries: {}" , entryCount ) ; readed += 4 ; for ( int i = 0 ; i < entryCount ; i ++ ) { int sampleCount = ( int ) bitstream . readBytes ( 4 ) ; int sampleOffset = ( int ) bitstream . readBytes ( 4 ) ; comptimeToSamplesRecords . addElement ( new CompositionTimeSampleRecord ( sampleCount , sampleOffset ) ) ; readed += 8 ; } return readed ; }
loads composition time to sample atom from the input bitstream .
