IMFActivate*  MFAudioEndpointControl::createActivate()
{
    clear();

    updateEndpoints();

    // Check if an endpoint is available ("Default" is always inserted)
    if (m_devices.count() <= 1)
        return NULL;

    setActiveOutput(m_defaultEndpoint);

    return m_currentActivate;
}
DirectShowAudioEndpointControl::DirectShowAudioEndpointControl(
        DirectShowPlayerService *service, QObject *parent)
    : QAudioOutputSelectorControl(parent)
    , m_service(service)
    , m_bindContext(0)
    , m_deviceEnumerator(0)
{
    if (CreateBindCtx(0, &m_bindContext) == S_OK) {
        m_deviceEnumerator = com_new<ICreateDevEnum>(CLSID_SystemDeviceEnum, IID_ICreateDevEnum);

        updateEndpoints();

        setActiveOutput(m_defaultEndpoint);
    }
}