• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java ResourceUnavailableEvent类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中javax.media.ResourceUnavailableEvent的典型用法代码示例。如果您正苦于以下问题:Java ResourceUnavailableEvent类的具体用法?Java ResourceUnavailableEvent怎么用?Java ResourceUnavailableEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ResourceUnavailableEvent类属于javax.media包,在下文中一共展示了ResourceUnavailableEvent类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: controllerUpdate

import javax.media.ResourceUnavailableEvent; //导入依赖的package包/类
/**
    * Controller Listener.
    */
   public void controllerUpdate(ControllerEvent evt) {

if (evt instanceof ConfigureCompleteEvent ||
    evt instanceof RealizeCompleteEvent ||
    evt instanceof PrefetchCompleteEvent) {
    synchronized (waitSync) {
	stateTransitionOK = true;
	waitSync.notifyAll();
    }
} else if (evt instanceof ResourceUnavailableEvent) {
    synchronized (waitSync) {
	stateTransitionOK = false;
	waitSync.notifyAll();
    }
} else if (evt instanceof EndOfMediaEvent) {
    p.setMediaTime(new Time(0));
    //p.start();
    //p.close();
    //System.exit(0);
} else if (evt instanceof SizeChangeEvent) {
}
   }
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:26,代码来源:Seek.java


示例2: controllerUpdate

import javax.media.ResourceUnavailableEvent; //导入依赖的package包/类
/**
    * Controller Listener.
    */
   public void controllerUpdate(ControllerEvent evt) {

if (evt instanceof ConfigureCompleteEvent ||
    evt instanceof RealizeCompleteEvent ||
    evt instanceof PrefetchCompleteEvent) {
    synchronized (waitSync) {
	stateTransitionOK = true;
	waitSync.notifyAll();
    }
} else if (evt instanceof ResourceUnavailableEvent) {
    synchronized (waitSync) {
	stateTransitionOK = false;
	waitSync.notifyAll();
    }
} else if (evt instanceof EndOfMediaEvent) {
    evt.getSourceController().stop();
    evt.getSourceController().close();
}
   }
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:23,代码来源:JpegImagesToMovie.java


示例3: controllerUpdate

import javax.media.ResourceUnavailableEvent; //导入依赖的package包/类
/**
    * Controller Listener.
    */
   public void controllerUpdate(ControllerEvent evt) {

if (evt instanceof ConfigureCompleteEvent ||
    evt instanceof RealizeCompleteEvent ||
    evt instanceof PrefetchCompleteEvent) {
    synchronized (waitSync) {
	stateTransitionOK = true;
	waitSync.notifyAll();
    }
} else if (evt instanceof ResourceUnavailableEvent) {
    synchronized (waitSync) {
	stateTransitionOK = false;
	waitSync.notifyAll();
    }
} else if (evt instanceof EndOfMediaEvent) {
    p.close();
    System.exit(0);
}
   }
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:23,代码来源:FrameAccess.java


示例4: controllerUpdate

import javax.media.ResourceUnavailableEvent; //导入依赖的package包/类
/**
    * Controller Listener.
    */
   public void controllerUpdate(ControllerEvent evt) {

if (evt instanceof ConfigureCompleteEvent ||
    evt instanceof RealizeCompleteEvent ||
    evt instanceof PrefetchCompleteEvent) {
    synchronized (waitSync) {
	stateTransitionOK = true;
	waitSync.notifyAll();
    }
} else if (evt instanceof ResourceUnavailableEvent) {
    synchronized (waitSync) {
	stateTransitionOK = false;
	waitSync.notifyAll();
    }
} else if (evt instanceof EndOfMediaEvent) {
    p.close();
    //System.exit(0);
} else if (evt instanceof SizeChangeEvent) {
}
   }
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:24,代码来源:Clone.java


示例5: controllerUpdate

import javax.media.ResourceUnavailableEvent; //导入依赖的package包/类
/**
    * Controller Listener.
    */
   public void controllerUpdate(ControllerEvent evt) {

if (evt instanceof ConfigureCompleteEvent ||
    evt instanceof RealizeCompleteEvent ||
    evt instanceof PrefetchCompleteEvent) {
    synchronized (waitSync) {
	stateTransitionOK = true;
	waitSync.notifyAll();
    }
} else if (evt instanceof ResourceUnavailableEvent) {
    synchronized (waitSync) {
	stateTransitionOK = false;
	waitSync.notifyAll();
    }
} else if (evt instanceof EndOfMediaEvent) {
    p.close();
} else if (evt instanceof SizeChangeEvent) {
}
   }
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:23,代码来源:DataSourceReader.java


示例6: controllerUpdate

import javax.media.ResourceUnavailableEvent; //导入依赖的package包/类
/**
 * Controller Listener.
 */
public void controllerUpdate(ControllerEvent evt) {

	if (evt instanceof ConfigureCompleteEvent
			|| evt instanceof RealizeCompleteEvent
			|| evt instanceof PrefetchCompleteEvent) {
		synchronized (waitSync) {
			stateTransitionOK = true;
			waitSync.notifyAll();
		}
	} else if (evt instanceof ResourceUnavailableEvent) {
		synchronized (waitSync) {
			stateTransitionOK = false;
			waitSync.notifyAll();
		}
	} else if (evt instanceof EndOfMediaEvent) {
		processor.setMediaTime(Processor.RESET);
		processor.start();
		//processor.close();
		//System.exit(0);
	}
}
 
开发者ID:voxoid0,项目名称:java-motion-tracking,代码行数:25,代码来源:AbstractProcessingCamera.java


示例7: controllerUpdate

import javax.media.ResourceUnavailableEvent; //导入依赖的package包/类
public void controllerUpdate(ControllerEvent evt) {

      if (evt instanceof ConfigureCompleteEvent
            || evt instanceof RealizeCompleteEvent
            || evt instanceof PrefetchCompleteEvent) {
         synchronized (waitSync) {
            stateTransitionOK = true;
            waitSync.notifyAll();
         }
      } else if (evt instanceof ResourceUnavailableEvent) {
         synchronized (waitSync) {
            stateTransitionOK = false;
            waitSync.notifyAll();
         }
      } else if (evt instanceof EndOfMediaEvent) {
         evt.getSourceController().stop();
         evt.getSourceController().close();
         finished = true;
      }
   }
 
开发者ID:openwarrior,项目名称:java-screen-recorder,代码行数:21,代码来源:RecordingConverter.java


示例8: doRealize

import javax.media.ResourceUnavailableEvent; //导入依赖的package包/类
/**
 *  Realize player and all of its managed Controllers.
 *  Subclasses should override doPlayerRealize() to do the
 *  actual work to transition the Controller.
 *  <p>
 *  This method should not be called directly.  Instead, call
 *  realize().
 */
public final boolean doRealize() {

    try {
        //  Initialte the data transfer
        source.start();
    }
    
    catch(IOException e) {
        postEvent(
            new ResourceUnavailableEvent(this,
                "Could not start DataSource") );
        return false;
    }

    //  No multi-Controller management is needed here because
    //  all Controllers are guaranteed to be Realized when
    //  they are added to this Player.  Furthermore, the
    //  Player itself must be realized before any Controllers
    //  are added.

    if(! doPlayerRealize() ) {
        return false;
    }

    //  Now that the Player is realized, getDuration() may
    //  be more accurate.
    updateDuration();

    return true;
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:39,代码来源:AbstractPlayer.java


示例9: controllerUpdate

import javax.media.ResourceUnavailableEvent; //导入依赖的package包/类
public void controllerUpdate(ControllerEvent evt)
// respond to events
{
	if (evt instanceof ResourceUnavailableEvent) {
		failed = false;
		synchronized (this) {
			this.notifyAll();
		}
	} else if (evt instanceof EndOfMediaEvent) { // make the movie loop
		log.info("loop the movie");
		//jmfplayer.setMediaTime(new Time(0));
		//jmfplayer.start();
		restart();
	}
}
 
开发者ID:ajclarkson,项目名称:ARMonkeyKit,代码行数:16,代码来源:JMFVideoImage.java


示例10: doPrefetchAction

import javax.media.ResourceUnavailableEvent; //导入依赖的package包/类
private boolean doPrefetchAction() {
    switch (state) {
    case Unrealized:
    case Realizing:
        if (!doRealizeAction())
            return false;
        /* fall thru */
    case Realized:
        state = Prefetching;
        notifyListeners(new TransitionEvent(this, Realized, Prefetching, Prefetched));
        /* fall thru */
    case Prefetching:

        if (!PlayerManager.getInstance().allocateResource(this)) {
            notifyListeners(new ResourceUnavailableEvent(this));
            return false;
        }
        ControllerErrorEvent error = doPrefetch();
        if (error == null) {
            state = Prefetched;
            notifyListeners(new PrefetchCompleteEvent(this, Prefetching, Prefetched, Prefetched));
        } else {
            notifyListeners(error);
            return false;
        }
        break;
    default:
        notifyListeners(new PrefetchCompleteEvent(this, state, state, state));
        break;
    }
    return true;
}
 
开发者ID:ShiftMediaProject,项目名称:libbluray,代码行数:33,代码来源:BDHandler.java



注:本文中的javax.media.ResourceUnavailableEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java ANDROID类代码示例发布时间:2022-05-22
下一篇:
Java XStream2类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap