1 /* 2 * This file is part of libbluray 3 * Copyright (C) 2010 William Hahne 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library. If not, see 17 * <http://www.gnu.org/licenses/>. 18 */ 19 20 package javax.media; 21 22 public interface Clock { setTimeBase(TimeBase master)23 public void setTimeBase(TimeBase master) 24 throws IncompatibleTimeBaseException; 25 syncStart(Time at)26 public void syncStart(Time at); 27 stop()28 public void stop(); 29 setStopTime(Time stopTime)30 public void setStopTime(Time stopTime); 31 getStopTime()32 public Time getStopTime(); 33 setMediaTime(Time now)34 public void setMediaTime(Time now); 35 getMediaTime()36 public Time getMediaTime(); 37 getMediaNanoseconds()38 public long getMediaNanoseconds(); 39 getSyncTime()40 public Time getSyncTime(); 41 getTimeBase()42 public TimeBase getTimeBase(); 43 mapToTimeBase(Time t)44 public Time mapToTimeBase(Time t) throws ClockStoppedException; 45 getRate()46 public float getRate(); 47 setRate(float factor)48 public float setRate(float factor); 49 50 public static final Time RESET = new Time(Long.MAX_VALUE); 51 } 52