Esempio n. 1
0
static HRESULT WINAPI
IMediaPosition_fnCanSeekForward(IMediaPosition* iface,LONG* pCanSeek)
{
	CFilterGraph_THIS(iface,mediaposition);
	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].pPosition != NULL )
		{
			hrFilter = IMediaPosition_CanSeekForward( This->m_pActiveFilters[n].pPosition, pCanSeek );
			if ( hr == E_NOTIMPL )
			{
				hr = hrFilter;
			}
			else
			if ( hrFilter != E_NOTIMPL )
			{
				if ( SUCCEEDED(hr) )
					hr = hrFilter;
			}
		}
	}

	LeaveCriticalSection( &This->m_csFilters );

	return hr;
}
Esempio n. 2
0
static HRESULT WINAPI MediaPositionPassThru_CanSeekForward(IMediaPosition *iface, LONG *pCanSeekForward)
{
    PassThruImpl *This = impl_from_IMediaPosition(iface);
    IMediaPosition *pos;
    HRESULT hr;

    TRACE("(%p)\n", pCanSeekForward);

    hr = get_connected(This, &IID_IMediaPosition, (LPVOID*)&pos);
    if (SUCCEEDED(hr)) {
        hr = IMediaPosition_CanSeekForward(pos, pCanSeekForward);
        IMediaPosition_Release(pos);
    }
    else
        return E_NOTIMPL;
    return hr;
}