Package ejmf.toolkit.util

Examples of ejmf.toolkit.util.StateWaiter


        * Given an array of MediaLocators, create Players and 
  * add them to display Panel.
  */
    private void createAndDisplayPlayers(MediaLocator[] mls)
      throws NoPlayerException, IOException {
  StateWaiter  waiter;

  setLayout(createLayout(mls.length));

  players = new Player[mls.length];
  for (int i = 0; i < mls.length; i++) {
      players[i] = Manager.createPlayer(mls[i]);
      waiter = new StateWaiter(players[i]);
      waiter.blockingRealize();

      displayPlayer(players[i], mls[i]);

      waiter.blockingPrefetch();
  }
    }
View Full Code Here


        //  Create a Vector of Players
        for(int i = 0; i < args.length; i++) {
            try {
                Player p = Manager.createPlayer(
                    Utility.appArgToMediaLocator(args[i]) );
                new StateWaiter(p).blockingRealize();
                v.addElement(p);
            } catch(Exception e) {
                System.out.println( "Could not create Player for " + args[i]);
    e.printStackTrace();
            }
View Full Code Here

                    players[i].setTimeBase(masterTB);
                } catch(IncompatibleTimeBaseException e) {
                    System.out.println( "Incompatible TimeBase, skipping..." );
                }
            }
      new StateWaiter(players[i]).blockingPrefetch();
        }

        //  Show each Player's Visual Component
        for(int i = 0; i < players.length; i++) {
            frame = new JFrame();
View Full Code Here

        if (state == Controller.Started)
      return;

        if (state < Controller.Prefetched) {
      StateWaiter w = new StateWaiter(controller);
      w.blockingPrefetch();
        }

        TimeBase tb = controller.getTimeBase();
                  controller.syncStart(tb.getTime());
          }
View Full Code Here

    public void begin() {
        playerpanel = getPlayerPanel();
        player = playerpanel.getPlayer();

        StateWaiter waiter = new StateWaiter(player);
        waiter.blockingRealize();

        // Add ourselves as a listener to the player's events
        player.addControllerListener(this);

        loadSlaves();
View Full Code Here

                //  Create the Slave Player
                slave = Manager.createPlayer(locator);

                //  Realize the slave
                new StateWaiter(slave).blockingRealize();

                //  Set the slave's TimeBase
                player.addController(slave);

                // Add ourselves as a listener to the slave's events
View Full Code Here

        player = playerpanel.getPlayer();

        // Add ourselves as a listener to the player's events
        player.addControllerListener(this);

        StateWaiter waiter = new StateWaiter(player);

        // Wait for the Player to realize, then add the components
        waiter.blockingRealize();

        // Run Swing code on Swing Event thread
        Runnable r = new Runnable() {
            public void run() {
                // Add Control Panel Component
View Full Code Here

  TrackSlider ts = getTrackSlider();
  if (ts != null) {
     ts.setEnabled(true);
  }
  // Set the player up so that all info can be accessed.
  StateWaiter sw = new StateWaiter(player);
  sw.blockingPrefetch();

  duration = player.getDuration();
  if (duration == Duration.DURATION_UNKNOWN ||
      duration == Duration.DURATION_UNBOUNDED) {
        playingTime = -1;
View Full Code Here

TOP

Related Classes of ejmf.toolkit.util.StateWaiter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.