Пример #1
0
int CCameraPjsip::Start()
{
    int nRet = 0;
    pj_status_t status = PJ_FALSE;
    if (m_pVidDevStream)
    {
        status = pjmedia_vid_dev_stream_start(m_pVidDevStream);
        if (PJ_SUCCESS != status)
        {
            LOG_MODEL_ERROR("CCamera", "pjmedia_vid_dev_stream_start faile");
            return -1;
        }
    }
    return nRet;
}
Пример #2
0
PJ_DEF(pj_status_t) pjmedia_vid_port_start(pjmedia_vid_port *vp)
{
    pj_status_t status;

    PJ_ASSERT_RETURN(vp, PJ_EINVAL);

    status = pjmedia_vid_dev_stream_start(vp->strm);
    if (status != PJ_SUCCESS)
	goto on_error;

    if (vp->clock) {
	status = pjmedia_clock_start(vp->clock);
	if (status != PJ_SUCCESS)
	    goto on_error;
    }

    return PJ_SUCCESS;

on_error:
    pjmedia_vid_port_stop(vp);
    return status;
}