Examples of TimeRecord


Examples of org.apache.xindice.core.meta.TimeRecord

   }

   // methods for recording the times when meta data is enabled.
   public synchronized void recordTime( String path, long created, long modified )
   {
      TimeRecord rec = (TimeRecord)timestamps.get(path);
      if( null == rec ) {
         rec = new TimeRecord(created, modified);
         timestamps.put(path, rec);
      }
      else
      {
         if( created > 0 )
            rec.setCreatedTime(created);
         if( modified > 0 )
            rec.setModifiedTime(modified);
      }
   }
View Full Code Here

Examples of org.apache.xindice.core.meta.TimeRecord

      timestamps.remove(path);
   }

   public synchronized TimeRecord getTime( String path )
   {
      TimeRecord rec = (TimeRecord)timestamps.get(path);
      return rec;
   }
View Full Code Here

Examples of quicktime.std.clocks.TimeRecord

  {
    logger.info("Handler.doPlayerSetMediaTime (sec): " + t.getSeconds());
   
    try
    {
      m.setTime(new TimeRecord(m.getTimeScale(), (long) (t.getSeconds() * m.getTimeScale())));
    } catch (StdQTException e)
    {
      // TODO handle
      logger.log(Level.WARNING, "" + e, e);
    } catch (QTException e)
View Full Code Here

Examples of quicktime.std.clocks.TimeRecord

      else return 0;
  }

  void setTime (long t) throws QTException {
     if (mc != null)
       mc.goToTime(new TimeRecord (mc.getTimeScale(),t));
  }
View Full Code Here

Examples of quicktime.std.clocks.TimeRecord

    
     // need code to close and open another movie;
  void openFromPath (String url, long startTime) throws QTException {
     if (currentURL != null) {
       if (currentURL.equals(url)) {
         mc.goToTime(new TimeRecord (mc.getTimeScale(), startTime))// set start-time
         return;
       }
       System.out.println("Falling through url check");
     }
    saveMovie sc = (saveMovie) drawers.get(url);
    if (sc != null) {
      if (currentComponent != null) {
        remove (currentComponent.asComponent());
      }
      mc = sc.mc;
      QTComponent qtc = QTFactory.makeQTComponent(mc);
      currentComponent = qtc;
      mc.goToTime(new TimeRecord (mc.getTimeScale(), startTime));
      add (currentComponent.asComponent(),
         BorderLayout.CENTER);
      //mc.validate();
      //validate();
      currentURL = url;
      currentMovie = sc.movie;
                             
            //invalidate();
            //repaint();
      System.out.println("fetching from cache");
    }
    else
   
       try {
            QTFile qtf = new QTFile (url);
            OpenMovieFile omf = OpenMovieFile.asRead (qtf);
            currentMovie = Movie.fromFile (omf);
            mc = new MovieController (currentMovie);
            mc.enableEditing(false);
      mc.goToTime(new TimeRecord (mc.getTimeScale(), startTime));
            if (currentComponent != null)
                remove (currentComponent.asComponent());
            currentComponent = QTFactory.makeQTComponent(mc);
            add (currentComponent.asComponent(),
                              BorderLayout.CENTER);
View Full Code Here

Examples of quicktime.std.clocks.TimeRecord

        // xp = (int) (Math.pow((double)xp,1.414214) * r);
         xp = (int) (Math.pow((double)xp,1.414214) * r);
         if (t-xp < 0) xp= (int) t;
         MovieController mc = getMovieController();
         if (mc != null) {
          TimeRecord ts = new TimeRecord(mc.getTimeScale(),t-xp);
          TimeRecord te = new TimeRecord(mc.getTimeScale(),mc.getCurrentTime()-(t-xp));
          mc.setSelectionBegin(ts);
          mc.setSelectionDuration(te);
          mc.setPlaySelection(true);
         }
         myPresenter.setTime(t-xp);
View Full Code Here

Examples of quicktime.std.clocks.TimeRecord

     try {
      movieURL = (String) attributes.get("movie");
      int scale = Integer.parseInt((String) attributes.get("scale"));
      long selectionTime = Long.parseLong((String) attributes.get("selectionTime"));
      long dur = Long.parseLong((String) attributes.get("duration"));
      selection = new TimeRecord(scale,selectionTime);
      duration = new TimeRecord(scale,dur);
     } catch (Exception e) {
      System.out.println("Error reading MovieSelection arguments");
      e.printStackTrace();
     }
    }
View Full Code Here

Examples of quicktime.std.clocks.TimeRecord

    }
    if (mc == null) {
     System.out.println("Can't create a moviecontroller for "+movieURL+" in MovieSelection.playMovieSelection()");
    }
    try {
      TimeRecord ts = mc.getSelectionBegin();
      TimeRecord td = mc.getSelectionDuration();
      ts.setValue(selection.getValue());
      ts.setScale(selection.getScale());
      td.setValue(duration.getValue());
      td.setScale(duration.getScale());
     mc.setSelectionBegin(ts);
     mc.setSelectionDuration(td);
     System.out.println("Duration in setMovieSelection: "+td+duration+(td.getValue()-winbase));
    } catch (Exception e) {
     System.out.println("Could not set selection "+selection.toString()+" "+duration.toString()+" in MovieSelection.setMovieSelection()");
    }
   }
View Full Code Here

Examples of quicktime.std.clocks.TimeRecord

      JSlider source = (JSlider) event.getSource();

      // set the time in the movie to the new time indicated by the slider
      try
      {
        this.movie.setTime(new TimeRecord(this.movie.getTimeScale(),
          source.getValue() * this.interval));
      } // try
      catch (Exception e)
      {
        e.printStackTrace();
View Full Code Here

Examples of quicktime.std.clocks.TimeRecord

      // if no visual track, make something up to avoid exceptions
      if (visualTrack == null)
      {
        return 10;
      } // if (visualTrack == null)
      mov.setTime(new TimeRecord(mov.getTimeScale(), 0));

      // get the distance to the next interesting time
      time = visualTrack.getNextInterestingTime(
        StdQTConstants.nextTimeMediaSample, mov.getTime(), 1);
    } // try
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.