Examples of StreamBitratePropertiesChunk


Examples of entagged.audioformats.asf.data.StreamBitratePropertiesChunk

   * @throws IOException
   *             read errors.
   */
  private StreamBitratePropertiesChunk parseData(RandomAccessFile raf)
      throws IOException {
    StreamBitratePropertiesChunk result = null;
    long chunkStart = raf.getFilePointer();
    GUID guid = Utils.readGUID(raf);
    if (GUID.GUID_STREAM_BITRATE_PROPERTIES.equals(guid)) {
      BigInteger chunkLen = Utils.readBig64(raf);
      result = new StreamBitratePropertiesChunk(chunkStart, chunkLen);

      /*
       * Read the amount of bitrate records
       */
      long recordCount = Utils.readUINT16(raf);
      for (int i = 0; i < recordCount; i++) {
        int flags = Utils.readUINT16(raf);
        long avgBitrate = Utils.readUINT32(raf);
        result.addBitrateRecord(flags & 0x00FF, avgBitrate);
      }

    }
    return result;
  }
View Full Code Here

Examples of entagged.audioformats.asf.data.StreamBitratePropertiesChunk

      FileHeader fileHeader = null;
      ExtendedContentDescription extendedDescription = null;
      EncodingChunk encodingChunk = null;
      StreamChunk streamChunk = null;
      ContentDescription contentDescription = null;
      StreamBitratePropertiesChunk bitratePropertiesChunk = null;

      Iterator iterator = chunks.iterator();
      while (iterator.hasNext()) {
        Chunk currentChunk = (Chunk) iterator.next();
        if (fileHeader == null
View Full Code Here

Examples of org.jaudiotagger.audio.asf.data.StreamBitratePropertiesChunk

      setDuration(header.getFileHeader().getDurationInSeconds());
     
      // The average bit rate of the video is as hard to gather as the FPS.
      // However in this case there is a recommended chunk in ASF files
      // which contains this information.
      StreamBitratePropertiesChunk propertiesChunk = header.getStreamBitratePropertiesChunk();
      if (propertiesChunk != null)
        setVideoBitRate((int) propertiesChunk.getAvgBitrate(video.getStreamNumber()));

      // The audio part of the video. (optional)
      if (header.getAudioStreamChunk() != null) {
        setAudioCodec(header.getAudioStreamChunk().getCodecDescription());
        setAudioRate((int) header.getAudioStreamChunk().getSamplingRate());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.