Package javax.media

Examples of javax.media.ClockStartedError


    public final synchronized void deallocate() {
        int state;

        //  Enforce state prereq
        if( currentState == Started ) {
            throw new ClockStartedError(
                "deallocate() cannot be called on a started Controller");
        }

        //  Kill any forward-transitioning thread
        threadqueue.stopThreads();
View Full Code Here


     */
    public synchronized void setTimeBase(TimeBase timebase)
        throws IncompatibleTimeBaseException
    {
        if(isStarted) {
            throw new ClockStartedError(
                "Cannot set time base on a Started Clock");
        }

        if( timebase == null ) {
            this.timebase = systemtimebase;
View Full Code Here

     * @exception  ClockStartedError
     *             If the Clock is Started.
     */
    public synchronized void setMediaTime(Time t) {
        if(isStarted) {
            throw new ClockStartedError(
                "Cannot set media time on a Started Clock");
        }

        mediaStartTime = t;
    }
View Full Code Here

     * @return     The actual rate set.
     *
     */
    public synchronized float setRate(float rate) {
        if(isStarted) {
            throw new ClockStartedError(
                "Cannot set rate on a Started Clock");
        }

        if( rate != 0.0F ) {
            this.rate = rate;
View Full Code Here

     */
    public synchronized void syncStart(Time t) {

        //  Enforce state prereqs
        if(isStarted) {
            throw new ClockStartedError(
                "syncStart() cannot be called on a started Clock");
        }

        long now = getTimeBase().getNanoseconds();
        long start = t.getNanoseconds();
View Full Code Here

    {
        if (locator == null)
            throw new NullPointerException();
       
        if (player.getState() == Handler.Started)
            throw new ClockStartedError();
       
        if (!Libbluray.selectPlaylist(locator.getPlayListId()))
            throw new InvalidPlayListException();
       
        player.ti = Libbluray.getPlaylistInfo(locator.getPlayListId());
View Full Code Here

    }

    public void deallocate()
    {
        if (state == Started)
            throw new ClockStartedError();
       
        if (state != Unrealized || state != Realized) {
            sendControllerEvent(new DeallocateEvent(this, state, Realized, Realized, currentTime));
        }
    }
View Full Code Here

    public void syncStart(Time at)
    {
        // TODO signal player to actually start playing
        if (state == Started)
            throw new ClockStartedError();
       
        if (state != Prefetched)
            throw new NotPrefetchedError("syncStart");
       
        currentTime = at;
View Full Code Here

    {
        // TODO: again this doesn't really do much right now
        if (state != Started)
            currentTime = now;
        else
            throw new ClockStartedError();
    }
View Full Code Here

    }

    public float setRate(float factor)
    {
        if (state == Started)
            throw new ClockStartedError();
       
        return 1.0f; // TODO: maybe allow changing rate?
    }
View Full Code Here

TOP

Related Classes of javax.media.ClockStartedError

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.