Class: TMediaSequence

Declaration: TimeMedia.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

TAudioSequence TMIDISequence TMovieSequence TTimeGraphic

Purpose:

The base class for all types of media sequences. In this paradigm, a sequence is analogous to a real-world cassette and is placed into player (TPlayer) to be played or recorded.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

TMediaSequence is derived to create particular media sequence types (for example, TAudioSequence and TMIDISequence). These can be derived further. T8BitAudioSequence, for example, is a derived class of TAudioSequence. The common base class allows for polymorphic manipulation of different media sequence types because they all support the same public interface.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TMediaSequence::~TMediaSequence

virtual ~ TMediaSequence ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Called by derived classes.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaSequence::GetDuration

virtual void GetDuration (TTime & duration) const

Interface Category:

API.

Purpose:

Used to determine how long the media sequence is.

Calling Context:

Call directly to determine how long the media sequence is. Used by TPlayer derived classes.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaSequence::CreatePreferredTypeList

virtual void CreatePreferredTypeList (TSequenceOf< TMediaType > &) const

Interface Category:

API.

Purpose:

Provides a list of preferred media types for type negotiation.

Calling Context:

Call directly to determine the media types supported by this sequence. Used by TPlayer derived classes.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The client owns the storage for the created media types and is responsible for deleting them from the list.

Member Function: TMediaSequence::ChoosePreferredType

virtual TMediaType * ChoosePreferredType (const TSequenceOf< TMediaType > &) const

Interface Category:

API.

Purpose:

Provides the means to choose a preferred type during type negotiation. It attempts to match a type from the media sequence's preferred type list with one contained in the parameter list. If there is no match, it returns NIL.

Calling Context:

Called by TPlayer derived classes to negotiate a common preferred type.

Parameters:

Return Value:

TMediaType * -The chosen type or NIL if no selection can be made.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaSequence::CreateSubrange

virtual TMediaSequence * CreateSubrange (const TMediaRange & range) const

Interface Category:

API.

Purpose:

Creates a subsequence of the media sequence. Subranges can be used for editing or trimming a sequence.

Calling Context:

Call directly to create a subsequence of the media sequence.

Parameters:

Return Value:

TMediaSequence * -The new media sequence containing the specified subsequence.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaSequence::operator<<=

virtual TStream & operator <<= (TStream & fromWhere)

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called by derived classes. Used by ::Resurrect for polymorphic streaming.

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:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaSequence::operator>>=

virtual TStream & operator >>=(TStream & toWhere) const

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called by derived classes. Used by ::Flatten for polymorphic streaming.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself out to.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaSequence::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Generates a hash value.

Calling Context:

Called by collection classes.

Parameters:

Return Value:

Returns the hash value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaSequence::TMediaSequence

  1. TMediaSequence ()
  2. TMediaSequence (const TMediaSequence &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Protected -called by a derived class.
  2. Protected -called by a derived class.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaSequence::operator=

TMediaSequence & operator =(const TMediaSequence &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call directly when an object is assigned to another compatible object.

Parameters:

Return Value:

A non-const reference to the left-hand side object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

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