Class: TQuickTimeMovie

Declaration: QuickTime.h

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.

Member Function: TQuickTimeMovie::TQuickTimeMovie

  1. TQuickTimeMovie ()
  2. TQuickTimeMovie (const TFileSystemEntity & file, MOpenFile :: EPermissionsForMe forMe =MOpenFile :: kRead, MOpenFile :: EPermissionsForOthers forOthers =MOpenFile :: kAllowRead)
  3. TQuickTimeMovie (const TQuickTimeMovie & original)

Interface Category:

API.

Purpose:

  1. Default constructor. Default constructors are provided only for assignment
  2. and in-streaming. Default-constructed objects are not valid and should not be c opied or streamed themselves.
  3. Constructor.
  4. Copy constructor.

Calling Context:

  1. Called by the stream-in operators and to create an empty object.
  2. Called to create an object from a file.
  3. Called to copy an object.

Parameters:

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.

Member Function: TQuickTimeMovie::~TQuickTimeMovie

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.

Member Function: TQuickTimeMovie::GetDataSize

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.

Member Function: TQuickTimeMovie::GetDuration

virtual void GetDuration (TTime & time) const

Interface Category:

API.

Purpose:

Returns the movie duration.

Calling Context:

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::SetDuration

virtual void SetDuration (const TTime & time)

Interface Category:

API.

Purpose:

Sets the movie duration.

Calling Context:

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::GetRate

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.

Member Function: TQuickTimeMovie::GetTimeBase

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.

Member Function: TQuickTimeMovie::GetVersion

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.

Member Function: TQuickTimeMovie::IsReadOnly

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.

Member Function: TQuickTimeMovie::GetFile

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:

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:

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.

Member Function: TQuickTimeMovie::Read

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TQuickTimeMovie::SeekAdvice

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TQuickTimeMovie::Seek

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:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TQuickTimeMovie::operator=

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.

Member Function: TQuickTimeMovie::operator>>=

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:

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.

Member Function: TQuickTimeMovie::operator<<=

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:

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.

Member Function: TQuickTimeMovie::Hash

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.