MEDeviceStreamCreated event

MEDeviceStreamCreated is an extended media event type generated with an MEUnknown media event by the Device MFT.

This extended media event type has no payload. Appropriate HRESULT should be provided via the IMFMediaEvent::GetStatus method.


This extended media event must be sent by the Device MFT as a part of the media type selection on the output stream of the DMFT. When the SetOutputStreamState is invoked on the IMFDeviceTransform interface, the DMFT is responsible for signaling the change in the required input stream states with the METransformInputStreamStateChanged media event. When the input stream state change has been acknowledged by the pipeline with the call into SetInputStreamState of the DMFT, the DMFT is responsible for completing its internal state configuration and raising the MEDeviceStreamCreated extended media event type.

If this extended media event type is not raised, the Device Transform Manager will not deliver any input frames to the DMFT. The extended media event type must also set as an attribute of the IMFMediaEvent, the output stream ID using the MF_EVENT_MFT_INPUT_STREAM_ID attribute.

IMFMediaEvent* pMediaEvent = nullptr;

hr = MFCreateMediaEvent (MEUnknown,
if (SUCCEEDED(hr))
    hr = pMediaEvent->SetUINT32(MF_EVENT_MFT_INPUT_STREAM_ID, GetOutputStreamId());

if (SUCCEEDED(hr))
    hr = m_pEventQueue->QueueEvent(pMediaEvent);

if (nullptr != pMediaEvent)
    pMediaEvent = nullptr;

return hr;


Requirement Value
Minimum supported client
Windows 10 [desktop apps only]
Minimum supported server
Windows Server 2016 [desktop apps only]

See also

Media Foundation Events

Streaming Audio Renderer