|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--quicktime.QTObject | +--quicktime.std.movies.Track
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.
Fields inherited from interface quicktime.jdirect.QuickTimeLib |
JDirect_MacOSX, libraryInstance, name |
Method Summary | |
int |
addReference(Track refTrack,
int refType)
This method allows you to add a new track reference to a track. |
void |
copySettings(Track dstTrack)
This method copies many settings from one track to another, overwriting the destination settings. |
void |
deleteReference(int refType,
int index)
This method allows you to remove a track reference from a track. |
void |
deleteSegment(int startTime,
int duration)
This method removes a specified segment from a track. |
static Track |
fromMedia(Media m)
This method allows you to determine the track that uses a specified media. |
static MovieImportInfo |
fromMovieImporterDataRef(MovieImporter mi,
DataRef dataRef,
Movie theMovie,
Track targetTrack,
int atTime,
int inFlags)
Determines information revelant to the movie import component. |
static MovieImportInfo |
fromMovieImporterFile(MovieImporter mi,
QTFile fileIn,
Movie theMovie,
Track targetTrack,
int atTime,
int inFlags)
Allows the MovieToolbox to import data from a file using the movie import component. |
static MovieImportInfo |
fromMovieImporterHandle(MovieImporter mi,
QTHandleRef dataRef,
Movie theMovie,
Track targetTrack,
int atTime,
int inFlags)
Allows the MovieToolbox to import data from a handle using the movie import component. |
Track |
getAlternate()
This method allows your application to determine all the tracks in an alternate group. |
Region |
getBoundsRgn()
This method allows the media to limit the size of the track boundary rectangle. |
Region |
getClipRgn()
This method allows your application to determine the clipping region of a track. |
int |
getCreationTime()
This method returns a track's creation date. |
int |
getDataSize(int startTime,
int duration)
This method allows your application to determine the size, in bytes, of the sample data in a segment of a track. |
java.awt.Dimension |
getDimensions()
Deprecated. since QTJava 4.0 see getSize |
Region |
getDisplayBoundsRgn()
This method allows your application to determine the region a track occupies in a movie's graphics world. |
Matrix |
getDisplayMatrix()
This method returns the track's display matrix. |
int |
getDuration()
This method returns the duration of a track. |
float |
getEditRate(int atTime)
This method returns the rate of the track edit of a specified track at an indicated time. |
boolean |
getEnabled()
This method allows your application to determine whether a track is currently enabled. |
int |
getID()
This method allows your application to determine a track's unique track ID value. |
int |
getLayer()
This method allows your application to retrieve a track's layer. |
LoadSettings |
getLoadSettings()
This method allows you to retrieve a track's preload information. |
Matrix |
getMatrix()
This method allows your application to retrieve a track's transformation matrix. |
PixMap |
getMatte()
A PixMap object which describes the Matte of a Track. |
Media |
getMedia()
Returns a Media class that corresponds to the media that contains a track's data. |
int |
getModificationTime()
This method returns a track's modification date. |
Movie |
getMovie()
This method allows you to determine the movie that contains a specified track. |
Region |
getMovieBoundsRgn()
This method allows your application to determine the region the track occupies in a movie's boundary region. |
java.lang.String |
getName()
This method allows your application to obtain access to a track's 'name' user data item. |
TimeInfo |
getNextInterestingTime(int interestingTimeFlags,
int time,
float rate)
This method searches for times of interest in a track. |
int |
getNextReferenceType(int refType)
This method allows you to determine all of the track reference types that are defined for a given track. |
int |
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. |
Pict |
getPict(int time)
This method creates a QuickDraw picture from the specified track at the specified time. |
Track |
getReference(int refType,
int index)
This method allows you to retrieve the track identifier contained in an existing track reference. |
int |
getReferenceCount(int refType)
This method allows you to determine how many track references of a given type exist for a track. |
Region |
getSegmentDisplayBoundsRgn(int time,
int duration)
This method allows your application to determine the region a track occupies in a movie's graphics world during a specified segment. |
QDDimension |
getSize()
This method allows your application to determine a track's source, or display, rectangle. |
QTHandle |
getSoundLocalizationSettings()
This method returns the sound localization settings for the track. |
int |
getStatus()
This method returns the value of the last error the media encountered while playing a specified track. |
int |
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. |
UserData |
getUserData()
This method allows your application to obtain access to a track's user data list. |
float |
getVolume()
This method returns a track's current volume setting. |
void |
insertEmptySegment(int dstIn,
int dstDuration)
This method adds an empty segment to a track. |
void |
insertMedia(int trackStart,
int mediaTime,
int mediaDuration,
float mediaRate)
This method inserts a reference to a media segment into a track. |
void |
insertSegment(Track dstTrack,
int srcIn,
int srcDuration,
int dstIn)
This method copies part of one track to another. |
MovieImporter |
isScrapMovie()
Looks on the System scrap to find out if it can translate any of the track data into a movie. |
void |
loadIntoRam(int time,
int duration,
int flags)
This method loads a track's data into memory. |
TrackEditState |
newEditState()
You can create an edit state by calling the NewTrackEditState function. |
boolean |
pointInMovie(QDPoint pt)
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. |
void |
removeMedia()
Removes a track's media. |
void |
scaleSegment(int startTime,
int oldDuration,
int newDuration)
This method changes the duration of a segment of a track. |
void |
setAlternate(Track alternateT)
This method allows your application to add tracks to or remove tracks from alternate groups. |
void |
setClipRgn(Region theClip)
This method allows your application to set the clipping region of a track. |
void |
setDimensions(java.awt.Dimension d)
Deprecated. as of QTJava 4.0 see setSize |
void |
setEnabled(boolean enabled)
This method allows your application to enable and disable a track. |
void |
setGWorld(QDGraphics port,
GDevice gdh)
This method sets a new QDGraphics for the track. |
void |
setLayer(int layer)
This method allows your application to set a track's layer. |
void |
setLoadSettings(LoadSettings settings)
This method allows you to specify a portion of a track that is to be loaded into memory whenever it is played. |
void |
setMatrix(Matrix matrix)
This method allows your application to establish a track's transformation matrix. |
void |
setMatte(PixMap pm)
A PixMap object which will describe the Matte of a Track. |
void |
setName(java.lang.String name)
This method allows your application to set a track's 'name' user data item. |
void |
setOffset(int movieOffsetTime)
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. |
void |
setReference(Track refTrack,
int refType,
int index)
This method allows you to modify an existing track reference. |
void |
setSize(QDDimension d)
This method allows your application to establish a track's source, or display, rectangle. |
void |
setSoundLocalizationSettings(QTHandle newSettings)
This method allows your application to set the sound localization settings for the track. |
void |
setUsage(int usage)
This method allows your application to specify whether a track is used in a movie, its preview, its poster, or a combination of these. |
void |
setVolume(float volume)
This method allows your application to set a track's current volume. |
java.lang.String |
toString()
String representation of this class. |
int |
trackTimeToMediaTime(int value)
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. |
void |
useEditState(TrackEditState state)
This method returns a track to its condition according to an edit state you created previously. |
Methods inherited from class quicktime.QTObject |
disposeQTObject, equals, ID |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static Track fromMedia(Media m) throws QTException
Media.getTrack()
public static MovieImportInfo fromMovieImporterFile(MovieImporter mi, QTFile fileIn, Movie theMovie, Track targetTrack, int atTime, int inFlags) throws QTException
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.MovieImporter.fromFile(quicktime.io.QTFile, quicktime.std.movies.Movie, quicktime.std.movies.Track, int, int)
public static MovieImportInfo fromMovieImporterHandle(MovieImporter mi, QTHandleRef dataRef, Movie theMovie, Track targetTrack, int atTime, int inFlags) throws QTException
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.MovieImporter.fromHandle(quicktime.util.QTHandleRef, quicktime.std.movies.Movie, quicktime.std.movies.Track, int, int)
public static MovieImportInfo fromMovieImporterDataRef(MovieImporter mi, DataRef dataRef, Movie theMovie, Track targetTrack, int atTime, int inFlags) throws QTException
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.MovieImporter.fromDataRef(quicktime.std.movies.media.DataRef, quicktime.std.movies.Movie, quicktime.std.movies.Track, int, int)
public Media getMedia() throws QTException
theTrack
- specifies the track to get the media frompublic void removeMedia() throws StdQTException
public void setGWorld(QDGraphics port, GDevice gdh) throws StdQTException
port
- the new destination port or null to use the movies portgdh
- the new device or null to use the current devicepublic Pict getPict(int time) throws QTException
time
- Specifies the track image for the picture. The time parameter contains the time from which the image is taken.public Region getClipRgn() throws QTException
public void setClipRgn(Region theClip) throws StdQTException
theClip
- Specifies the track's clipping region.public Region getDisplayBoundsRgn() throws QTException
public Region getMovieBoundsRgn() throws QTException
public Region getBoundsRgn() throws QTException
public int getID() throws StdQTException
public int getCreationTime() throws StdQTException
public int getModificationTime() throws StdQTException
public boolean getEnabled() throws StdQTException
public void setEnabled(boolean enabled) throws StdQTException
enabled
- Enables or disables the track. Set this parameter to true
to enable the track. Set this parameter to false to disable the track.public int getUsage() throws StdQTException
public void setUsage(int usage) throws StdQTException
usage
- Contains flags that specify how the track is to be used.public int getDuration() throws StdQTException
public int getOffset() throws StdQTException
public void setOffset(int movieOffsetTime) throws StdQTException
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.public int getLayer() throws StdQTException
public void setLayer(int layer) throws StdQTException
layer
- Specifies the track's layer number.public Track getAlternate() throws QTException
public void setAlternate(Track alternateT) throws StdQTException
alternateT
- Controls whether the function adds the track to a group or removes it from a group.public float getVolume() throws StdQTException
public void setVolume(float volume) throws StdQTException
volume
- Specifies the current volume setting of the track.public Matrix getMatrix() throws StdQTException
public void setMatrix(Matrix matrix) throws StdQTException
matrix
- Specifies the track's new matrix.public java.awt.Dimension getDimensions() throws StdQTException
public void setDimensions(java.awt.Dimension d) throws StdQTException
d
- a Dimension object containing the width and height, in pixels, of the track's rectangle.public QDDimension getSize() throws StdQTException
public void setSize(QDDimension d) throws StdQTException
d
- a Dimension object containing the width and height, in pixels, of the track's rectangle.public UserData getUserData() throws StdQTException
public java.lang.String getName() throws StdQTException
public void setName(java.lang.String name) throws QTException
name
- String object containing the track's name. Pass null or empty removes the UserDataNamepublic Matrix getDisplayMatrix() throws StdQTException
public QTHandle getSoundLocalizationSettings() throws QTException
public void setSoundLocalizationSettings(QTHandle newSettings) throws StdQTException
newSettings
- Specifies the new sound localization settings for the trackpublic Movie getMovie() throws StdQTException
public TimeInfo getNextInterestingTime(int interestingTimeFlags, int time, float rate) throws StdQTException
interestingTimeFlags
- Specifies the search criteria.time
- Specifies a time value that establishes the starting point for the search.rate
- Contains the search direction.public void insertMedia(int trackStart, int mediaTime, int mediaDuration, float mediaRate) throws StdQTException
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.public void insertEmptySegment(int dstIn, int dstDuration) throws StdQTException
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.public void deleteSegment(int startTime, int duration) throws StdQTException
startTime
- Contains a time value specifying the starting point of the segment to be deletedduration
- Contains a time value that specifies the duration of the segment to be deleted.public void scaleSegment(int startTime, int oldDuration, int newDuration) throws StdQTException
startTime
- Specifies the start of the segment.oldDuration
- Specifies the duration of the segment.newDuration
- Specifies the new duration of the segment.public TrackEditState newEditState() throws QTException
public void useEditState(TrackEditState state) throws StdQTException
state
- Specifies the edit state for this operation.public int addReference(Track refTrack, int refType) throws StdQTException
refTrack
- Specifies the track to be identified in the track reference.refType
- Specifies the type of reference.public void deleteReference(int refType, int index) throws StdQTException
refType
- Specifies the type of reference.index
- Specifies the index value of the reference to be deleted.public void setReference(Track refTrack, int refType, int index) throws StdQTException
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.public Track getReference(int refType, int index) throws QTException
refType
- Specifies the type of reference.index
- Specifies the index value of the reference to be changed.public int getNextReferenceType(int refType) throws StdQTException
refType
- Specifies the type of reference.public int getReferenceCount(int refType) throws StdQTException
refType
- Specifies the type of reference.public int trackTimeToMediaTime(int value) throws StdQTException
value
- Specifies the track's time value; must be expressed in the time scale of the movie that contains the track.public float getEditRate(int atTime) throws StdQTException
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.public int getDataSize(int startTime, int duration) throws StdQTException
startTime
- Contains a time value specifying the starting point of the segment.duration
- Contains a time value that specifies the duration of the segment.public boolean pointInMovie(QDPoint pt) throws StdQTException
pt
- Specifies the point to be checked.public Region getSegmentDisplayBoundsRgn(int time, int duration) throws QTException
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.public int getStatus()
public void setLoadSettings(LoadSettings settings) throws StdQTException
settings
- a LoadSettings object.public LoadSettings getLoadSettings() throws StdQTException
public void insertSegment(Track dstTrack, int srcIn, int srcDuration, int dstIn) throws StdQTException
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.public void copySettings(Track dstTrack) throws StdQTException
dstTrack
- Specifies the destination track for this operation.public void loadIntoRam(int time, int duration, int flags) throws StdQTException
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.public MovieImporter isScrapMovie() throws StdQTException
public PixMap getMatte() throws StdQTException
public void setMatte(PixMap pm) throws StdQTException
getMatte()
public java.lang.String toString()
toString
in class QTObject
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |