当前位置: 首页>>代码示例>>Java>>正文


Java RealizeCompleteEvent类代码示例

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


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

示例1: controllerUpdate

import javax.media.RealizeCompleteEvent; //导入依赖的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.RealizeCompleteEvent; //导入依赖的package包/类
/**
 * This controllerUpdate function must be defined in order to
 * implement a ControllerListener interface. This 
 * function will be called whenever there is a media event.
 *
 * @param          event
 *                 the media event
 */
public synchronized void controllerUpdate(ControllerEvent event) {

    if( event instanceof RealizeCompleteEvent ) {

        Runnable r = new Runnable() {
            public void run() {
                // Add Control Panel Component
                playerpanel.addControlComponent();

                // Add Visual Component
                playerpanel.addVisualComponent();
            }
        };

        SwingUtilities.invokeLater(r);
    } else

    if (event instanceof EndOfMediaEvent) {
        // End of the media -- rewind
        player.setMediaTime(new Time(0));
    }
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:31,代码来源:GenericPlayer.java

示例3: controllerUpdate

import javax.media.RealizeCompleteEvent; //导入依赖的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.RealizeCompleteEvent; //导入依赖的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.RealizeCompleteEvent; //导入依赖的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.RealizeCompleteEvent; //导入依赖的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.RealizeCompleteEvent; //导入依赖的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.RealizeCompleteEvent; //导入依赖的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.RealizeCompleteEvent; //导入依赖的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.RealizeCompleteEvent; //导入依赖的package包/类
/** Called by JMF when the Player has something to tell us about. */
public synchronized void controllerUpdate(ControllerEvent event) {
    // System.out.println("controllerUpdate(" + event + ")");
    if (event instanceof RealizeCompleteEvent) {
        if ((visualComponent = thePlayer.getVisualComponent()) != null)
                cp.add(BorderLayout.CENTER, visualComponent);
        if ((controlComponent =
            thePlayer.getControlPanelComponent()) != null)
                cp.add(BorderLayout.SOUTH, controlComponent);
        // resize the main window
        if (parentFrame != null) {
            parentFrame.pack();
            parentFrame.setTitle(mediaName);
        }
    }
}
 
开发者ID:shashanksingh28,项目名称:code-similarity,代码行数:17,代码来源:JMFPlayer.java

示例11: controllerUpdate

import javax.media.RealizeCompleteEvent; //导入依赖的package包/类
/**
 * ControllerListener for the Players.
 */
public synchronized void controllerUpdate(ControllerEvent ce) {

    Player p = (Player) ce.getSourceController();

    if (p == null)
        return;

    // Get this when the internal players are realized.
    if (ce instanceof RealizeCompleteEvent) {
        p.start();
    }

    if (ce instanceof ControllerErrorEvent) {
        p.removeControllerListener(this);
        LOGGER.severe("Receiver internal error: " + ce);
    }

}
 
开发者ID:TTalkIM,项目名称:Smack,代码行数:22,代码来源:AudioReceiver.java

示例12: controllerUpdate

import javax.media.RealizeCompleteEvent; //导入依赖的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

示例13: doRealizeAction

import javax.media.RealizeCompleteEvent; //导入依赖的package包/类
private boolean doRealizeAction() {
    switch (state) {
    case Unrealized:
        state = Realizing;
        notifyListeners(new TransitionEvent(this, Unrealized, Realizing, Realized));
        /* fall thru */
    case Realizing:
        ControllerErrorEvent error = doRealize();
        if (error == null) {
            state = Realized;
            notifyListeners(new RealizeCompleteEvent(this, Realizing, Realized, Realized));
        } else {
            notifyListeners(error);
            return false;
        }
        break;
    default:
        notifyListeners(new RealizeCompleteEvent(this, state, state, state));
        break;
    }
    return true;
}
 
开发者ID:ShiftMediaProject,项目名称:libbluray,代码行数:23,代码来源:BDHandler.java

示例14: controllerUpdate

import javax.media.RealizeCompleteEvent; //导入依赖的package包/类
/**
 * ControllerListener for the Players.
 */
public synchronized void controllerUpdate(ControllerEvent ce) {

    Player p = (Player) ce.getSourceController();

    if (p == null)
        return;

    // Get this when the internal players are realized.
    if (ce instanceof RealizeCompleteEvent) {
        p.start();
    }

    if (ce instanceof ControllerErrorEvent) {
        p.removeControllerListener(this);
        LOGGER.error("Receiver internal error: " + ce);
    }

}
 
开发者ID:bejayoharen,项目名称:java-bells,代码行数:22,代码来源:AudioReceiver.java

示例15: controllerUpdate

import javax.media.RealizeCompleteEvent; //导入依赖的package包/类
public void controllerUpdate(ControllerEvent event) {
    Player p = (Player) event.getSourceController();
    if (event instanceof EndOfMediaEvent) {
    	    p.setMediaTime(new Time(0));
           }
    else if (event instanceof RealizeCompleteEvent) {
	cpc = p.getControlPanelComponent();
	if (cpc != null)
  	    SwingUtilities.invokeLater(new AddComponentsThread(cpc));
    }
}
 
开发者ID:champtar,项目名称:fmj-sourceforge-mirror,代码行数:12,代码来源:AudioControlListener.java


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