|This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.|
This method searches the graph for a specified interface, starting from a specified filter. You can restrict the search to a section of the graph upstream or downstream of the filter, or restrict it to a particular pin category or media type.
HRESULT FindInterface( const GUID* pCategory, const GUID* pType, IBaseFilter* pf, REFIID riid, void** ppint );
[in] Pointer to a GUID that specifies the search criteria. See Remarks for more information. The following values are possible:
- A pin category from the
AMPROPERTY_PIN_CATEGORYproperty set (see
See Remarks for more information.
[in] Pointer to a GUID that specifies the major media type of an output pin, or NULL.
[in] Pointer to the IBaseFilter interfaceof the filter. The method begins searching from this filter.
[in] Interface identifier (IID) of the interface to locate.
[out] Address of a variable that receives the interface pointer. Be sure to release the retrieved interface pointer when you are done with the interface.
Returns an HRESULTvalue. Possible values include the following.
No such interface supported.
NULL pointer argument.
In a capture graph, various filters and pins might expose interfaces for setting properties such as compression parameters ( IAMVideoCompression interface) or stream formats ( IAMStreamConfig interface). You can use this method to find an interface, without writing special code that traverses the graph.
|Do not call this method to obtain an IVideoWindow Interfacepointer. Always query the filter graph manager for this interface. Otherwise, the filter graph manager will not respond correctly to changes in screen resolution and other events.|
If the pCategoryparameter is NULL, this method searches the entire graph for the requested interface. Starting from the filter specified by the pfparameter, it queries the following objects in the graph.
- The filter
- The filter's pins
- All the downstream filters, including their pins
- All the upstream filters, including their pins
You can restrict the search by setting the pCategory and pType parameters, as follows:
pCategoryequals &LOOK_UPSTREAM_ONLY, the search starts
from the filter's input pins and continues upstream. It does not
include the filter or anything downstream from the filter. The
pTypeparameter is ignored.
pCategoryequals &LOOK_DOWNSTREAM_ONLY, the search starts
from the filter's output pins and continues downstream. It does not
include the filter or anything upstream from the filter. The
pTypeparameter is ignored.
pCategoryspecifies a pin category, the downstream portion of
the search is restricted to output pins on the filter that match
both the pin category and the media type given in the
pTypeparameter. In this case, the method also searches the
filter and everything upstream from the filter.
Pin categories are useful for finding pin interfaces on capture filters. For example, a capture filter might have separate pins for capture and preview. If you specify a pin category, you should also specify the media type, to make certain the method selects the correct filter and pin.
Some video capture filters have a video port pin (PIN_CATEGORY_VIDEOPORT) instead of a preview pin. If you specify PIN_CATEGORY_PREVIEW and MEDIATYPE_Video (see Media Types), the method treats any video port pins as preview pins. Your application does not have to test for this possibility.
DirectShow applications and DirectShow filters have different include file and link library requirements.
For more information, see Setting Up the Build Environment.
|Windows Embedded CE||Windows Embedded CE 6.0 and later|
|Windows Mobile||Pocket PC for Windows Mobile Version 5.0 and later, Smartphone for Windows Mobile Version 5.0 and later|
|Note||Microsoft DirectShow applications and DirectShow filters have
different include file and Library requirements
For more information, see Setting Up the Build Environment
Media Types and Sub Types
ConceptsPin Property Set