quicktime.app.time
Class TaskAllMovies

java.lang.Object
  |
  +--quicktime.app.time.Tasking
        |
        +--quicktime.app.time.TaskAllMovies
All Implemented Interfaces:
Taskable

public class TaskAllMovies
extends Tasking

QuickTime's MoviesTask call can be called in two ways.

This class creates a single Taskable object that will use this second alternative, making the single Movie.taskAll call and allowing the MovieToolbox to task all of the exisiting and active Movies and TimeBases in a single native call.

Classes in the quicktime.app packages (notably MoviePlayer, Timer, MoviePresenter) default behaviour is not to task themselves individually but to register with the TaskAllMovies class that they have a requirement for tasking. The TaskAllMovies call then has a single thread and taskable object (itself) that calls the Moive.taskAll to let QuickTime's MovieTask call do the required tasks for any of these active Movies and TimeBases.

An application can retrieve the Tasking object and set its default thread to a TaskThread object of its choice.

See Also:
MoviePlayer, Timer, MoviePresenter

Fields inherited from interface quicktime.app.time.Taskable
tasker
 
Method Summary
static void addMovieAndStart()
          Informs the TaskAllMovies object that another Movie or TimeBase is active and would require tasking.
static int currentMovieCount()
          Returns the current number of active Movies and/or TimeBases that the TaskAllMovies object is registered to count.
static TaskAllMovies get()
          Returns the TaskAllMovies Tasking object that is used to call Movie.taskAll.
static void removeMovie()
          Informs the TaskAllMovies object that a Movie or TimeBase that was active is no longer.
 void task()
          Calls Movie.taskAll to task all active Movies and TimeBases.
 
Methods inherited from class quicktime.app.time.Tasking
addedToTasker, getDefaultTasker, getTasker, removedFromTasker, setDefaultTasker, startTasking, stopTasking
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public static TaskAllMovies get()
Returns the TaskAllMovies Tasking object that is used to call Movie.taskAll.
Returns:
a TaskAllMovies object

addMovieAndStart

public static void addMovieAndStart()
Informs the TaskAllMovies object that another Movie or TimeBase is active and would require tasking. If this is the only active Movie or TimeBase the TaskAllMovies' TaskThread will be started.

removeMovie

public static void removeMovie()
Informs the TaskAllMovies object that a Movie or TimeBase that was active is no longer. If this was the only active Movie or TimeBase the TaskAllMovies' TaskThread will be stopped.

currentMovieCount

public static int currentMovieCount()
Returns the current number of active Movies and/or TimeBases that the TaskAllMovies object is registered to count.
Returns:
an int

task

public void task()
          throws QTException
Calls Movie.taskAll to task all active Movies and TimeBases.