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.
- TMediaSequenceCreator ()
- TMediaSequenceCreator (const TMediaSequenceCreator &)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
Calling Context:
- Called by the stream-in operators.
- Called to copy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Multithread safe.
Other Considerations:
None.
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.
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.
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.
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:
- const TFileSystemEntity & file -A reference to the media sequence data file.
- MOpenFile :: EPermissionsForMe forMe -The access permissions for the creating process.
- MOpenFile :: EPermissionsForOthers forOthers -The access permissions for other processes.
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.
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:
- const TFileSystemEntity & file -A reference to the media data file.
- MOpenFile :: EPermissionsForOthers forOthers -The access permissions for processes other than the creator. Permissions for the creator are assumed to be MOpenFile::kReadWrite.
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.
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.
virtual TStream & operator <<= (TStream & fromWhere)
Interface Category:
API.
Purpose:
Stream-in operator.
Calling Context:
Called to stream in data.
Parameters:
- TStream & fromWhere -The stream from which the object is streamed in.
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.
virtual TStream & operator >>=(TStream & toWhere) const
Interface Category:
API.
Purpose:
Stream-out operator.
Calling Context:
Called to stream out data.
Parameters:
- TStream & toWhere -The stream to which this object is streamed out.
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.
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.
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.
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.