Consider this code:
fun strmStopTransmit() {
if (manager.isCaptureActive(camDevId)) {
val callVidPrm = CallVidSetStreamParam()
callVidPrm.setCapDev(camDevId)
call.vidSetStream(pjsua_call_vid_strm_op.PJSUA_CALL_VID_STRM_STOP_TRANSMIT, callVidPrm)
}
}
Where manager
is instance of pj::VidDevManager
(link) (you can get it from pj::Endpoint
(link)) and call
is instance of pj::Call
(link).
The implementation of the inverse function (resuming transmission) is obvious.
Good luck!
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…