Export (0) Print
Expand All

IMFTopologyServiceLookup::LookupService method

Retrieves an interface from the enhanced video renderer (EVR), or from the video mixer or video presenter.

Syntax


HRESULT LookupService(
  [in]       MF_SERVICE_LOOKUP_TYPE Type,
  [in]       DWORD dwIndex,
  [in]       REFGUID guidService,
  [in]       REFIID riid,
  [out]      LPVOID *ppvObjects,
  [in, out]  DWORD *pnObjects
);

Parameters

Type [in]

Specifies the scope of the search. Currently this parameter is ignored. Use the value MF_SERVICE_LOOKUP_GLOBAL.

dwIndex [in]

Reserved, must be zero.

guidService [in]

Service GUID of the requested interface.

riid [in]

Interface identifier of the requested interface.

ppvObjects [out]

Array of interface pointers. If the method succeeds, each member of the array contains either a valid interface pointer or NULL. The caller must release the interface pointers when the EVR calls IMFTopologyServiceLookupClient::ReleaseServicePointers (or earlier). If the method fails, every member of the array is NULL.

pnObjects [in, out]

Pointer to a value that specifies the size of the ppvObjects array. The value must be at least 1. In the current implementation, there is no reason to specify an array size larger than one element. The value is not changed on output.

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codeDescription
S_OK

The method succeeded.

E_INVALIDARG

Invalid argument.

E_NOINTERFACE

The requested interface is not available.

MF_E_NOTACCEPTING

The method was not called from inside the IMFTopologyServiceLookupClient::InitServicePointers method. See Remarks.

MF_E_UNSUPPORTED_SERVICE

The object does not support the specified service GUID.

 

Remarks

This method can be called only from inside the IMFTopologyServiceLookupClient::InitServicePointers method. At any other time, the method returns MF_E_NOTACCEPTING.

The presenter can use this method to query the EVR and the mixer. The mixer can use it to query the EVR and the presenter. Which objects are queried depends on the caller and the service GUID, as shown in the following table.

CallerService GUIDObjects queried
PresenterMR_VIDEO_RENDER_SERVICEEVR
PresenterMR_VIDEO_MIXER_SERVICEMixer
MixerMR_VIDEO_RENDER_SERVICEPresenter and EVR

 

The following interfaces are available from the EVR:

  • IMediaEventSink. This interface is documented in the DirectShow SDK documentation.

  • IMFClock interface. This interface is available if the EVR has access to a clock (reference clock in DirectShow or presentation clock in Media Foundation). This interface might not be available. Presenter and mixers must be able to process data without a clock. If the IMFClock interface is available, you can also get these related interfaces:

The following interfaces are available from the mixer:

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Evr.h

Library

Strmiids.lib

See also

IMFTopologyServiceLookup
How to Write an EVR Presenter

 

 

Community Additions

ADD
Show:
© 2014 Microsoft