本文整理汇总了Java中javax.media.PrefetchCompleteEvent类的典型用法代码示例。如果您正苦于以下问题:Java PrefetchCompleteEvent类的具体用法?Java PrefetchCompleteEvent怎么用?Java PrefetchCompleteEvent使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PrefetchCompleteEvent类属于javax.media包,在下文中一共展示了PrefetchCompleteEvent类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: controllerUpdate
import javax.media.PrefetchCompleteEvent; //导入依赖的package包/类
public void controllerUpdate(ControllerEvent event) {
if (event instanceof RealizeCompleteEvent) {
_player.prefetch();
} else if (event instanceof PrefetchCompleteEvent) {
// get controls
_framePositioningControl = (FramePositioningControl) _player
.getControl("javax.media.control.FramePositioningControl");
if (_framePositioningControl == null) {
System.out.println("Error: FramePositioningControl!");
setState(ERROR);
return;
}
_frameGrabbingControl = (FrameGrabbingControl) _player
.getControl("javax.media.control.FrameGrabbingControl");
if (_frameGrabbingControl == null) {
System.out.println("Error: FrameGrabbingControl!");
setState(ERROR);
return;
}
setState(READY);
}
}
开发者ID:leonardoraele,项目名称:pgm-editor,代码行数:23,代码来源:VideoSource.java
示例2: controllerUpdate
import javax.media.PrefetchCompleteEvent; //导入依赖的package包/类
/**
* If the progress slider is operational, the
* controllerUpdate method starts and stops its
* time based on Start- and StopEvents from the Controller.
* If response to MediaTimeSetEvent, the value of the
* progress slider is explicitly set.
* <p>
* The controllerUpdate method is also responsible for
* setting the operational state of the Control based
* on duration value. This is done in response to first
* PrefetchCompleteEvent.
*/
public void controllerUpdate(ControllerEvent event) {
if (isOperational()) {
if (event instanceof StartEvent ||
event instanceof RestartingEvent) {
controlTimer.start();
} else if (event instanceof StopEvent ||
event instanceof ControllerErrorEvent) {
controlTimer.stop();
} else if (event instanceof MediaTimeSetEvent) {
// This catches any direct setting of media time
// by application. Additionally, it catches
// setMediaTime(0) by StandardStopControl.
setValue(getTime());
}
} else {
if ( firstPrefetch && event instanceof PrefetchCompleteEvent) {
firstPrefetch = false;
init();
//SwingUtilities.invokeLater(new EnableComponentThread());
}
}
}
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:35,代码来源:StandardProgressControl.java
示例3: controllerUpdate
import javax.media.PrefetchCompleteEvent; //导入依赖的package包/类
public synchronized void controllerUpdate(ControllerEvent ce) {
if (ce instanceof RealizeCompleteEvent) {
realized = true;
} else if (ce instanceof ConfigureCompleteEvent) {
configured = true;
} else if (ce instanceof PrefetchCompleteEvent) {
prefetched = true;
} else if (ce instanceof EndOfMediaEvent) {
//System.out.println("EndOfMediaEvent: " + ce);
eom = true;
} else if (ce instanceof ControllerErrorEvent) {
System.err.println("ControllerErrorEvent: " + ce);
failed = true;
} else if (ce instanceof ControllerClosedEvent) {
//System.out.println("ControllerClosedEvent: " + ce);
closed = true;
} else {
return;
}
notifyAll();
}
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:22,代码来源:StateHelper.java
示例4: controllerUpdate
import javax.media.PrefetchCompleteEvent; //导入依赖的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
示例5: controllerUpdate
import javax.media.PrefetchCompleteEvent; //导入依赖的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
示例6: controllerUpdate
import javax.media.PrefetchCompleteEvent; //导入依赖的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
示例7: controllerUpdate
import javax.media.PrefetchCompleteEvent; //导入依赖的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
示例8: controllerUpdate
import javax.media.PrefetchCompleteEvent; //导入依赖的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
示例9: controllerUpdate
import javax.media.PrefetchCompleteEvent; //导入依赖的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
示例10: controllerUpdate
import javax.media.PrefetchCompleteEvent; //导入依赖的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
示例11: controllerUpdate
import javax.media.PrefetchCompleteEvent; //导入依赖的package包/类
public void controllerUpdate(ControllerEvent ce) {
if (ce instanceof RealizeCompleteEvent) {
mplayer.prefetch();
} else if (ce instanceof PrefetchCompleteEvent) {
if (visual != null)
return;
if ((visual = mplayer.getVisualComponent()) != null) {
Dimension size = visual.getPreferredSize();
videoWidth = size.width;
videoHeight = size.height;
getContentPane().add("Center", visual);
} else
videoWidth = 320;
if ((control = mplayer.getControlPanelComponent()) != null) {
controlHeight = control.getPreferredSize().height;
getContentPane().add("South", control);
}
setSize(videoWidth + insetWidth,
videoHeight + controlHeight + insetHeight);
validate();
mplayer.start();
} else if (ce instanceof EndOfMediaEvent) {
mplayer.setMediaTime(new Time(0));
mplayer.start();
}
}
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:28,代码来源:MDIApp.java
示例12: doPrefetchAction
import javax.media.PrefetchCompleteEvent; //导入依赖的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
示例13: controllerUpdate
import javax.media.PrefetchCompleteEvent; //导入依赖的package包/类
public void controllerUpdate(ControllerEvent ce) {
if (ce instanceof RealizeCompleteEvent) {
if (visual != null)
return;
beginTime = new Time(0);
duration = endTime = player.getDuration();
if (selPanel != null) {
selPanel.setStartTimeMillis(
beginTime.getNanoseconds() / 1000000);
selPanel.setStopTimeMillis(
endTime.getNanoseconds() / 1000000);
}
updateLabel();
player.prefetch();
} else if (ce instanceof PrefetchCompleteEvent) {
if (visual != null)
return;
controlHeight = 0;
if ((visual = player.getVisualComponent()) != null) {
Dimension size = visual.getPreferredSize();
visual.setSize(size);
videoPanel.add("Center", visual);
if ((control = player.getControlPanelComponent()) != null) {
controlHeight = control.getPreferredSize().height;
videoPanel.add("South", control);
videoPanel.setSize(size.width, size.height + controlHeight);
Dimension cSize = centerPanel.getSize();
Dimension vSize = videoPanel.getSize();
videoPanel.setLocation((cSize.width - vSize.width) / 2,
(cSize.height - vSize.height) / 2);
}
videoPanel.invalidate();
validate();
}
player.start();
} else if (ce instanceof EndOfMediaEvent ||
ce instanceof StopAtTimeEvent) {
player.setMediaTime(beginTime);
player.setStopTime(endTime);
player.start();
}
}
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:43,代码来源:VideoCutPanel.java
示例14: postPrefetchCompleteEvent
import javax.media.PrefetchCompleteEvent; //导入依赖的package包/类
/**
* Post a PrefetchCompleteEvent to the Media Event Queue.
* Automatically fill in the Previous State, Current State,
* and Target State properties of the PrefetchCompleteEvent.
*/
protected void postPrefetchCompleteEvent() {
postEvent( new PrefetchCompleteEvent(
this, previousState, currentState, targetState) );
}
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:10,代码来源:AbstractController.java
注:本文中的javax.media.PrefetchCompleteEvent类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论