IC Imaging Control C++

MediaStreamContainer::getInternalInterface Method

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

Get in touch with us


About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us