Package com.coremedia.iso.boxes

Examples of com.coremedia.iso.boxes.FileTypeBox


           tstream.close();
        }
       
       
        // Grab the file type box
        FileTypeBox fileType = getOrNull(isoFile, FileTypeBox.class);
        if (fileType != null) {
           // Identify the type
           MediaType type = MediaType.application("mp4");
           for (MediaType t : typesMap.keySet()) {
              if (typesMap.get(t).contains(fileType.getMajorBrand())) {
                 type = t;
                 break;
              }
           }
           metadata.set(Metadata.CONTENT_TYPE, type.toString());
          
           if (type.getType().equals("audio")) {
              metadata.set(XMPDM.AUDIO_COMPRESSOR, fileType.getMajorBrand().trim());
           }
        } else {
           // Some older QuickTime files lack the FileType
           metadata.set(Metadata.CONTENT_TYPE, "video/quicktime");
        }
View Full Code Here


           tstream.close();
        }
       
       
        // Grab the file type box
        FileTypeBox fileType = getOrNull(isoFile, FileTypeBox.class);
        if (fileType != null) {
           // Identify the type
           MediaType type = MediaType.application("mp4");
           for (MediaType t : typesMap.keySet()) {
              if (typesMap.get(t).contains(fileType.getMajorBrand())) {
                 type = t;
                 break;
              }
           }
           metadata.set(Metadata.CONTENT_TYPE, type.toString());
          
           if (type.getType().equals("audio")) {
              metadata.set(XMPDM.AUDIO_COMPRESSOR, fileType.getMajorBrand().trim());
           }
        } else {
           // Some older QuickTime files lack the FileType
           metadata.set(Metadata.CONTENT_TYPE, "video/quicktime");
        }
View Full Code Here

        try {
            isoFile = new IsoFile(new DirectFileReadDataSource(tstream.getFile()));
            tmp.addResource(isoFile);

            // Grab the file type box
            FileTypeBox fileType = getOrNull(isoFile, FileTypeBox.class);
            if (fileType != null) {
               // Identify the type
               MediaType type = MediaType.application("mp4");
               for (MediaType t : typesMap.keySet()) {
                  if (typesMap.get(t).contains(fileType.getMajorBrand())) {
                     type = t;
                     break;
                  }
               }
               metadata.set(Metadata.CONTENT_TYPE, type.toString());

               if (type.getType().equals("audio")) {
                  metadata.set(XMPDM.AUDIO_COMPRESSOR, fileType.getMajorBrand().trim());
               }
            } else {
               // Some older QuickTime files lack the FileType
               metadata.set(Metadata.CONTENT_TYPE, "video/quicktime");
            }
View Full Code Here

TOP

Related Classes of com.coremedia.iso.boxes.FileTypeBox

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.