⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qtsessioncheck.java

📁 FMJ(freedom media for java)是java视频开发的新选择
💻 JAVA
字号:
package net.sf.fmj.qt.utils;import quicktime.QTException;import quicktime.QTSession;/** * Copied from QTJ Developer's Notebook, Adamson. * @author Ken Larson * */public class QTSessionCheck{	private Thread shutdownHook;	  private static QTSessionCheck instance;	  private QTSessionCheck( ) throws QTException {	      super( );	      // init	      QTSession.open( );	      // create shutdown handler	      shutdownHook = new Thread( ) {	              public void run( ) {	                  QTSession.close( );	              }	          };	      //Runtime.getRuntime( ).addShutdownHook(shutdownHook);	// TODO: this is causing crashes.	  }	  private static QTSessionCheck getInstance( ) throws QTException {	      if (instance == null)	          instance = new QTSessionCheck( );	      return instance;	  }	  	  public static void check( ) throws QTException {	      // gets instance.  if a new one needs to be created,	      // it calls QTSession.open( ) and creates a shutdown hook	      // to call QTSession.close( )	      getInstance( );	  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -