MESessionTopologySet event

Raised after the IMFMediaSession::SetTopology method completes asynchronously. The Media Session raises this event after it resolves the topology into a full topology and queues the topology for playback.

Event values

Possible values retrieved from IMFMediaEvent::GetValue include the following.

VARTYPE Description
VT_EMPTY
No event data.

VT_UNKNOWN
Pointer to the IMFTopology interface of the full topology.

Examples

The following example retrieves the IMFTopology pointer from an MESessionTopologySet event.

HRESULT GetTopologyFromEvent(IMFMediaEvent *pEvent, IMFTopology **ppTopology)
{
    HRESULT hr = S_OK;
    PROPVARIANT var;

    PropVariantInit(&var);
    hr = pEvent->GetValue(&var);
    if (SUCCEEDED(hr))
    {
        if (var.vt != VT_UNKNOWN)
        {
            hr = E_UNEXPECTED;
        }
    }
    if (SUCCEEDED(hr))
    {
        hr = var.punkVal->QueryInterface(__uuidof(IMFTopology), (void**)ppTopology);
    }
    PropVariantClear(&var);
    return hr;
}

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
Mfobjects.h (include Mfidl.h)

See also

Media Foundation Events