Login  Register

Re: Quicktime installed?

Posted by Burger Wilhelm on Mar 01, 2011; 8:12am
URL: http://imagej.273.s1.nabble.com/Quicktime-installed-tp3685482p3685483.html

Sebastian,

below is the plugin that I use for testing the QT installation. Perhaps it helps.

--Wilhelm
www.imagingbook.com


// --------------------------------------------------------------

import ij.IJ;
import ij.plugin.PlugIn;
import quicktime.QTException;
import quicktime.QTSession;
import quicktime.util.QTBuild;

public class QT_Test2 implements PlugIn {
   
        public void run(String arg) {
                IJ.log("Testing QuickTime installation:");
                boolean success = false;
                boolean hasQT = false;
        try {
            Class.forName("quicktime.QTSession");
            hasQT = true;
        }
        catch (Throwable throwable) {
        }
        if (!hasQT) {
        IJ.log("QuickTime not found.");
        return;
        }

        IJ.log("QuickTime is installed.");
                try {
                        QTSession.open();
                        success = true;
                } catch (QTException e) {
                }
                if (success && QTSession.isInitialized()) {
                        IJ.log("QuickTime initialized.");
                        IJ.log("QuickTime Version: " +
                                        QTSession.getMajorVersion() + "." +
                                        QTSession.getMinorVersion() + "." +
                                        QTSession.getBugFixVersion());
                        IJ.log("QuickTime for Java Version: " +
                                        QTBuild.getVersion() + "." +
                                        QTBuild.getSubVersion() + "." +
                                        QTBuild.getQualifyingSubVersion());
                        QTSession.close();
                        IJ.log("QuickTime seems to be working OK.");
                }
                else {
                        IJ.log("Could not initialize Quicktime!");
                }
        }
}

// --------------------------------------------------------------



> -----Original Message-----
> From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of
> Sebastian Böckmann
> Sent: Monday, February 28, 2011 5:24 PM
> To: [hidden email]
> Subject: Quicktime installed?
>
> Hello,
>
> In my java project I'm using quicktime (QTJava.jar) for video
> processing issues. So far so good, but to release my program I want to
> check if quicktime is installed properly. I use the following code:
>
> try {
>             QTSession.open();
>         } catch (Exception e) {
>             System.out.println("ERROR...");
>             ...
>         }
>
...