MediaStreamContainer::getInternalInterface Method

Returns a reference to an internal interface.
Syntax:
template<class TItf>
smart_com<TItf> getInternalInterface( smart_com<TItf>& pItf ) const;
template<class TItf>
smart_com<TItf> getInternalInterface( REFIID riid, smart_com<TItf>& pItf ) const;

Parameter Description
pItf

A smart_com to an interface reference.

riid

An interface ID.

Return value:

A reference to the interface requested or 0, if the interface is not supported.

Remarks:

This method allows it to fetch a custom interface from a media stream container.

To use this method, the compiler must support the __uuidof operator.

If the compiler supports the __declspec( uuid( "iid" ) ) option, an iid can be assigned to the interface this way. If the compiler does not support this option, the iid must be passed to the method as a parameter.

Sample:

This example shows how to fetch an interface from a codec.

smart_com<IMSCInterface> pItf;
if( pContainer->getInternalInterface( pItf ) == 0 )
{
    ... // interface is not supported, so error handling
}
else
{
    ... // use the interface
}

See also: MediaStreamContainer, smart_com

<< MediaStreamContainer