Class: TMediaRegistryCaller

Declaration: MediaRegistry.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

MRemoteCaller

Inherited By:

None.

Purpose:

The TMediaRegistryCaller class provides access to the global media registry server. It provides functions for installing, retrieving, removing, and specifying a default selection of media components and sequences. The TMediaRegistryCaller takes a TMediaComponentType as input and looks up all installed media components of that type. In addition to media components, the registry keeps a list of TMediaSequenceCreators. When looking up media sequences, the media registry accepts a TFileSystemEntity as input and iterates over all the registered sequence creators until it finds one which can convert the entity into a sequence of its type. When creating new sequences, the registry uses whatever sequence creator has been designated as the default.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

None.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

None.

Member Function: TMediaRegistryCaller::TMediaRegistryCaller

TMediaRegistryCaller ()

Interface Category:

API.

Purpose:

Default constructor.

Calling Context:

Called by the stream-in operators.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaRegistryCaller::~TMediaRegistryCaller

virtual ~ TMediaRegistryCaller ()

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:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaRegistryCaller::AddComponentEntry

virtual void AddComponentEntry (const TMediaComponent &)

Interface Category:

API.

Purpose:

Adds a media component to the media registry. The developer adds the new media component to the registry by first instantiating a TMediaRegistryCaller object, then invoking AddComponentEntry.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaRegistryCaller::LookupComponents

virtual void LookupComponents (const TMediaComponentType &, TSequenceOf < TMediaComponent > &)

Interface Category:

API.

Purpose:

Retrieves a collection of media components of the specified type from among the registered components.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The caller provides the target TSequence and adopts storage for the components that are added to it.

Member Function: TMediaRegistryCaller::RemoveComponentEntry

virtual void RemoveComponentEntry (const TMediaComponent &)

Interface Category:

API.

Purpose:

Removes a media component entry from the media registry.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaRegistryCaller::SetDefaultComponent

virtual void SetDefaultComponent (const TMediaComponent &)

Interface Category:

API.

Purpose:

Sets the specified media component to be the default media component; that is, the component that is created in response to subsequent calls to CreateDefaultComponent.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaRegistryCaller::CreateDefaultComponent

virtual TMediaComponent * CreateDefaultComponent (const TMediaComponentType &)

Interface Category:

API.

Purpose:

Creates an instance of the default component that has been specified by a previous call to SetDefaultComponent.

Calling Context:

Called by the Media UI classes and by the various derived component classes, such as TGraphicPlayer, when their create default functions are invoked.

Parameters:

Return Value:

Returns a pointer to the newly created TMediaComponent object.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaRegistryCaller::AddSequenceEntry

virtual void AddSequenceEntry (const TMediaSequenceCreator &)

Interface Category:

API.

Purpose:

Adds a media sequence creator object to the registry.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaRegistryCaller::RemoveSequenceEntry

virtual void RemoveSequenceEntry (const TMediaSequenceCreator &)

Interface Category:

API.

Purpose:

Removes the media sequence creator object from the registry.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaRegistryCaller::SetDefaultSequence

virtual void SetDefaultSequence (const TMediaSequenceCreator &)

Interface Category:

API.

Purpose:

Sets the specified media sequence creator object as the default sequence creator for its media type; that is, the creator that is created in response to subsequent calls to CreateNewSequence.

Calling Context:

Call this function directly.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaRegistryCaller::CreateSequence

virtual TMediaSequence * CreateSequence (const TFileSystemEntity &, MOpenFile :: EPermissionsForMe =MOpenFile :: kRead, MOpenFile :: EPermissionsForOthers =MOpenFile :: kAllowRead) const

Interface Category:

API.

Purpose:

Attempts to creates a media sequence derived class from the specified file. Note that the file must exist on disk.

Calling Context:

Called directly to convert a data file to the appropriate media sequence derived class.

Parameters:

Return Value:

Returns a pointer to the created media sequence, or NIL if it can't create the sequence.

Exceptions:

Throws TTimeMediaException::kUnknownSequence if no valid sequence derived class can be created.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaRegistryCaller::CreateNewSequence

virtual TMediaSequence * CreateNewSequence (const TMediaType &, TDirectory & directory, const TFileSystemEntityName &, MOpenFile :: EPermissionsForOthers =MOpenFile :: kAllowRead) const

Interface Category:

API.

Purpose:

Creates a new default media sequence derived class for the specified media type.

Calling Context:

Called directly to create a new media sequence of the desired type.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TMediaRegistryCaller::Shutdown

virtual void Shutdown ()

Interface Category:

API.

Purpose:

Shuts down TimeMedia registry server.

Calling Context:

Called directly to shut down the registry server.

Parameters:

Return Value:

None.

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.