Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TMovieSequence
Inherited By:
None.
Purpose:
An abstraction for QuickTime movie files.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
This class should not be derived from.
Concurrency:
Multithread safe.
Resource Use:
No special requirements.
- TQuickTimeMovie ()
- TQuickTimeMovie (const TFileSystemEntity & file, MOpenFile :: EPermissionsForMe forMe =MOpenFile :: kRead, MOpenFile :: EPermissionsForOthers forOthers =MOpenFile :: kAllowRead)
- TQuickTimeMovie (const TQuickTimeMovie & original)
Interface Category:
API.
Purpose:
- Default constructor. Default constructors are provided only for assignment
and in-streaming. Default-constructed objects are not valid and should not be c
opied or streamed themselves.
- Constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators and to create an empty object.
- Called to create an object from a file.
- Called to copy an object.
Parameters:
- Takes no parameters.
- const TFileSystemEntity & file -The file from which to create the object.
- MOpenFile :: EPermissionsForMe forMe =MOpenFile :: kRead -Specifies owner permissions for the file system. The value must be MOpenFile::kReadWrite for recording.
- MOpenFile :: EPermissionsForOthers forOthers =MOpenFile :: kAllowRead -Specifies non-owners' permissions for the file system.
- const TQuickTimeMovie & original -The object to copy.
Return Value:
None.
Exceptions:
Throws TTimeMediaException::kNoSequence if the movie is empty.
Throws TTimeMediaException::kNoSequence if the movie is corrupt.
Concurrency:
Multithread safe.
Other Considerations:
Note: The file system entity parameter used in constructing objects of this class contains an absolute pathname. When streamed, objects will continue to reference a file on the machine of origin.
virtual ~ TQuickTimeMovie ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Called to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual long GetDataSize () const
Interface Category:
API.
Purpose:
Returns the size of the movie data.
Calling Context:
Called by clients of the class.
Parameters:
Return Value:
size_t -The size of the movie data.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void GetDuration (TTime & time) const
Interface Category:
API.
Purpose:
Returns the movie duration.
Calling Context:
Called by clients of the class.
Parameters:
- TTime & time -Where to return the movie duration.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void SetDuration (const TTime & time)
Interface Category:
API.
Purpose:
Sets the movie duration.
Calling Context:
Called by clients of the class.
Parameters:
- const TTime & time -The new movie duration.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual long GetRate () const
Interface Category:
API.
Purpose:
Returns the preferred playback rate for the movie.
Calling Context:
Called by clients of the class.
Parameters:
Return Value:
long -The preferred playback rate.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual long GetTimeBase () const
Interface Category:
API.
Purpose:
Returns the movie time base.
Calling Context:
Called by clients of the class.
Parameters:
Return Value:
long -The movie time base.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual long GetVersion () const
Interface Category:
API.
Purpose:
Returns the QuickTime file format version.
Calling Context:
Called by clients of the class.
Parameters:
Return Value:
long -The QuickTime file format version.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual bool IsReadOnly () const
Interface Category:
API.
Purpose:
Determines if a movie is read-only.
Calling Context:
Called by clients of the class.
Parameters:
Return Value:
Returns true if the file is read-only.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual TFileSystemEntity GetFile () const
Interface Category:
API.
Purpose:
Gets the file entity.
Calling Context:
Called to get the file entity from which the object was created. Called by clients of the class.
Parameters:
Return Value:
The TFileEntity object used to create the movie.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TQuickTimeMovie::CreateSubrange
virtual TMediaSequence * CreateSubrange (const TMediaRange & range) const
Interface Category:
API.
Purpose:
Creates a new sequence that is a subset of the sequence. The range specifies the start time and duration of the subset.
Calling Context:
Called to create a subset of a sequence. This is an inexpensive operation. Called by clients of the class.
Parameters:
- const TMediaRange & range -A range specifying the start and duration of the subset.
Return Value:
TMediaSequence* -A new audio sequence that is a subset of the original.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TQuickTimeMovie::ChoosePreferredType
virtual TMediaType * ChoosePreferredType (const TSequenceOf < TMediaType > &) const
Interface Category:
API.
Purpose:
Given a collection of types, returns the type that the sequence can most easily supply. Some sequences can supply data in a number of formats.
Calling Context:
Called to determine the format the sequence would prefer to supply its data in. After calling this, you can then call SetChosenType to tell the sequence to supply the data in this format. Called by clients of the class.
Parameters:
Return Value:
TMediaType* -A pointer to a type that the sequence would prefer to supply its data in or NIL if no selection can be made. The instance of TMediaType pointed to is one of the types found in the passed in TSequenceOf parameter. Don't delete it unless you created it.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TQuickTimeMovie::CreatePreferredTypeList
virtual void CreatePreferredTypeList (TSequenceOf < TMediaType > &) const
Interface Category:
API.
Purpose:
Some sequences can supply data in a number of formats. This function fills in the TSequenceOf parameter with the types of movie data the movie sequence supports. The movie data types are represented by TMovieType.
Calling Context:
Called to determine at runtime what types of movie data a sequence supports. Called by clients of the class.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TQuickTimeMovie::AllocateNewChunk
virtual size_t AllocateNewChunk (long sizeInBytes, TMemorySurrogate & chunk)
Interface Category:
API.
Purpose:
Allocates a new chunk in a QuickTime movie.
Calling Context:
Called by the track class when a new chunk is needed.
Parameters:
- long sizeInBytes -The size of the chunk.
- TMemorySurrogate & chunk -The memory containing the new chunk.
Return Value:
The size that was allocated.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Member Function: TQuickTimeMovie::IsMemoryResident
virtual bool IsMemoryResident () const
Interface Category:
API.
Purpose:
Determines if the object is memory resident.
Calling Context:
Called by the track class when the handling of file objects requires knowledge of memory.
Parameters:
Return Value:
Returns true if the file object is memory resident.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void Read (TStream & buffer, StreamPosition size)
Interface Category:
API.
Purpose:
Reads data.
Calling Context:
Called by the track class when data needs to be read.
Parameters:
- TStream & buffer -The destination for data.
- StreamPosition size -The amount of data to read.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void SeekAdvice (long position)
Interface Category:
API.
Purpose:
Memory management.
Calling Context:
Called by the track class for efficiency in handling forthcoming Seek calls.
Parameters:
- long position -The location of a forthcoming Seek call.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual void Seek (StreamPosition position)
Interface Category:
API.
Purpose:
Repositions the stream.
Calling Context:
Called by the track class when the stream needs to be repositioned.
Parameters:
- StreamPosition position -The location to seek to.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
TQuickTimeMovie & operator =(const TQuickTimeMovie &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Called when an object is assigned to another compatible object. Called by clients of the class.
Parameters:
Return Value:
A non-const reference to the left-hand side object.
Exceptions:
Throws TTimeMediaException::kUnableToCopyObject if it's read-only.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual TStream & operator >>=(TStream & toWhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data. Called by clients of the class.
Parameters:
- TStream & toWhere -The stream the object streams itself out to.
Return Value:
Returns a reference to the stream the object streams itself out to.
Exceptions:
Throws TTimeMediaException::kUnableToStreamObject if the movie is writable.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual TStream & operator <<= (TStream & fromWhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data. Called by clients of the class.
Parameters:
- TStream & fromWhere -The stream the object streams itself in from.
Return Value:
Returns a reference to the stream the object streams itself in from.
Exceptions:
Throws TInvalidVersionError if the versions don't match.
Concurrency:
Multithread safe.
Other Considerations:
None.
virtual long Hash () const
Interface Category:
API.
Purpose:
Generates a hash value.
Calling Context:
Called when an object is put into a collection.
Parameters:
Return Value:
The hash value.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.