Пример #1
0
static HRESULT WINAPI
IMediaSeeking_fnGetCapabilities(IMediaSeeking* iface,DWORD* pdwCaps)
{
	CFilterGraph_THIS(iface,mediaseeking);
	HRESULT	hr = E_NOTIMPL;
	HRESULT	hrFilter;
	DWORD	n;

	TRACE("(%p)->()\n",This);

	EnterCriticalSection( &This->m_csFilters );

	for ( n = 0; n < This->m_cActiveFilters; n++ )
	{
		if ( This->m_pActiveFilters[n].pSeeking != NULL )
		{
			hrFilter = IMediaSeeking_GetCapabilities( This->m_pActiveFilters[n].pSeeking, pdwCaps );
			if ( hr == E_NOTIMPL )
			{
				hr = hrFilter;
			}
			else
			if ( hrFilter != E_NOTIMPL )
			{
				if ( SUCCEEDED(hr) )
					hr = hrFilter;
			}
		}
	}

	LeaveCriticalSection( &This->m_csFilters );

	return hr;
}
Пример #2
0
static HRESULT WINAPI MediaSeekingPassThru_GetCapabilities(IMediaSeeking * iface, DWORD * pCapabilities)
{
    PassThruImpl *This = impl_from_IMediaSeeking(iface);
    IMediaSeeking *seek;
    HRESULT hr;
    TRACE("(%p/%p)->(%p)\n", iface, This, pCapabilities);
    hr = get_connected(This, &IID_IMediaSeeking, (LPVOID*)&seek);
    if (SUCCEEDED(hr)) {
        hr = IMediaSeeking_GetCapabilities(seek, pCapabilities);
        IMediaSeeking_Release(seek);
    }
    else
        return E_NOTIMPL;
    return hr;
}