|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--quicktime.QTObject | +--quicktime.std.movies.media.Media
The Media class implements the corresponding data structure of the Movie Toolbox. The data references of a track constitute the track's media. Each track has a single media data structure. Specifies the media for an operation. Your application obtains a media identifier from such Movie Toolbox functions as NewTrackMedia and GetTrackMedia (described on page 2-153 of Inside Macintosh: QuickTime and page 2-206 of Inside Macintosh: QuickTime, respectively).
Fields inherited from interface quicktime.jdirect.QuickTimeLib |
JDirect_MacOSX, libraryInstance, name |
Method Summary | |
int |
addDataRef(DataRef dataReference)
This method adds a data reference to a media. |
int |
addSample(QTHandleRef data,
int dataOffset,
int dataSize,
int durationPerSample,
SampleDescription sampleDesc,
int numberOfSamples,
int sampleFlags)
This method adds sample data and a description to a media object. |
int |
addSampleReference(int dataOffset,
int dataSize,
int durationPerSample,
SampleDescription sampleDesc,
int numberOfSamples,
int sampleFlags)
This method allows your application to work with samples that have already been added to a movie data file. |
int |
addSampleReference(SampleDescription sampleDescription,
int numOfSamples,
SampleReferenceVector sampleRefs)
Allows your application to add groups of sample references to a movie data file. |
void |
beginEdits()
This method starts a media-editing session. |
void |
endEdits()
This method ends a media-editing session. |
static Media |
fromTrack(Track theTrack)
Returns a Media class that corresponds to the media that contains a track's data. |
int |
getCreationTime()
This method returns the creation date stored in the media. |
DataHandler |
getDataHandler(int index)
This method allows you to determine a media's data handler. |
HandlerInfo |
getDataHandlerDescription(int index)
This method allows your application to retrieve information about a media's data handler. |
DataRef |
getDataRef(int index)
This method returns a copy of a specified data reference. |
int |
getDataRefCount()
This method allows your application to determine the number of data references in a media. |
int |
getDataSize(int startTime,
int duration)
This method allows your application to determine the size, in bytes, of the sample data in a media segment. |
int |
getDuration()
This method returns the duration of a media. |
MediaHandler |
getHandler()
This method allows you to obtain a reference to a media handler component. |
HandlerInfo |
getHandlerDescription()
This method allows your application to retrieve information about a media handler. |
AtomContainer |
getInputMap()
This method returns you the input map of the media. |
int |
getLanguage()
This method returns a media's language or region code. |
int |
getModificationTime()
This method returns a media's modification date. |
TimeInfo |
getNextInterestingTime(int interestingTimeFlags,
int time,
float rate)
This method searches for times of interest in a media. |
int |
getPlayHints()
This method allows your application to get information from the Movie Toolbox that determines the current state of playback of a single media. |
int |
getPlayHints(int flags,
int flagsMask)
Deprecated. these arguments are not used in this call see getPlayHints() |
int |
getPreferredChunkSize()
This method returns the preferred chunck size for the media. |
AtomContainer |
getPropertyAtom()
Retrieves the properties from a media handler. |
int |
getQuality()
This method returns a media's quality level value. |
MediaSample |
getSample(int maxSizeToGrow,
int time,
int maxNumberOfSamples)
This method returns a sample from a movie data file. |
int |
getSampleCount()
This method allows you to determine the number of samples in a media. |
SampleDescription |
getSampleDescription(int index)
This method allows you to retrieve a sample description from a media. |
int |
getSampleDescriptionCount()
This method returns the number of sample descriptions in a media. |
SampleInfo |
getSampleReference(int time,
int maxNumberOfSamples)
This method allows your application to obtain reference information about samples that are stored in a movie data file. |
SampleReferenceInfo |
getSampleReferences(int time,
int maxNumberOfSamples)
This method allows your application to obtain reference information about samples that are stored in a movie data file. |
int |
getShadowSync(int frameDiffSampleNum)
This method returns the sample number of the shadow sync associated with a given frame difference sample number. |
int |
getSyncSampleCount()
This method allows you to determine the number of samples in a media. |
int |
getTimeScale()
This method allows your application to determine a media's time scale. |
Track |
getTrack()
This method allows you to determine the track that uses a specified media. |
static Media |
getTrackMedia(Track theTrack)
Returns a Media class that corresponds to the media that contains a track's data. |
UserData |
getUserData()
This method allows your application to obtain access to a media's user data list. |
void |
loadIntoRam(int time,
int duration,
int flags)
This method loads a media's data into memory. |
static Media |
newFromType(int mediaType,
Track track,
int timeScale,
DataRef dataRef)
Creates a media struct for the specified Track object. |
TimeInfo |
sampleNumToMediaTime(int logicalSampleNum)
This method allows you to find the time at which a specified sample plays. |
void |
setDataHandler(int index,
DataHandler dH)
This method allows you to assign a data handler to a media. |
void |
setDataRef(int index,
DataRef dataReference)
This method changes the file that the specified media identifies as the location for its data storage. |
void |
setDataRefAttributes(int index,
int dataRefAttributes)
No QTDocumentation. |
void |
setDefaultDataRefIndex(int index)
This method allows your application to determine the default index for a media. |
void |
setHandler(MediaHandler mH)
This method allows you to assign a specific media handler to a track. |
void |
setInputMap(AtomContainer inputMap)
This method allows you to set a new input map for a media. |
void |
setLanguage(int language)
This method sets a media's language or region code. |
void |
setPlayHints(int flags,
int flagsMask)
This method allows your application to provide information to the Movie Toolbox that can influence playback of a single media. |
void |
setPreferredChunkSize(int maxChunkSize)
This method allows your application to specify a preferred chunk size for the media. |
void |
setPropertyAtom(AtomContainer propertyAtom)
No QT Documentation. |
void |
setQuality(int quality)
This method sets a media's quality level value. |
void |
setSampleDescription(int index,
SampleDescription descH)
This method lets you change the contents of a particular sample description of a specified media. |
void |
setShadowSync(int frameDiffSampleNum,
int syncSampleNum)
This method creates an association between the indicated frame difference sample and a specified self-contained sample in a given media. |
void |
setTimeScale(int timeScale)
This method allows your application to set a media's time scale. |
SampleTimeInfo |
timeToSampleNum(int time)
This method allows you to find the sample that contains the data for a specified time. |
Methods inherited from class quicktime.QTObject |
disposeQTObject, equals, ID, toString |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public static Media newFromType(int mediaType, Track track, int timeScale, DataRef dataRef) throws QTException
mediaType
- the type of media the track will or does containitsTrack
- Specifies the Track object this media belongs to.timeScale
- Specifies the time scale of the new media.dataRef
- a DataRef object specifying the default data reference for this media. If there
is no known dataRef then null can be passed in.public static Media fromTrack(Track theTrack) throws QTException
theTrack
- specifies the track to get the media frompublic static Media getTrackMedia(Track theTrack) throws QTException
theTrack
- specifies the track to get the media frompublic SampleDescription getSampleDescription(int index) throws QTException
index
- Specifies the index of the sample description to retrieve.public final void setSampleDescription(int index, SampleDescription descH) throws StdQTException
index
- Specifies the index of the sample description to be changed.descH
- Specifies the handle to the sample description.public final DataHandler getDataHandler(int index) throws StdQTException
index
- Identifies the data reference.public final void setDataHandler(int index, DataHandler dH) throws StdQTException
index
- Identifies the data reference for this data handler.dataHandler
- Specifies the data handler for the media.public MediaHandler getHandler() throws StdQTException
public final void setHandler(MediaHandler mH) throws StdQTException
mH
- Contains a reference to a media handler component.public final Track getTrack() throws QTException
public final int getCreationTime() throws StdQTException
public final int getModificationTime() throws StdQTException
public final int getTimeScale() throws StdQTException
public final void setTimeScale(int timeScale) throws StdQTException
timeScale
- Specifies the media's new time scale.public final int getDuration() throws StdQTException
public final int getLanguage() throws StdQTException
public final void setLanguage(int language) throws StdQTException
language
- Specifies the media's language or region code.public final int getQuality() throws StdQTException
public final void setQuality(int quality) throws StdQTException
quality
- Specifies the media's quality value.public final HandlerInfo getHandlerDescription() throws StdQTException
public final UserData getUserData() throws StdQTException
public final AtomContainer getInputMap() throws StdQTException
public final void setInputMap(AtomContainer inputMap) throws StdQTException
inputMap
- Specifies the new input map.public final void beginEdits() throws StdQTException
public final void endEdits() throws StdQTException
public final void setDefaultDataRefIndex(int index) throws StdQTException
index
- Specifies the index of the data ref.public final HandlerInfo getDataHandlerDescription(int index) throws StdQTException
index
- Identifies the data reference.public final int getSampleDescriptionCount() throws StdQTException
public final int getSampleCount() throws StdQTException
public final int getSyncSampleCount() throws StdQTException
public final TimeInfo sampleNumToMediaTime(int logicalSampleNum) throws StdQTException
logicalSampleNum
- Specifies the sample number.public final SampleTimeInfo timeToSampleNum(int time) throws StdQTException
time
- Specifies the time for which you are retrieving sample information.public final int addSample(QTHandleRef data, int dataOffset, int dataSize, int durationPerSample, SampleDescription sampleDesc, int numberOfSamples, int sampleFlags) throws StdQTException
data
- Specifies media sample's data handle.dataOffset
- an offset into the sample data.dataSize
- Specifies media sample's data size.durationPerSample
- Specifies media sample's duration.sampleDesc
- Specifies media sample's sample description.numberOfSamples
- Specifies the number of samples.sampleFlags
- Specifies flags for samples.public final MediaSample getSample(int maxSizeToGrow, int time, int maxNumberOfSamples) throws QTException
maxSizeToGrow
- Specifies the maximum number of bytes of sample data to be returned.time
- Specifies the starting time of the sample to be retrieved.maxNumberOfSamples
- Specifies the maximum number of samples to be returned.public final int addSampleReference(int dataOffset, int dataSize, int durationPerSample, SampleDescription sampleDesc, int numberOfSamples, int sampleFlags) throws StdQTException
dataOffset
- an offset into the sample data.dataSize
- Specifies media sample's data size.durationPerSample
- Specifies media sample's duration.sampleDesc
- Specifies media sample's sample description.numberOfSamples
- Specifies the number of samples.sampleFlags
- Specifies flags for samples.public final SampleInfo getSampleReference(int time, int maxNumberOfSamples) throws QTException
time
- Specifies the starting time of the sample reference to be retrieved.maxNumberOfSamples
- Specifies the maximum number of samples to be returned.public final int addSampleReference(SampleDescription sampleDescription, int numOfSamples, SampleReferenceVector sampleRefs) throws StdQTException
sampleDescription
- describes characteristics about the sample referencesnumOfSamples
- the number of references addedsampleRefs
- the references add, there must be at least as many references in the vector
as numOfSamples (there may be more).public final SampleReferenceInfo getSampleReferences(int time, int maxNumberOfSamples) throws QTException
time
- secifies the starting time of the sample reference to be retrieved.maxNumberOfSamples
- Specifies the maximum number of samples to be returned.public final void setPreferredChunkSize(int maxChunkSize) throws StdQTException
maxChunkSize
- Specifies the prefered maximum chunk size.public final int getPreferredChunkSize() throws StdQTException
public final void setShadowSync(int frameDiffSampleNum, int syncSampleNum) throws StdQTException
frameDiffSampleNum
- Specifies a frame difference sample.syncSampleNum
- Specifies a shadow sync sample.public final int getShadowSync(int frameDiffSampleNum) throws StdQTException
public final 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 final 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 final DataRef getDataRef(int index) throws QTException
index
- Identifies the data reference.public final void setDataRef(int index, DataRef dataReference) throws StdQTException
index
- the index value at which to add the data.dataRef
- Specifies the data reference.public final void setDataRefAttributes(int index, int dataRefAttributes) throws StdQTException
public final int addDataRef(DataRef dataReference) throws StdQTException
dataReference
- Specifies the data reference.public final int getDataRefCount() throws StdQTException
public final void setPlayHints(int flags, int flagsMask) throws StdQTException
flags
- Specifies the optimizations that can be used with this media.flagsMask
- Indicates which flags in the flags parameter are to be considered in this operation.public final int getPlayHints(int flags, int flagsMask) throws StdQTException
flags
- Specifies the optimizations that can be used with this media.flagsMask
- Indicates which flags in the flags parameter are to be considered in this operation.public final int getPlayHints() throws StdQTException
public final void setPropertyAtom(AtomContainer propertyAtom) throws StdQTException
public final AtomContainer getPropertyAtom() throws StdQTException
public final void loadIntoRam(int time, int duration, int flags) throws StdQTException
time
- starting time of the media segment to load.duration
- duration of the media segment to loadflags
- control the loading operation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |