All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class quicktime.std.movies.Track

java.lang.Object
   |
   +----quicktime.QTObject
           |
           +----quicktime.std.movies.Track

public final class Track
extends QTObject
implements QuickTimeLib
The Track class implements the corresponding data structure of the Movie Toolbox. A QuickTime movie may contain several tracks. Each track refers to a media that contains references to the movie data, which may be stored as images or sound on hard disks, floppy disks, compact discs, or other devices. Specifies the track for an operation. Your application obtains a track identifier from such Movie Toolbox functions as NewMovieTrack and GetMovieTrack (described on page 2-151 of Inside Macintosh: QuickTime and page 2-204 of Inside Macintosh: QuickTime, respectively).
You make a new Track object only through addTrack or getTrack methods on a movie object.


Method Index

 o addReference(Track, int)
This method allows you to add a new track reference to a track.
 o copySettings(Track)
This method copies many settings from one track to another, overwriting the destination settings.
 o deleteReference(int, int)
This method allows you to remove a track reference from a track.
 o deleteSegment(int, int)
This method removes a specified segment from a track.
 o fromMedia(Media)
This method allows you to determine the track that uses a specified media.
 o fromMovieImporterDataRef(MovieImporter, DataRef, Movie, Track, int, int)
Determines information revelant to the movie import component.
 o fromMovieImporterFile(MovieImporter, QTFile, Movie, Track, int, int)
Allows the MovieToolbox to import data from a file using the movie import component.
 o fromMovieImporterHandle(MovieImporter, QTHandleRef, Movie, Track, int, int)
Allows the MovieToolbox to import data from a handle using the movie import component.
 o getAlternate()
This method allows your application to determine all the tracks in an alternate group.
 o getBoundsRgn()
This method allows the media to limit the size of the track boundary rectangle.
 o getClipRgn()
This method allows your application to determine the clipping region of a track.
 o getCreationTime()
This method returns a track's creation date.
 o getDataSize(int, int)
This method allows your application to determine the size, in bytes, of the sample data in a segment of a track.
 o getDimensions()
This method allows your application to determine a track's source, or display, rectangle.
 o getDisplayBoundsRgn()
This method allows your application to determine the region a track occupies in a movie's graphics world.
 o getDisplayMatrix()
This method returns the track's display matrix.
 o getDuration()
This method returns the duration of a track.
 o getEditRate(int)
This method returns the rate of the track edit of a specified track at an indicated time.
 o getEnabled()
This method allows your application to determine whether a track is currently enabled.
 o getID()
This method allows your application to determine a track's unique track ID value.
 o getLayer()
This method allows your application to retrieve a track's layer.
 o getLoadSettings()
This method allows you to retrieve a track's preload information.
 o getMatrix()
This method allows your application to retrieve a track's transformation matrix.
 o getModificationTime()
This method returns a track's modification date.
 o getMovie()
This method allows you to determine the movie that contains a specified track.
 o getMovieBoundsRgn()
This method allows your application to determine the region the track occupies in a movie's boundary region.
 o getNextInterestingTime(int, int, float)
This method searches for times of interest in a track.
 o getNextReferenceType(int)
This method allows you to determine all of the track reference types that are defined for a given track.
 o getOffset()
This method allows your application to determine the time difference between the start of a track and the start of the movie that contains the track.
 o getPict(int)
This method creates a QuickDraw picture from the specified track at the specified time.
 o getReference(int, int)
This method allows you to retrieve the track identifier contained in an existing track reference.
 o getReferenceCount(int)
This method allows you to determine how many track references of a given type exist for a track.
 o getSegmentDisplayBoundsRgn(int, int)
This method allows your application to determine the region a track occupies in a movie's graphics world during a specified segment.
 o getSoundLocalizationSettings()
This method returns the sound localization settings for the track.
 o getStatus()
This method returns the value of the last error the media encountered while playing a specified track.
 o getUsage()
This method allows your application to determine whether a track is used in a movie, its preview, its poster, or a combination of these.
 o getUserData()
This method allows your application to obtain access to a track's user data list.
 o getVolume()
This method returns a track's current volume setting.
 o insertEmptySegment(int, int)
This method adds an empty segment to a track.
 o insertMedia(int, int, int, float)
This method inserts a reference to a media segment into a track.
 o insertSegment(Track, int, int, int)
This method copies part of one track to another.
 o isScrapMovie()
Looks on the System scrap to find out if it can translate any of the track data into a movie.
 o loadIntoRam(int, int, int)
This method loads a track's data into memory.
 o newEditState()
You can create an edit state by calling the NewTrackEditState function.
 o pointInMovie(QDPoint)
This method allows your application to determine whether a specified point lies in the region defined by a track's display boundary region after it has been clipped by the movie's final display clipping region.
 o removeMedia()
Removes a track's media.
 o scaleSegment(int, int, int)
This method changes the duration of a segment of a track.
 o setAlternate(Track)
This method allows your application to add tracks to or remove tracks from alternate groups.
 o setClipRgn(Region)
This method allows your application to set the clipping region of a track.
 o setDimensions(Dimension)
This method allows your application to establish a track's source, or display, rectangle.
 o setEnabled(boolean)
This method allows your application to enable and disable a track.
 o setGWorld(QDGraphics, GDevice)
This method sets a new QDGraphics for the track.
 o setLayer(int)
This method allows your application to set a track's layer.
 o setLoadSettings(LoadSettings)
This method allows you to specify a portion of a track that is to be loaded into memory whenever it is played.
 o setMatrix(Matrix)
This method allows your application to establish a track's transformation matrix.
 o setOffset(int)
This method modifies the duration of the empty space that lies at the beginning of the track, thus changing the duration of the entire track.
 o setReference(Track, int, int)
This method allows you to modify an existing track reference.
 o setSoundLocalizationSettings(QTHandle)
This method allows your application to set the sound localization settings for the track.
 o setUsage(int)
This method allows your application to specify whether a track is used in a movie, its preview, its poster, or a combination of these.
 o setVolume(float)
This method allows your application to set a track's current volume.
 o toString()
String representation of this class.
 o trackTimeToMediaTime(int)
This method allows your application to convert a track's time value to a time value that is appropriate to the track's media using the track's edit list.
 o useEditState(TrackEditState)
This method returns a track to its condition according to an edit state you created previously.

Methods

 o fromMedia
 public static Track fromMedia(Media m) throws QTException
This method allows you to determine the track that uses a specified media.

QuickTime::GetMediaTrack()

Returns:
a Track object of the track that uses the media.
See Also:
getTrack
 o fromMovieImporterFile
 public static MovieImportInfo fromMovieImporterFile(MovieImporter mi,
                                                     QTFile fileIn,
                                                     Movie theMovie,
                                                     Track targetTrack,
                                                     int atTime,
                                                     int inFlags) throws QTException
Allows the MovieToolbox to import data from a file using the movie import component.

QuickTime::MovieImportFile

Parameters:
fileIn - Specifies the source file to the importing data.
theMovie - Specifies the movie to receive the data.
targetTrack - Specifies the track to receive the data, if to be recipent, then inFlags use movieImportMustUseTrack.
atTime - Specifies the start time of the movie time base to place the imported data.
inFlags - Specifies the control flags governing the operation.
Returns:
The results pertinent to the operation.
See Also:
fromFile
 o fromMovieImporterHandle
 public static MovieImportInfo fromMovieImporterHandle(MovieImporter mi,
                                                       QTHandleRef dataRef,
                                                       Movie theMovie,
                                                       Track targetTrack,
                                                       int atTime,
                                                       int inFlags) throws QTException
Allows the MovieToolbox to import data from a handle using the movie import component.

QuickTime::MovieImportHandle

Parameters:
dataRef - Specifies the handle to the importing data.
theMovie - Specifies the movie to receive the data.
targetTrack - Specifies the track to receive the data, if to be recipent, then inFlags use movieImportMustUseTrack.
atTime - Specifies the start time of the movie time base to place the imported data.
inFlags - Specifies the control flags governing the operation.
Returns:
The results pertinent to the operation.
See Also:
fromHandle
 o fromMovieImporterDataRef
 public static MovieImportInfo fromMovieImporterDataRef(MovieImporter mi,
                                                        DataRef dataRef,
                                                        Movie theMovie,
                                                        Track targetTrack,
                                                        int atTime,
                                                        int inFlags) throws QTException
Determines information revelant to the movie import component. The info kept are the track used, time value added, and flags describing the operation.

QuickTime::MovieImportDataRef

Parameters:
dataRef - Specifies the data reference.
theMovie - Specifies the movie.
targetTrack - Specifies the track to receive the data, if to be recipent, then inFlags use movieImportMustUseTrack.
atTime - Specifies the start time of the movie time base.
inFlags - Specifies the flags in for the operation.
Returns:
The results returned from the query operation.
See Also:
fromDataRef
 o removeMedia
 public void removeMedia() throws StdQTException
Removes a track's media.

QuickTime::DisposeTrackMedia()

 o setGWorld
 public void setGWorld(QDGraphics port,
                       GDevice gdh) throws StdQTException
This method sets a new QDGraphics for the track.

QuickTime::SetTrackGWorld()

Parameters:
port - the new destination port or null to use the movies port
gdh - the new device or null to use the current device
 o getPict
 public Pict getPict(int time) throws QTException
This method creates a QuickDraw picture from the specified track at the specified time.

QuickTime::GetTrackPict()

Parameters:
time - Specifies the track image for the picture. The time parameter contains the time from which the image is taken.
Returns:
a Pict object for the specified time.
 o getClipRgn
 public Region getClipRgn() throws QTException
This method allows your application to determine the clipping region of a track.

QuickTime::GetTrackClipRgn()

Returns:
a Region object specifying the clip region for this track.
 o setClipRgn
 public void setClipRgn(Region theClip) throws StdQTException
This method allows your application to set the clipping region of a track.

QuickTime::SetTrackClipRgn()

Parameters:
theClip - Specifies the track's clipping region.
 o getDisplayBoundsRgn
 public Region getDisplayBoundsRgn() throws QTException
This method allows your application to determine the region a track occupies in a movie's graphics world.

QuickTime::GetTrackDisplayBoundsRgn()

Returns:
a Region object specifying the track's bounds region.
 o getMovieBoundsRgn
 public Region getMovieBoundsRgn() throws QTException
This method allows your application to determine the region the track occupies in a movie's boundary region.

QuickTime::GetTrackMovieBoundsRgn()

Returns:
a Region object specifying the region the track occupies in a movie's boundary region.
 o getBoundsRgn
 public Region getBoundsRgn() throws QTException
This method allows the media to limit the size of the track boundary rectangle. Therefore, the region returned by GetTrackBoundsRgn may not be rectangular and may be smaller than the track boundary region.

QuickTime::GetTrackBoundsRgn()

Returns:
a Region object specifying the region track's media uses to do drawing.
 o getID
 public int getID() throws StdQTException
This method allows your application to determine a track's unique track ID value.

QuickTime::GetTrackID()

Returns:
the track's ID value.
 o getCreationTime
 public int getCreationTime() throws StdQTException
This method returns a track's creation date.

QuickTime::GetTrackCreationTime()

Returns:
the track's creation date.
 o getModificationTime
 public int getModificationTime() throws StdQTException
This method returns a track's modification date.

QuickTime::GetTrackModificationTime()

Returns:
the track's modification date.
 o getEnabled
 public boolean getEnabled() throws StdQTException
This method allows your application to determine whether a track is currently enabled.

QuickTime::GetTrackEnabled()

Returns:
true if the track is enabled and false if the track is disabled.
 o setEnabled
 public void setEnabled(boolean enabled) throws StdQTException
This method allows your application to enable and disable a track.

QuickTime::SetTrackEnabled()

Parameters:
enabled - Enables or disables the track. Set this parameter to true to enable the track. Set this parameter to false to disable the track.
 o getUsage
 public int getUsage() throws StdQTException
This method allows your application to determine whether a track is used in a movie, its preview, its poster, or a combination of these.

QuickTime::GetTrackUsage()

Returns:
flags indicating the track's usage.
 o setUsage
 public void setUsage(int usage) throws StdQTException
This method allows your application to specify whether a track is used in a movie, its preview, its poster, or a combination of these.

QuickTime::SetTrackUsage()

Parameters:
usage - Contains flags that specify how the track is to be used.
 o getDuration
 public int getDuration() throws StdQTException
This method returns the duration of a track.

QuickTime::GetTrackDuration()

Returns:
the duration of a track.
 o getOffset
 public int getOffset() throws StdQTException
This method allows your application to determine the time difference between the start of a track and the start of the movie that contains the track.

QuickTime::GetTrackOffset()

Returns:
the track's offset from the start of the movie
 o setOffset
 public void setOffset(int movieOffsetTime) throws StdQTException
This method modifies the duration of the empty space that lies at the beginning of the track, thus changing the duration of the entire track.

QuickTime::SetTrackOffset()

Parameters:
movieOffsetTime - Specifies the track's offset from the start of the movie, and must be expressed in the time scale of the movie that contains the track.
 o getLayer
 public int getLayer() throws StdQTException
This method allows your application to retrieve a track's layer.

QuickTime::GetTrackLayer()

Returns:
the track's layer number.
 o setLayer
 public void setLayer(int layer) throws StdQTException
This method allows your application to set a track's layer.

QuickTime::SetTrackLayer()

Parameters:
layer - Specifies the track's layer number.
 o getAlternate
 public Track getAlternate() throws QTException
This method allows your application to determine all the tracks in an alternate group.

QuickTime::GetTrackAlternate()

Returns:
the Track object of the next track in the group.
 o setAlternate
 public void setAlternate(Track alternateT) throws StdQTException
This method allows your application to add tracks to or remove tracks from alternate groups.

QuickTime::SetTrackAlternate()

Parameters:
alternateT - Controls whether the function adds the track to a group or removes it from a group.
 o getVolume
 public float getVolume() throws StdQTException
This method returns a track's current volume setting.

QuickTime::GetTrackVolume()

Returns:
a track's current volume setting.
 o setVolume
 public void setVolume(float volume) throws StdQTException
This method allows your application to set a track's current volume.

QuickTime::SetTrackVolume()

Parameters:
volume - Specifies the current volume setting of the track.
 o getMatrix
 public Matrix getMatrix() throws StdQTException
This method allows your application to retrieve a track's transformation matrix.

QuickTime::GetTrackMatrix()

Returns:
a Matrix object specifying the track's transformation matrix.
 o setMatrix
 public void setMatrix(Matrix matrix) throws StdQTException
This method allows your application to establish a track's transformation matrix.

QuickTime::SetTrackMatrix()

Parameters:
matrix - Specifies the track's new matrix.
 o getDimensions
 public Dimension getDimensions() throws StdQTException
This method allows your application to determine a track's source, or display, rectangle.

QuickTime::GetTrackDimensions()

Returns:
a Dimension object containing the track's width and height in pixels.
 o setDimensions
 public void setDimensions(Dimension d) throws StdQTException
This method allows your application to establish a track's source, or display, rectangle.

QuickTime::SetTrackDimensions()

Parameters:
d - a Dimension object containing the width and height, in pixels, of the track's rectangle.
 o getUserData
 public UserData getUserData() throws StdQTException
This method allows your application to obtain access to a track's user data list.

QuickTime::GetTrackUserData()

Returns:
a UserData object referencing the track's user data list.
 o getDisplayMatrix
 public Matrix getDisplayMatrix() throws StdQTException
This method returns the track's display matrix.

QuickTime::GetTrackDisplayMatrix()

Returns:
the track's display matrix.
 o getSoundLocalizationSettings
 public QTHandle getSoundLocalizationSettings() throws QTException
This method returns the sound localization settings for the track.

QuickTime::GetTrackSoundLocalizationSettings()

Returns:
the sound localization settings for the track.
 o setSoundLocalizationSettings
 public void setSoundLocalizationSettings(QTHandle newSettings) throws StdQTException
This method allows your application to set the sound localization settings for the track.

QuickTime::SetTrackSoundLocalizationSettings()

Parameters:
newSettings - Specifies the new sound localization settings for the track
 o getMovie
 public Movie getMovie() throws StdQTException
This method allows you to determine the movie that contains a specified track.

QuickTime::GetTrackMovie()

Returns:
a Movie object that corresponds to the movie that contains the track.
 o getNextInterestingTime
 public TimeInfo getNextInterestingTime(int interestingTimeFlags,
                                        int time,
                                        float rate) throws StdQTException
This method searches for times of interest in a track.

QuickTime::GetTrackNextInterestingTime()

Parameters:
interestingTimeFlags - Specifies the search criteria.
time - Specifies a time value that establishes the starting point for the search.
rate - Contains the search direction.
Returns:
a TimeInfo object specifiying the first time value it finds that meets the search criteria specified in the flags parameter.
 o insertMedia
 public void insertMedia(int trackStart,
                         int mediaTime,
                         int mediaDuration,
                         float mediaRate) throws StdQTException
This method inserts a reference to a media segment into a track.

QuickTime::InsertMediaIntoTrack()

Parameters:
trackStart - Contains a time value specifying where the segment is to be inserted.
mediaTime - Contains a time value specifying the starting point of the segment in the media.
mediaDuration - Contains a time value specifying the duration of the media's segment.
mediaRate - Specifies the media's rate.
 o insertEmptySegment
 public void insertEmptySegment(int dstIn,
                                int dstDuration) throws StdQTException
This method adds an empty segment to a track.

QuickTime::InsertEmptyTrackSegment()

Parameters:
dstIn - Contains a time value specifying where the segment is to be inserted.
dstDuration - Contains a time value that specifies the duration of the segment to be added.
 o deleteSegment
 public void deleteSegment(int startTime,
                           int duration) throws StdQTException
This method removes a specified segment from a track.

QuickTime::DeleteTrackSegment()

Parameters:
startTime - Contains a time value specifying the starting point of the segment to be deleted
duration - Contains a time value that specifies the duration of the segment to be deleted.
 o scaleSegment
 public void scaleSegment(int startTime,
                          int oldDuration,
                          int newDuration) throws StdQTException
This method changes the duration of a segment of a track.

QuickTime::ScaleTrackSegment()

Parameters:
startTime - Specifies the start of the segment.
oldDuration - Specifies the duration of the segment.
newDuration - Specifies the new duration of the segment.
 o newEditState
 public TrackEditState newEditState() throws QTException
You can create an edit state by calling the NewTrackEditState function.

QuickTime::NewTrackEditState()

Returns:
the TrackEditState.
 o useEditState
 public void useEditState(TrackEditState state) throws StdQTException
This method returns a track to its condition according to an edit state you created previously.

QuickTime::UseTrackEditState()

Parameters:
state - Specifies the edit state for this operation.
 o addReference
 public int addReference(Track refTrack,
                         int refType) throws StdQTException
This method allows you to add a new track reference to a track.

QuickTime::AddTrackReference()

Parameters:
refTrack - Specifies the track to be identified in the track reference.
refType - Specifies the type of reference.
Returns:
the index of the added reference.
 o deleteReference
 public void deleteReference(int refType,
                             int index) throws StdQTException
This method allows you to remove a track reference from a track.

QuickTime::DeleteTrackReference()

Parameters:
refType - Specifies the type of reference.
index - Specifies the index value of the reference to be deleted.
 o setReference
 public void setReference(Track refTrack,
                          int refType,
                          int index) throws StdQTException
This method allows you to modify an existing track reference.

QuickTime::SetTrackReference()

Parameters:
refTrack - Specifies the track to be identified in the track reference.
refType - Specifies the type of reference.
index - Specifies the index value of the reference to be changed.
 o getReference
 public Track getReference(int refType,
                           int index) throws QTException
This method allows you to retrieve the track identifier contained in an existing track reference.

QuickTime::GetTrackReference()

Parameters:
refType - Specifies the type of reference.
index - Specifies the index value of the reference to be changed.
 o getNextReferenceType
 public int getNextReferenceType(int refType) throws StdQTException
This method allows you to determine all of the track reference types that are defined for a given track.

QuickTime::GetNextTrackReferenceType()

Parameters:
refType - Specifies the type of reference.
 o getReferenceCount
 public int getReferenceCount(int refType) throws StdQTException
This method allows you to determine how many track references of a given type exist for a track.

QuickTime::GetTrackReferenceCount()

Parameters:
refType - Specifies the type of reference.
 o trackTimeToMediaTime
 public int trackTimeToMediaTime(int value) throws StdQTException
This method allows your application to convert a track's time value to a time value that is appropriate to the track's media using the track's edit list.

QuickTime::TrackTimeToMediaTime()

Parameters:
value - Specifies the track's time value; must be expressed in the time scale of the movie that contains the track.
 o getEditRate
 public float getEditRate(int atTime) throws StdQTException
This method returns the rate of the track edit of a specified track at an indicated time.

QuickTime::GetTrackEditRate()

Parameters:
atTime - Indicates a time value at which the rate of a track edit (of a track identified in the parameter theTrack) is to be determined.
Returns:
the track's edit rate.
 o getDataSize
 public int getDataSize(int startTime,
                        int duration) throws StdQTException
This method allows your application to determine the size, in bytes, of the sample data in a segment of a track.

QuickTime::GetTrackDataSize()

Parameters:
startTime - Contains a time value specifying the starting point of the segment.
duration - Contains a time value that specifies the duration of the segment.
 o pointInMovie
 public boolean pointInMovie(QDPoint pt) throws StdQTException
This method allows your application to determine whether a specified point lies in the region defined by a track's display boundary region after it has been clipped by the movie's final display clipping region.

QuickTime::PtInTrack()

Parameters:
pt - Specifies the point to be checked.
 o getSegmentDisplayBoundsRgn
 public Region getSegmentDisplayBoundsRgn(int time,
                                          int duration) throws QTException
This method allows your application to determine the region a track occupies in a movie's graphics world during a specified segment.

QuickTime::GetTrackSegmentDisplayBoundsRgn()

Parameters:
time - Specifies the starting time of the track segment to consider.
duration - Specifies the length of the segment to consider. Set this parameter to 0 to consider an instant in time.
 o getStatus
 public int getStatus()
This method returns the value of the last error the media encountered while playing a specified track.

QuickTime::GetTrackStatus()

Returns:
the value of the last error the media encountered while playing a specified track.
 o setLoadSettings
 public void setLoadSettings(LoadSettings settings) throws StdQTException
This method allows you to specify a portion of a track that is to be loaded into memory whenever it is played.

QuickTime::SetTrackLoadSettings()

Parameters:
settings - a LoadSettings object.
 o getLoadSettings
 public LoadSettings getLoadSettings() throws StdQTException
This method allows you to retrieve a track's preload information.

QuickTime::GetTrackLoadSettings()

Returns:
a LoadSettings object.
 o insertSegment
 public void insertSegment(Track dstTrack,
                           int srcIn,
                           int srcDuration,
                           int dstIn) throws StdQTException
This method copies part of one track to another.

QuickTime::InsertTrackSegment()

Parameters:
dstTrack - Specifies the destination track for this operation.
srcIn - Specifies the start of the segment in the source track.
srcDuration - Specifies the duration of the segment in the source track.
dstIn - Contains a time value specifying where the segment is to be inserted.
 o copySettings
 public void copySettings(Track dstTrack) throws StdQTException
This method copies many settings from one track to another, overwriting the destination settings.

QuickTime::CopyTrackSettings()

Parameters:
dstTrack - Specifies the destination track for this operation.
 o loadIntoRam
 public void loadIntoRam(int time,
                         int duration,
                         int flags) throws StdQTException
This method loads a track's data into memory.

QuickTime::LoadTrackIntoRam()

Parameters:
time - Allows you to specify a portion of the track to load.
duration - Allows you to specify a portion of the track to load.
flags - Gives you explicit control over what is loaded into memory and how long to keep it around.
 o isScrapMovie
 public MovieImporter isScrapMovie() throws StdQTException
Looks on the System scrap to find out if it can translate any of the track data into a movie.

QuickTime::IsScrapMovie()

 o toString
 public String toString()
String representation of this class.

Overrides:
toString in class QTObject

All Packages  Class Hierarchy  This Package  Previous  Next  Index