ch.claudio.qtedit
Class Timing

java.lang.Object
  extended by ch.claudio.qtedit.Timing

public class Timing
extends java.lang.Object

Collect the marks lists for all movies. For set of marks maps them to individual time points of each movie.

Author:
claudio

Method Summary
static void addMark(java.lang.String mark)
          Add a new mark to all movies, setting it to the actual location of the movie.
static void adjustMark(int movie, int time)
          Adjust the time of the active mark to the actual time of the movie.
static java.lang.String[] getMarkNames()
          Return the name of all marks sorted by time.
static int getOffset(int movie1, int movie2, int time)
          Compute the offset existing between two movies.Returns the offset to be added to time to get the same point in the second movie
static int getOffsetAtMark(int movie, java.lang.String mark)
          Return the offset of the movie versus the reference movie at the specified mark.
static int getReferenceMovie()
           
static int getReferenceTime(java.lang.String mark)
          Set the position of all movies to the named mark.
static int movieToReference(int movie, int time)
          Given a time correct in the scale of the specified movie, transform it into a time correct for the reference scale.
static int referenceToMovie(int movie, int time)
          Given a time correct in the scale of
static void saveMarks()
          Save all marks lists.
static void setActiveMark(java.lang.String mark)
          Set the mark which is currently operated on.
static void setOffsetAtMark(int movie, java.lang.String mark, int offset)
          Return the offset of the movie versus the reference movie at the specified mark.
static void setPosition(java.lang.String mark)
          Set the position of all movies to the named mark.
static void setPreview(Preview pre)
          To set the preview so this calls can access the movies.
static void setReferenceMovie(int referenceMovie)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getReferenceMovie

public static int getReferenceMovie()
Returns:
Returns the referenceMovie.

setReferenceMovie

public static void setReferenceMovie(int referenceMovie)
Parameters:
referenceMovie - The referenceMovie to set.

setActiveMark

public static void setActiveMark(java.lang.String mark)
Set the mark which is currently operated on.

Parameters:
mark - Mark name

setPreview

public static void setPreview(Preview pre)
To set the preview so this calls can access the movies.

Parameters:
pre - The preview to set.

getOffset

public static int getOffset(int movie1,
                            int movie2,
                            int time)
Compute the offset existing between two movies.Returns the offset to be added to time to get the same point in the second movie

Parameters:
movie1 - Index of first movie
movie2 - Index of second movie
time - Time in scale of first movie
Returns:
Offset between the movies

movieToReference

public static int movieToReference(int movie,
                                   int time)
Given a time correct in the scale of the specified movie, transform it into a time correct for the reference scale.

Parameters:
movie - Movie from which time has to be converted-
time - Time in the scale of the given movie.
Returns:
Time in the scale of the reference movie.

referenceToMovie

public static int referenceToMovie(int movie,
                                   int time)
Given a time correct in the scale of

Parameters:
movie -
time -
Returns:
time

getMarkNames

public static java.lang.String[] getMarkNames()
Return the name of all marks sorted by time.

Returns:
String array with the names

setPosition

public static void setPosition(java.lang.String mark)
Set the position of all movies to the named mark.

Parameters:
mark -

getReferenceTime

public static int getReferenceTime(java.lang.String mark)
Set the position of all movies to the named mark.

Parameters:
mark -

saveMarks

public static void saveMarks()
Save all marks lists.


addMark

public static void addMark(java.lang.String mark)
Add a new mark to all movies, setting it to the actual location of the movie.

Parameters:
mark - Name of the mark

adjustMark

public static void adjustMark(int movie,
                              int time)
Adjust the time of the active mark to the actual time of the movie.

Parameters:
movie -
time -

getOffsetAtMark

public static int getOffsetAtMark(int movie,
                                  java.lang.String mark)
Return the offset of the movie versus the reference movie at the specified mark.

Parameters:
movie - Movie number.
mark - Makr name.
Returns:
time difference

setOffsetAtMark

public static void setOffsetAtMark(int movie,
                                   java.lang.String mark,
                                   int offset)
Return the offset of the movie versus the reference movie at the specified mark.

Parameters:
movie - Movie number.
mark - Makr name.