Package entagged.audioformats.asf.data

Examples of entagged.audioformats.asf.data.FileHeader


   * @param raf
   * @return <code>null</code> if no valid file header object.
   * @throws IOException
   */
  private FileHeader parseData(RandomAccessFile raf) throws IOException {
    FileHeader result = null;
    long fileHeaderStart = raf.getFilePointer();
    GUID guid = Utils.readGUID(raf);
    if (GUID.GUID_FILE.equals(guid)) {
      BigInteger chunckLen = Utils.readBig64(raf);
      // Skip client GUID.
      raf.skipBytes(16);

      BigInteger fileSize = Utils.readBig64(raf);
      if (fileSize.intValue() != raf.length()) {
        System.err
            .println("Filesize of file doesn't match len of Fileheader. ("
                + fileSize.toString() + ", file: "+raf.length()+")");
      }
      // fileTime in 100 ns since midnight of 1st january 1601 GMT
      BigInteger fileTime = Utils.readBig64(raf);

      BigInteger packageCount = Utils.readBig64(raf);

      BigInteger timeEndPos = Utils.readBig64(raf);
      BigInteger duration = Utils.readBig64(raf);
      BigInteger timeStartPos = Utils.readBig64(raf);

      long flags = Utils.readUINT32(raf);

      long minPkgSize = Utils.readUINT32(raf);
      long maxPkgSize = Utils.readUINT32(raf);
      long uncompressedFrameSize = Utils.readUINT32(raf);

      result = new FileHeader(fileHeaderStart, chunckLen, fileSize,
          fileTime, packageCount, duration, timeStartPos, timeEndPos,
          flags, minPkgSize, maxPkgSize, uncompressedFrameSize);
    }
    return result;
  }
View Full Code Here


      /*
       * Now we know all positions and guids of chunks which are contained
       * whithin asf header. Further we need to identify the type of those
       * chunks and parse the interesting ones.
       */
      FileHeader fileHeader = null;
      ExtendedContentDescription extendedDescription = null;
      EncodingChunk encodingChunk = null;
      StreamChunk streamChunk = null;
      ContentDescription contentDescription = null;
      StreamBitratePropertiesChunk bitratePropertiesChunk = null;
View Full Code Here

TOP

Related Classes of entagged.audioformats.asf.data.FileHeader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.