Class: TMediaSequenceCreator

Declaration: MediaSequenceCreator.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

None.

Purpose:

TMediaSequenceCreator is the base class that encapsulates the process of converting a data file to a media sequence derived class. Use the functions of this class to identify the format of a data file and to create the appropriate TMediaSequence derived class. Developers who add new media sequence derived classes must also provide a corresponding media sequence creator object. The media sequence derived class is registered with the Media framework by creating a TMediaRegistry client and using its appropriate member functions.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Classes deriving from TMediaSequenceCreator should override the GetMediaType, the CreateSequence, and the CreateNewSequence functions.

Concurrency:

Multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TMediaSequenceCreator::TMediaSequenceCreator

  1. TMediaSequenceCreator ()
  2. TMediaSequenceCreator (const TMediaSequenceCreator &)

Interface Category:

API.

Purpose:

  1. Default constructor.
  2. Copy constructor.

Calling Context:

  1. Called by the stream-in operators.
  2. Called to copy an object.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TMediaSequenceCreator::~TMediaSequenceCreator

virtual ~ TMediaSequenceCreator ()

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: TMediaSequenceCreator::operator=

TMediaSequenceCreator & operator =(const TMediaSequenceCreator &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

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

Multithread safe.

Other Considerations:

None.

Member Function: TMediaSequenceCreator::GetMediaType

virtual const TMediaType & GetMediaType () const

Interface Category:

API.

Purpose:

Identifies the type of data contained in the media sequence derived class created by this creator.

Calling Context:

This function is called by the media registry to locate the default sequence creator for a specified media type.

Parameters:

Return Value:

Returns the TMediaType of the data contained in the resulting media sequence derived class.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

Deriving classes should override this function for their specific needs.

Member Function: TMediaSequenceCreator::CreateSequence

virtual TMediaSequence * CreateSequence (const TFileSystemEntity & file, MOpenFile :: EPermissionsForMe forMe, MOpenFile :: EPermissionsForOthers forOthers) const

Interface Category:

API.

Purpose:

Attempts to create a media sequence from the specified file. Access permissions are established for the creator and for other processes.

Calling Context:

The registry calls this function to create a media sequence derived class from a media data file.

Parameters:

Return Value:

Returns a pointer to the new TMediaSequence derived class or NIL if the creator is unable to recognize the format of the file.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

Deriving classes should override this function for their specific needs.

Member Function: TMediaSequenceCreator::CreateNewSequence

virtual TMediaSequence * CreateNewSequence (const TFileSystemEntity & file, MOpenFile :: EPermissionsForOthers forOthers) const

Interface Category:

API.

Purpose:

Creates a new media sequence derived class from the specified data file.

Calling Context:

The registry calls this function to create a new instance of the default media sequence derived class for a specified media type.

Parameters:

Return Value:

Returns a pointer to a new instance of the media sequence derived class associated with this sequence creator.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

Deriving classes should override this function for their specific needs.

Member Function: TMediaSequenceCreator::Hash

virtual long Hash () const

Interface Category:

API.

Purpose:

Returns the hash value that uniquely identifies this object within its type. Hash values are used to build dictionaries of objects.

Calling Context:

Call this function directly.

Parameters:

Return Value:

Returns the hash value that uniquely identifies this object

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TMediaSequenceCreator::operator<<=

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

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Called to stream in data.

Parameters:

Return Value:

Returns a reference to the stream the object streams itself in from.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TMediaSequenceCreator::operator>>=

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

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Called to stream out data.

Parameters:

Return Value:

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

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TMediaSequenceCreator::GetAudioType

const TMediaType & GetAudioType () const

Interface Category:

API.

Purpose:

Convenience function which creates a TMediaType for audio data.

Calling Context:

Call this function when overriding GetMediaType for an audio sequence creator.

Parameters:

Return Value:

Returns a reference to a TMediaType containing the token for audio data.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TMediaSequenceCreator::GetMIDIType

const TMediaType & GetMIDIType () const

Interface Category:

API.

Purpose:

Convenience function which creates a TMediaType for MIDI data.

Calling Context:

Call this function when overriding GetMediaType for a MIDI sequence creator.

Parameters:

Return Value:

Returns a reference to a TMediaType containing the token for MIDI data.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Multithread safe.

Other Considerations:

None.

Member Function: TMediaSequenceCreator::GetMovieType

const TMediaType & GetMovieType () const

Interface Category:

API.

Purpose:

Convenience function which creates a TMediaType for movie data.

Calling Context:

Call this function when overriding GetMediaType for a movie sequence creator.

Parameters:

Return Value:

Returns a reference to a TMediaType containing the token for movie data.

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.