third_party/virtualbox/src/VBox/Main/src-client/DisplayImpl.cpp
/**
 * Start video capturing. Does nothing if capturing is already active.
 *
 * @param   pVideoRecCfg        Video recording configuration to use.
 * @returns IPRT status code.
 */
Start video capturing. Does nothing if capturing is already active.
@param   pVideoRecCfg        Video recording configuration to use.
@returns IPRT status code.
Start video capturing . Does nothing if capturing is already active . @param pVideoRecCfg Video recording configuration to use . @returns IPRT status code .
int Display::i_videoRecStart(void)
{
    if (VideoRecIsStarted(mpVideoRecCtx))
        return VINF_SUCCESS;
    LogRel(("VideoRec: Starting ...\n"));
    int rc = VideoRecContextCreate(mcMonitors, &mVideoRecCfg, &mpVideoRecCtx);
    if (RT_SUCCESS(rc))
    {
        for (unsigned uScreen = 0; uScreen < mcMonitors; uScreen++)
        {
            int rc2 = VideoRecStreamInit(mpVideoRecCtx, uScreen);
            if (RT_SUCCESS(rc2))
            {
                i_videoRecScreenChanged(uScreen);
            }
            else
                LogRel(("VideoRec: Failed to initialize video recording context #%u (%Rrc)\n", uScreen, rc2));
            if (RT_SUCCESS(rc))
                rc = rc2;
        }
    }
    if (RT_FAILURE(rc))
        LogRel(("VideoRec: Failed to start video recording (%Rrc)\n", rc));
    return rc;
}
int Display :: i_videoRecStart ( void ) { if ( VideoRecIsStarted ( mpVideoRecCtx ) ) return VINF_SUCCESS ; LogRel ( ( " \n " ) ) ; int rc = VideoRecContextCreate ( mcMonitors , & mVideoRecCfg , & mpVideoRecCtx ) ; if ( RT_SUCCESS ( rc ) ) { for ( unsigned uScreen = 0 ; uScreen < mcMonitors ; uScreen ++ ) { int rc2 = VideoRecStreamInit ( mpVideoRecCtx , uScreen ) ; if ( RT_SUCCESS ( rc2 ) ) { i_videoRecScreenChanged ( uScreen ) ; } else LogRel ( ( " \n " , uScreen , rc2 ) ) ; if ( RT_SUCCESS ( rc ) ) rc = rc2 ; } } if ( RT_FAILURE ( rc ) ) LogRel ( ( " \n " , rc ) ) ; return rc ; }
Start video capturing.
Start video capturing .