Package entagged.audioformats.asf.data

Examples of entagged.audioformats.asf.data.ExtendedContentDescription


    private Chunk createNewExtendedContentDescription(Tag tag,
            ExtendedContentDescription tagChunk, RandomAccessFile rafTemp)
            throws IOException {
        long chunkStart = rafTemp.getFilePointer();
        if (tagChunk == null) {
            tagChunk = new ExtendedContentDescription();
        }
        TagConverter.assignCommonTagValues(tag, tagChunk);
        TagConverter.assignOptionalTagValues (tag,tagChunk);
       
        /*
 
View Full Code Here


     * @throws IOException
     *                   read errors.
     */
    private ExtendedContentDescription parseData(RandomAccessFile raf)
            throws IOException {
        ExtendedContentDescription result = null;
        long chunkStart = raf.getFilePointer();
        GUID guid = Utils.readGUID(raf);

        if (GUID.GUID_EXTENDED_CONTENT_DESCRIPTION.equals(guid)) {
            BigInteger chunkLen = Utils.readBig64(raf);

            // Reading Number of Tags.
            long descriptorCount = Utils.readUINT16(raf);

            // Create Result object
            result = new ExtendedContentDescription(chunkStart, chunkLen);

            for (long i = 0; i < descriptorCount; i++) {
                String tagElement = Utils.readUTF16LEStr(raf);
                int type = Utils.readUINT16(raf);
                ContentDescriptor prop = new ContentDescriptor(tagElement, type);
                switch (type) {
                case ContentDescriptor.TYPE_STRING:
                    prop.setStringValue(Utils.readUTF16LEStr(raf));
                    break;
                case ContentDescriptor.TYPE_BINARY:
                    prop.setBinaryValue(readBinaryData(raf));
                    break;
                case ContentDescriptor.TYPE_BOOLEAN:
                    prop.setBooleanValue(readBoolean(raf));
                    break;
                case ContentDescriptor.TYPE_DWORD:
                    raf.skipBytes(2);
                    prop.setDWordValue(Utils.readUINT32(raf));
                    break;
                case ContentDescriptor.TYPE_WORD:
                    raf.skipBytes(2);
                    prop.setWordValue(Utils.readUINT16(raf));
                    break;
                case ContentDescriptor.TYPE_QWORD:
                    raf.skipBytes(2);
                    prop.setQWordValue(Utils.readUINT64(raf));
                    break;
                default:
                    // Unknown, hopefully the convention for the size of the
                    // value
                    // is given, so we could read it binary
                    prop.setStringValue("Invalid datatype: "
                            + new String(readBinaryData(raf)));
                }
                result.addDescriptor(prop);
            }
        }
        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

   *            The tag whose values the result will be filled with.
   * @return A new extended content description object.
   */
  public static ExtendedContentDescription createExtendedContentDescription(
      Tag tag) {
    ExtendedContentDescription result = new ExtendedContentDescription();
    assignCommonTagValues(tag, result);
    return result;
  }
View Full Code Here

      /*
       * Now any properties, which don't belong to the common section of
       * entagged.
       */
      ExtendedContentDescription extDesc = source
          .getExtendedContentDescription();
      Iterator it = extDesc.getDescriptors().iterator();
      while (it.hasNext()) {
        ContentDescriptor current = (ContentDescriptor) it.next();
        // If common, it has been added to the result some lines upward.
        if (!current.isCommon()) {
          result.add(new ContentDescriptorTagField(current));
View Full Code Here

TOP

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

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.