如果我在 pjsip sdk 中设置 AccountVideoConfig::autoTransmitOutgoing false,我无法显示 window 远程

If I set AccountVideoConfig::autoTransmitOutgoing false in pjsip sdk, I can not show window remote

如果我在pjsip sdk中设置AccountVideoConfig::autoTransmitOutgoingfalse,我就无法显示window远程,并且没有视频数据的画面是绿色的,不知道为什么?但需要注意的是,如果AccountVideoConfig::autoTransmitOutgoing设置为false,则不会向远端发送视频数据,而可以从远端接收和显示window。发生了什么事?

这是我的代码:

PJSIP_DDAPI_STATUS_CODE PjsuaDDApiInterface::registerAcct() {
    if (m_pAcct) {
        return E_HAS_OPERATED;
    }
    std::string idUri = "sip:" + m_myAcctInfo.str_acct + "@" + m_myAcctInfo.str_domain;
    std::string registrarUri = "sip:" + m_myAcctInfo.str_domain;
    m_aCfg.idUri = idUri;
    m_aCfg.regConfig.registrarUri = registrarUri;
    AuthCredInfo cred("digest", "*", m_myAcctInfo.str_acct, 0, m_myAcctInfo.str_pwd);
    m_aCfg.sipConfig.authCreds.push_back(cred);
    m_aCfg.callConfig.timerMinSESec = 90;
    m_aCfg.callConfig.timerSessExpiresSec = 1800;

    m_aCfg.videoConfig.autoShowIncoming = false;
    m_aCfg.videoConfig.autoTransmitOutgoing = false;
    m_aCfg.videoConfig.defaultCaptureDevice = PJMEDIA_VID_DEFAULT_CAPTURE_DEV;
    m_aCfg.videoConfig.defaultRenderDevice = PJMEDIA_VID_DEFAULT_RENDER_DEV;
    try {
        m_pAcct = new DdAccount();
        m_pAcct->create(m_aCfg);
    }
    catch (Error &err) { 
        if (m_pAcct != NULL) {
            delete m_pAcct;
            m_pAcct = NULL;
        }
        PJ_LOG(3, (THIS_FILE, "registerAcct failed, %s:%d", err.info().c_str(), __LINE__)); 
        return E_OTHER_ERROR;
    }
    return E_SIPDD_SUCCESS;
}

我通过在 dshow_dev.c 文件中注释掉两行代码解决了这个问题:

//if (strm->vid_cb.capture_cb)
//    (*strm->vid_cb.capture_cb)(&strm->base, strm->user_data, &frame);