Class: TMediaType

Declaration: TimeMedia.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MCollectible

Inherited By:

TAudioType TGraphicType TMIDIType TMediaComponentType TMovieType

Purpose:

The base class for representing the type of media handled by time-based media sequences and components.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

TMediaType is derived to provide type information for particular media components or media data formats, for example TMediaComponentType, TAudioType, TGraphicType, TMIDIType. Because this class has no virtual member functions, derived classes add new members rather than overriding the existing ones.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Member Function: TMediaType::TMediaType

  1. TMediaType ()
  2. TMediaType (const TMediaType &)
  3. TMediaType (const TToken & mediaTypeName)

Interface Category:

API.

Purpose:

  1. Default constructor. Defaults to the generic media type returned by GetMedia.
  2. Copy constructor.
  3. Creates a TMediaType, allowing the media type value to be specified.

Calling Context:

  1. Call directly to create a default object that will immediately be assigned to or streamed into. Used by TimeMediaRegistryServer.
  2. Call directly to copy an object. Used by TimeMediaRegistryServer.
  3. Call directly to create a fully specified audio type. Callers can use GetAudio, GetGraphic, or GetMIDI to create a predefined type, or they can pass in a TToken that they have defined. Called by TMediaComponent and derived classes.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaType::~TMediaType

virtual ~ TMediaType ()

Interface Category:

API.

Purpose:

Destructor.

Calling Context:

Call directly to destroy an object. Used by TimeMediaRegistryServer.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaType::operator=

TMediaType & operator =(const TMediaType &)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call directly when an object is assigned to another compatible object. Used by TimeMediaRegistryServer.

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.

Member Function: TMediaType::GetMediaType

TToken GetMediaType () const

Interface Category:

API.

Purpose:

Provides access to the data member associated with this class.

Calling Context:

Call directly to determine the value of this type. Used by TimeMediaRegistryServer and Media UI Framework.

Parameters:

Return Value:

TToken -Contains the value of this type.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None

Member Function: TMediaType::GetMedia

static const TToken & GetMedia ()

Interface Category:

API.

Purpose:

Defines a default media type value.

Calling Context:

Call directly when creating a TMediaType. Called by TMediaComponent and derived classes.

Parameters:

Return Value:

A TToken containing the predefined default media value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaType::GetAudio

static const TToken & GetAudio ()

Interface Category:

API.

Purpose:

Defines an audio type value.

Calling Context:

Call directly when creating a TMediaType. Called by TAudioType and by TSound.

Parameters:

Return Value:

A TToken containing the predefined audio value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaType::GetGraphic

static const TToken & GetGraphic ()

Interface Category:

API.

Purpose:

Defines a graphic type value for the graphic portion of the movie data.

Calling Context:

Call directly when creating a TMediaType. Called by TGraphicType.

Parameters:

Return Value:

A TToken containing the predefined graphic value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaType::GetMIDI

static const TToken & GetMIDI ()

Interface Category:

API.

Purpose:

Defines a MIDI type value.

Calling Context:

Call directly when creating a TMediaType. Called by TMIDIType and by TMIDI.

Parameters:

Return Value:

A TToken containing the predefined MIDI value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaType::GetMovie

static const TToken & GetMovie ()

Interface Category:

API.

Purpose:

Defines a movie type value.

Calling Context:

Call directly when creating a TMediaType. Called by TMovieType and by TMovie.

Parameters:

Return Value:

A TToken containing the predefined default movie value.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaType::operator<<=

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

Interface Category:

API.

Purpose:

Stream-in operator.

Calling Context:

Call directly to stream in data. Used by TimeMediaRegistryServer.

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

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

Interface Category:

API.

Purpose:

Stream-out operator.

Calling Context:

Call directly to stream out data. Used by TimeMediaRegistryServer.

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: TMediaType::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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.