Microsoft DirectX 8.1 (C++)

CSeekingPassThru Class

The CSeekingPassThru class is a helper object that creates CPosPassThru and CRendererPosPassThru objects.

The CPosPassThru and CRendererPosPassThru classes are helper objects that pass seeking commands upstream. The CSeekingPassThru class is a helper object for creating these helper objects. DirectShow adds further support by packaging this class as a COM component. See SeekingPassThru for more information.

This class exposes the ISeekingPassThru interface. The ISeekingPassThru::Init method initializes the object. After the object is initialized, the filter can query it for the IMediaSeeking and IMediaPosition interfaces.

Filters can call the CreatePosPassThru helper function to create and initialize an instance of this object. The following code example is taken from a filter's QueryInterface method. It creates the helper object and queries it for a seeking interface:

if (riid == IID_IMediaPosition || riid == IID_IMediaSeeking) {
    if (m_pPosition == NULL) 
    {
        HRESULT hr = CreatePosPassThru(GetOwner(), FALSE, 
                        m_pFilter->m_pPin, &m_pPosition);
        if (FAILED(hr)) 
            return hr;
    }
    return m_pPosition->QueryInterface(riid, ppv);
}

Requirements

Header: Declared in Seekpt.h; include Streams.h.

Library: Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

Public Methods
CSeekingPassThru Constructor method.
~CSeekingPassThru Destructor method.
CreateInstance Creates an instance of the object.
ISeekingPassThru Methods  
Init Initializes the object.