Type negotiation

When you connect two components, type negotiation takes place between the input port surrogate and the output port surrogate. The output port surrogate queries the input port surrogate for the types it supports and then searches the list of types. If the two surrogate ports share a supported type, the connection is made, otherwise an exception is thrown.

Similarly, when you pass a media player a sequence, the player negotiates with the sequence to determine whether it can play that type of sequence.

TMediaType indicates the types of data that can be passed between ports or contained within media sequences. The system provides five predefined media types that are accessed by calling the following static member functions:

Media components are also categorized according to type. Component type information is represented by TMediaComponentType, which is derived form TMediaType. TMediaComponentType provides five categories for media components that are accessed by calling the following static member functions:

You can use the component types to create default media components through the Media Registry. If you pass TMediaRegistryCaller::CreateDefaultComponent a component type, the registry creates a default component of that type.

The Audio framework provides a special kind of component for performing explicit type conversion. See Chapter 13, "Audio," for more information about audio types and audio type converters.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker