FileDocCategorySizeDatePackage
VideoAudioChecker.javaAPI Docmp4parser 1.0-RC-171122Wed Dec 19 20:10:38 GMT 2012com.googlecode.mp4parser.stuff

VideoAudioChecker

public class VideoAudioChecker extends Object

Fields Summary
Constructors Summary
Methods Summary
public static com.googlecode.mp4parser.stuff.VideoAudioChecker$TYPEgetType(com.coremedia.iso.IsoFile isoFile)


        List<HandlerBox> handlerBoxes =
                isoFile.getBoxes(HandlerBox.class, true);
        for (HandlerBox handlerBox : handlerBoxes) {
            if ("vide".equals(handlerBox.getHandlerType())) {
                return TYPE.VIDEO;
            } else if ("soun".equals(handlerBox.getHandlerType())) {
                return TYPE.AUDIO;
            } else {
                System.err.println("unknown");
            }

        }
        return TYPE.AUDIO;
    
public static voidmain(java.lang.String[] args)

        IsoFile isoFile = new IsoFile(Channels.newChannel(SubTitleExample.class.getResourceAsStream("/count-video.mp4")));
        System.err.println(getType(isoFile));