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).


Method Index

 o addDataRef(DataRef)
This method adds a data reference to a media.
 o addSample(QTHandleRef, int, int, int, SampleDescription, int, int)
This method adds sample data and a description to a media object.
 o 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.
 o addSampleReference(SampleDescription, int, SampleReferenceVector)
Allows your application to add groups of sample references to a movie data file.
 o beginEdits()
This method starts a media-editing session.
 o endEdits()
This method ends a media-editing session.
 o fromTrack(Track)
Returns a Media class that corresponds to the media that contains a track's data.
 o getCreationTime()
This method returns the creation date stored in the media.
 o getDataHandler(int)
This method allows you to determine a media's data handler.
 o getDataHandlerDescription(int)
This method allows your application to retrieve information about a media's data handler.
 o getDataRef(int)
This method returns a copy of a specified data reference.
 o getDataRefCount()
This method allows your application to determine the number of data references in a media.
 o getDataSize(int, int)
This method allows your application to determine the size, in bytes, of the sample data in a media segment.
 o getDuration()
This method returns the duration of a media.
 o getHandler()
This method allows you to obtain a reference to a media handler component.
 o getHandlerDescription()
This method allows your application to retrieve information about a media handler.
 o getInputMap()
This method returns you the input map of the media.
 o getLanguage()
This method returns a media's language or region code.
 o getModificationTime()
This method returns a media's modification date.
 o getNextInterestingTime(int, int, float)
This method searches for times of interest in a media.
 o 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.
 o getPreferredChunkSize()
This method returns the preferred chunck size for the media.
 o getPropertyAtom()
Retrieves the properties from a media handler.
 o getQuality()
This method returns a media's quality level value.
 o getSample(int, int, int)
This method returns a sample from a movie data file.
 o getSampleCount()
This method allows you to determine the number of samples in a media.
 o getSampleDescription(int)
This method allows you to retrieve a sample description from a media.
 o getSampleDescriptionCount()
This method returns the number of sample descriptions in a media.
 o getSampleReference(int, int)
This method allows your application to obtain reference information about samples that are stored in a movie data file.
 o getSampleReferences(int, int)
This method allows your application to obtain reference information about samples that are stored in a movie data file.
 o getShadowSync(int)
This method returns the sample number of the shadow sync associated with a given frame difference sample number.
 o getSyncSampleCount()
This method allows you to determine the number of samples in a media.
 o getTimeScale()
This method allows your application to determine a media's time scale.
 o getTrack()
This method allows you to determine the track that uses a specified media.
 o getTrackMedia(Track)
Returns a Media class that corresponds to the media that contains a track's data.
 o getUserData()
This method allows your application to obtain access to a media's user data list.
 o loadIntoRam(int, int, int)
This method loads a media's data into memory.
 o newFromType(int, Track, int, DataRef)
Creates a media struct for the specified Track object.
 o sampleNumToMediaTime(int)
This method allows you to find the time at which a specified sample plays.
 o setDataHandler(int, DataHandler)
This method allows you to assign a data handler to a media.
 o setDataRef(int, DataRef)
This method changes the file that the specified media identifies as the location for its data storage.
 o setDataRefAttributes(int, int)
No QTDocumentation.
 o setDefaultDataRefIndex(int)
This method allows your application to determine the default index for a media.
 o setHandler(MediaHandler)
This method allows you to assign a specific media handler to a track.
 o setInputMap(AtomContainer)
This method allows you to set a new input map for a media.
 o setLanguage(int)
This method sets a media's language or region code.
 o setPlayHints(int, int)
This method allows your application to provide information to the Movie Toolbox that can influence playback of a single media.
 o setPreferredChunkSize(int)
This method allows your application to specify a preferred chunk size for the media.
 o setPropertyAtom(AtomContainer)
No QT Documentation.
 o setQuality(int)
This method sets a media's quality level value.
 o setSampleDescription(int, SampleDescription)
This method lets you change the contents of a particular sample description of a specified media.
 o setShadowSync(int, int)
This method creates an association between the indicated frame difference sample and a specified self-contained sample in a given media.
 o setTimeScale(int)
This method allows your application to set a media's time scale.
 o timeToSampleNum(int)
This method allows you to find the sample that contains the data for a specified time.

Methods

 o 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.
 o 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
 o 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
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o getModificationTime
 public final int getModificationTime() throws StdQTException
This method returns a media's modification date.

QuickTime::GetMediaModificationTime()

Returns:
a media's modification date.
 o 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.
 o 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.
 o getDuration
 public final int getDuration() throws StdQTException
This method returns the duration of a media.

QuickTime::GetMediaDuration()

Returns:
the duration of a media.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o beginEdits
 public final void beginEdits() throws StdQTException
This method starts a media-editing session.

QuickTime::BeginMediaEdits()

 o endEdits
 public final void endEdits() throws StdQTException
This method ends a media-editing session.

QuickTime::EndMediaEdits()

 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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
 o 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.
 o 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
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o 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.
 o setDataRefAttributes
 public final void setDataRefAttributes(int index,
                                        int dataRefAttributes) throws StdQTException
No QTDocumentation.

QuickTime::SetMediaDataRefAttributes()

 o 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.
 o 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.
 o 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.
 o 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.
 o setPropertyAtom
 public final void setPropertyAtom(AtomContainer propertyAtom) throws StdQTException
No QT Documentation.

QuickTime::SetMediaPropertyAtom()

 o 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.
 o 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