All Packages Class Hierarchy This Package Previous Next Index
Class quicktime.std.movies.media.Media
java.lang.Object
|
+----quicktime.QTObject
|
+----quicktime.std.movies.media.Media
- public abstract class Media
- extends QTObject
- implements QuickTimeLib
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).
-
addDataRef(DataRef)
- This method adds a data reference to a media.
-
addSample(QTHandleRef, int, int, int, SampleDescription, int, int)
- This method adds sample data and a description to a media object.
-
addSampleReference(int, int, int, SampleDescription, int, int)
- This method allows your application to work with samples that have already been added to a movie data file.
-
addSampleReference(SampleDescription, int, SampleReferenceVector)
- Allows your application to add groups of sample references to a movie data file.
-
beginEdits()
- This method starts a media-editing session.
-
endEdits()
- This method ends a media-editing session.
-
fromTrack(Track)
- Returns a Media class that corresponds to the media that contains a track's data.
-
getCreationTime()
- This method returns the creation date stored in the media.
-
getDataHandler(int)
- This method allows you to determine a media's data handler.
-
getDataHandlerDescription(int)
- This method allows your application to retrieve information about a media's data handler.
-
getDataRef(int)
- This method returns a copy of a specified data reference.
-
getDataRefCount()
- This method allows your application to determine the number of data references in a media.
-
getDataSize(int, int)
- This method allows your application to determine the size, in bytes, of the sample data in a media segment.
-
getDuration()
- This method returns the duration of a media.
-
getHandler()
- This method allows you to obtain a reference to a media handler component.
-
getHandlerDescription()
- This method allows your application to retrieve information about a media handler.
-
getInputMap()
- This method returns you the input map of the media.
-
getLanguage()
- This method returns a media's language or region code.
-
getModificationTime()
- This method returns a media's modification date.
-
getNextInterestingTime(int, int, float)
- This method searches for times of interest in a media.
-
getPlayHints(int, int)
- This method allows your application to get information from the Movie Toolbox
that determines the current state of playback of a single media.
-
getPreferredChunkSize()
- This method returns the preferred chunck size for the media.
-
getPropertyAtom()
- Retrieves the properties from a media handler.
-
getQuality()
- This method returns a media's quality level value.
-
getSample(int, int, int)
- This method returns a sample from a movie data file.
-
getSampleCount()
- This method allows you to determine the number of samples in a media.
-
getSampleDescription(int)
- This method allows you to retrieve a sample description from a media.
-
getSampleDescriptionCount()
- This method returns the number of sample descriptions in a media.
-
getSampleReference(int, int)
- This method allows your application to obtain reference information about samples that are stored in a movie data file.
-
getSampleReferences(int, int)
- This method allows your application to obtain reference information about samples that are stored in a movie data file.
-
getShadowSync(int)
- This method returns the sample number of the shadow sync associated with a given frame difference sample number.
-
getSyncSampleCount()
- This method allows you to determine the number of samples in a media.
-
getTimeScale()
- This method allows your application to determine a media's time scale.
-
getTrack()
- This method allows you to determine the track that uses a specified media.
-
getTrackMedia(Track)
- Returns a Media class that corresponds to the media that contains a track's data.
-
getUserData()
- This method allows your application to obtain access to a media's user data list.
-
loadIntoRam(int, int, int)
- This method loads a media's data into memory.
-
newFromType(int, Track, int, DataRef)
- Creates a media struct for the specified Track object.
-
sampleNumToMediaTime(int)
- This method allows you to find the time at which a specified sample plays.
-
setDataHandler(int, DataHandler)
- This method allows you to assign a data handler to a media.
-
setDataRef(int, DataRef)
- This method changes the file that the specified media identifies as the location for its data storage.
-
setDataRefAttributes(int, int)
- No QTDocumentation.
-
setDefaultDataRefIndex(int)
- This method allows your application to determine the default index for a media.
-
setHandler(MediaHandler)
- This method allows you to assign a specific media handler to a track.
-
setInputMap(AtomContainer)
- This method allows you to set a new input map for a media.
-
setLanguage(int)
- This method sets a media's language or region code.
-
setPlayHints(int, int)
- This method allows your application to provide information to the Movie Toolbox
that can influence playback of a single media.
-
setPreferredChunkSize(int)
- This method allows your application to specify a preferred chunk size for the media.
-
setPropertyAtom(AtomContainer)
- No QT Documentation.
-
setQuality(int)
- This method sets a media's quality level value.
-
setSampleDescription(int, SampleDescription)
- This method lets you change the contents of a particular sample description of a specified media.
-
setShadowSync(int, int)
- This method creates an association between the indicated frame difference sample
and a specified self-contained sample in a given media.
-
setTimeScale(int)
- This method allows your application to set a media's time scale.
-
timeToSampleNum(int)
- This method allows you to find the sample that contains the data for a specified time.
newFromType
public static Media newFromType(int mediaType,
Track track,
int timeScale,
DataRef dataRef) throws QTException
- Creates a media struct for the specified Track object. The type of media object
that is created is determined by the mediaType argument. If a media class is not
found that corresponds with the specified media type then an instance of GenericMedia
is returned.
QuickTime::NewTrackMedia()
- Parameters:
- mediaType - the type of media the track will or does contain
- itsTrack - 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.
fromTrack
public static Media fromTrack(Track theTrack) throws QTException
- Returns a Media class that corresponds to the media that contains a track's data.
QuickTime::GetTrackMedia()
- Parameters:
- theTrack - specifies the track to get the media from
- Returns:
- a Media subclass
getTrackMedia
public static Media getTrackMedia(Track theTrack) throws QTException
- Returns a Media class that corresponds to the media that contains a track's data.
QuickTime::GetTrackMedia()
- Parameters:
- theTrack - specifies the track to get the media from
- Returns:
- a Media subclass
getSampleDescription
public SampleDescription getSampleDescription(int index) throws QTException
- This method allows you to retrieve a sample description from a media.
QuickTime::GetMediaSampleDescription()
- Parameters:
- index - Specifies the index of the sample description to retrieve.
- Returns:
- a SampleDescription object for the specified index.
setSampleDescription
public final void setSampleDescription(int index,
SampleDescription descH) throws StdQTException
- This method lets you change the contents of a particular sample description of a specified media.
QuickTime::SetMediaSampleDescription()
- Parameters:
- index - Specifies the index of the sample description to be changed.
- descH - Specifies the handle to the sample description.
getDataHandler
public final DataHandler getDataHandler(int index) throws StdQTException
- This method allows you to determine a media's data handler.
QuickTime::GetMediaDataHandler()
- Parameters:
- index - Identifies the data reference.
setDataHandler
public final void setDataHandler(int index,
DataHandler dH) throws StdQTException
- This method allows you to assign a data handler to a media.
QuickTime::SetMediaDataHandler()
- Parameters:
- index - Identifies the data reference for this data handler.
- dataHandler - Specifies the data handler for the media.
getHandler
public MediaHandler getHandler() throws StdQTException
- This method allows you to obtain a reference to a media handler component.
QuickTime::GetMediaHandler()
- Returns:
- a MediaHandler object for the media's media handler.
setHandler
public final void setHandler(MediaHandler mH) throws StdQTException
- This method allows you to assign a specific media handler to a track.
QuickTime::SetMediaHandler()
- Parameters:
- mH - Contains a reference to a media handler component.
getTrack
public final Track getTrack() 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.
getCreationTime
public final int getCreationTime() throws StdQTException
- This method returns the creation date stored in the media.
QuickTime::GetMediaCreationTime()
- Returns:
- the creation date stored in the media.
getModificationTime
public final int getModificationTime() throws StdQTException
- This method returns a media's modification date.
QuickTime::GetMediaModificationTime()
- Returns:
- a media's modification date.
getTimeScale
public final int getTimeScale() throws StdQTException
- This method allows your application to determine a media's time scale.
QuickTime::GetMediaTimeScale()
- Returns:
- the media's time scale.
setTimeScale
public final void setTimeScale(int timeScale) throws StdQTException
- This method allows your application to set a media's time scale.
QuickTime::SetMediaTimeScale()
- Parameters:
- timeScale - Specifies the media's new time scale.
getDuration
public final int getDuration() throws StdQTException
- This method returns the duration of a media.
QuickTime::GetMediaDuration()
- Returns:
- the duration of a media.
getLanguage
public final int getLanguage() throws StdQTException
- This method returns a media's language or region code.
QuickTime::GetMediaLanguage()
- Returns:
- a media's language or region code.
setLanguage
public final void setLanguage(int language) throws StdQTException
- This method sets a media's language or region code.
QuickTime::SetMediaLanguage()
- Parameters:
- language - Specifies the media's language or region code.
getQuality
public final int getQuality() throws StdQTException
- This method returns a media's quality level value.
QuickTime::GetMediaQuality()
- Returns:
- a media's quality level value.
setQuality
public final void setQuality(int quality) throws StdQTException
- This method sets a media's quality level value.
QuickTime::SetMediaQuality()
- Parameters:
- quality - Specifies the media's quality value.
getHandlerDescription
public final HandlerInfo getHandlerDescription() throws StdQTException
- This method allows your application to retrieve information about a media handler.
QuickTime::GetMediaHandlerDescription()
- Returns:
- a HandlerInfo object.
getUserData
public final UserData getUserData() throws StdQTException
- This method allows your application to obtain access to a media's user data list.
QuickTime::GetMediaUserData()
- Returns:
- a UserData object for the media's user data list.
getInputMap
public final AtomContainer getInputMap() throws StdQTException
- This method returns you the input map of the media.
QuickTime::GetMediaInputMap()
- Returns:
- an AtomContainer object for media's input map.
setInputMap
public final void setInputMap(AtomContainer inputMap) throws StdQTException
- This method allows you to set a new input map for a media.
QuickTime::SetMediaInputMap()
- Parameters:
- inputMap - Specifies the new input map.
beginEdits
public final void beginEdits() throws StdQTException
- This method starts a media-editing session.
QuickTime::BeginMediaEdits()
endEdits
public final void endEdits() throws StdQTException
- This method ends a media-editing session.
QuickTime::EndMediaEdits()
setDefaultDataRefIndex
public final void setDefaultDataRefIndex(int index) throws StdQTException
- This method allows your application to determine the default index for a media.
QuickTime::SetMediaDefaultDataRefIndex()
- Parameters:
- index - Specifies the index of the data ref.
getDataHandlerDescription
public final HandlerInfo getDataHandlerDescription(int index) throws StdQTException
- This method allows your application to retrieve information about a media's data handler.
QuickTime::GetMediaDataHandlerDescription()
- Parameters:
- index - Identifies the data reference.
- Returns:
- a HandlerInfo object.
getSampleDescriptionCount
public final int getSampleDescriptionCount() throws StdQTException
- This method returns the number of sample descriptions in a media.
QuickTime::GetMediaSampleDescriptionCount()
- Returns:
- the number of sample descriptions in a media.
getSampleCount
public final int getSampleCount() throws StdQTException
- This method allows you to determine the number of samples in a media.
QuickTime::GetMediaSampleCount()
- Returns:
- an integer that specifies the number of samples in the specified media.
getSyncSampleCount
public final int getSyncSampleCount() throws StdQTException
- This method allows you to determine the number of samples in a media.
QuickTime::GetMediaSyncSampleCount()
- Returns:
- an integer that specifies the number of samples in the specified media.
sampleNumToMediaTime
public final TimeInfo sampleNumToMediaTime(int logicalSampleNum) throws StdQTException
- This method allows you to find the time at which a specified sample plays.
QuickTime::SampleNumToMediaTime()
- Parameters:
- logicalSampleNum - Specifies the sample number.
- Returns:
- a TimeInfo object that contains the time and duration of the sample.
timeToSampleNum
public final SampleTimeInfo timeToSampleNum(int time) throws StdQTException
- This method allows you to find the sample that contains the data for a specified time.
QuickTime::MediaTimeToSampleNum()
- Parameters:
- time - Specifies the time for which you are retrieving sample information.
- Returns:
- a SampleTimeInfo object that contains the sample time and sample duration for the specified sample.
addSample
public final int addSample(QTHandleRef data,
int dataOffset,
int dataSize,
int durationPerSample,
SampleDescription sampleDesc,
int numberOfSamples,
int sampleFlags) throws StdQTException
- This method adds sample data and a description to a media object.
QuickTime::AddMediaSample()
- Parameters:
- 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.
- Returns:
- the time where the sample was inserted.
getSample
public final MediaSample getSample(int maxSizeToGrow,
int time,
int maxNumberOfSamples) throws QTException
- This method returns a sample from a movie data file.
QuickTime::GetMediaSample()
- Parameters:
- 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.
- Returns:
- a MediaSample object specifying the media sample.
addSampleReference
public final int addSampleReference(int dataOffset,
int dataSize,
int durationPerSample,
SampleDescription sampleDesc,
int numberOfSamples,
int sampleFlags) throws StdQTException
- This method allows your application to work with samples that have already been added to a movie data file.
QuickTime::AddMediaSampleReference()
- Parameters:
- 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.
- Returns:
- the time where the reference was inserted
getSampleReference
public final SampleInfo getSampleReference(int time,
int maxNumberOfSamples) throws QTException
- This method allows your application to obtain reference information about samples that are stored in a movie data file.
QuickTime::GetMediaSampleReference()
- Parameters:
- time - Specifies the starting time of the sample reference to be retrieved.
- maxNumberOfSamples - Specifies the maximum number of samples to be returned.
- Returns:
- a SampleInfo object.
addSampleReference
public final int addSampleReference(SampleDescription sampleDescription,
int numOfSamples,
SampleReferenceVector sampleRefs) throws StdQTException
- Allows your application to add groups of sample references to a movie data file.
QuickTime::AddMediaSampleReferences()
- Parameters:
- sampleDescription - describes characteristics about the sample references
- numOfSamples - the number of references added
- sampleRefs - the references add, there must be at least as many references in the vector
as numOfSamples (there may be more).
- Returns:
- the time where the reference was inserted
getSampleReferences
public final SampleReferenceInfo getSampleReferences(int time,
int maxNumberOfSamples) throws QTException
- This method allows your application to obtain reference information about samples that are stored in a movie data file.
QuickTime::GetMediaSampleReferences()
- Parameters:
- time - secifies the starting time of the sample reference to be retrieved.
- maxNumberOfSamples - Specifies the maximum number of samples to be returned.
- Returns:
- a SampleReferenceInfo object.
setPreferredChunkSize
public final void setPreferredChunkSize(int maxChunkSize) throws StdQTException
- This method allows your application to specify a preferred chunk size for the media.
QuickTime::SetMediaPreferredChunkSize()
- Parameters:
- maxChunkSize - Specifies the prefered maximum chunk size.
getPreferredChunkSize
public final int getPreferredChunkSize() throws StdQTException
- This method returns the preferred chunck size for the media.
QuickTime::GetMediaPreferredChunkSize()
- Returns:
- the preferred chunck size for the media.
setShadowSync
public final void setShadowSync(int frameDiffSampleNum,
int syncSampleNum) throws StdQTException
- This method creates an association between the indicated frame difference sample
and a specified self-contained sample in a given media.
QuickTime::SetMediaShadowSync()
- Parameters:
- frameDiffSampleNum - Specifies a frame difference sample.
- syncSampleNum - Specifies a shadow sync sample.
getShadowSync
public final int getShadowSync(int frameDiffSampleNum) throws StdQTException
- This method returns the sample number of the shadow sync associated with a given frame difference sample number.
QuickTime::GetMediaShadowSync()
- Returns:
- the sample number of the shadow sync.
getNextInterestingTime
public final TimeInfo getNextInterestingTime(int interestingTimeFlags,
int time,
float rate) throws StdQTException
- This method searches for times of interest in a media.
QuickTime::GetMediaNextInterestingTime()
- 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 that specifies the first found interesting time.
getDataSize
public final 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 media segment.
QuickTime::GetMediaDataSize()
- 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.
- Returns:
- the data size.
getDataRef
public final DataRef getDataRef(int index) throws QTException
- This method returns a copy of a specified data reference.
QuickTime::GetMediaDataRef()
- Parameters:
- index - Identifies the data reference.
- Returns:
- a copy of a specified data reference.
setDataRef
public final void setDataRef(int index,
DataRef dataReference) throws StdQTException
- This method changes the file that the specified media identifies as the location for its data storage.
QuickTime::SetMediaDataRef()
- Parameters:
- index - the index value at which to add the data.
- dataRef - Specifies the data reference.
setDataRefAttributes
public final void setDataRefAttributes(int index,
int dataRefAttributes) throws StdQTException
- No QTDocumentation.
QuickTime::SetMediaDataRefAttributes()
addDataRef
public final int addDataRef(DataRef dataReference) throws StdQTException
- This method adds a data reference to a media.
QuickTime::AddMediaDataRef()
- Parameters:
- dataReference - Specifies the data reference.
- Returns:
- the index value that is assigned to the new data reference.
getDataRefCount
public final int getDataRefCount() throws StdQTException
- This method allows your application to determine the number of data references in a media.
QuickTime::GetMediaDataRefCount()
- Returns:
- the number of data references in the media.
setPlayHints
public final void setPlayHints(int flags,
int flagsMask) throws StdQTException
- This method allows your application to provide information to the Movie Toolbox
that can influence playback of a single media.
QuickTime::SetMediaPlayHints()
- Parameters:
- 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.
getPlayHints
public final int getPlayHints(int flags,
int flagsMask) throws StdQTException
- This method allows your application to get information from the Movie Toolbox
that determines the current state of playback of a single media.
QuickTime::GetMediaPlayHints()
- Parameters:
- 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.
setPropertyAtom
public final void setPropertyAtom(AtomContainer propertyAtom) throws StdQTException
- No QT Documentation.
QuickTime::SetMediaPropertyAtom()
getPropertyAtom
public final AtomContainer getPropertyAtom() throws StdQTException
- Retrieves the properties from a media handler.
QuickTime::GetMediaPropertyAtom()
- Returns:
- Contains the property atoms for the track associated with the media handler.
loadIntoRam
public final void loadIntoRam(int time,
int duration,
int flags) throws StdQTException
- This method loads a media's data into memory.
QuickTime::LoadMediaIntoRam()
- Parameters:
- time - starting time of the media segment to load.
- duration - duration of the media segment to load
- flags - control the loading operation
All Packages Class Hierarchy This Package Previous Next Index