If I set AccountVideoConfig::autoTransmitOutgoing false in pjsip sdk, I can not show window remote, and the screen is green without video data, I do not know why? But by the note, if AccountVideoConfig::autoTransmitOutgoing be set false, it just will not send video data to remote, and can receive and show window from remote. What has happen?
This is my code:
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;
}
I solved this problem by commenting out two lines of code at dshow_dev.c file:
//if (strm->vid_cb.capture_cb)
// (*strm->vid_cb.capture_cb)(&strm->base, strm->user_data, &frame);