VirtualBox

忽略:
時間撮記:
2014-2-3 下午07:29:26 (11 年 以前)
作者:
vboxsync
訊息:

crOpenGL/VideoRec: do hardweight screen capthure only when recorder is ready

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Main/src-client/VideoRec.cpp

    r50041 r50314  
    603603
    604604/**
     605 * VideoRec utility function to check if recording engine is ready to accept a new frame
     606 * for the given screen.
     607 *
     608 * @returns true if recording engine is ready
     609 * @param   pCtx   Pointer to video recording context.
     610 * @param   uScreen screen id.
     611 * @param   u64TimeStamp current time stamp
     612 */
     613bool VideoRecIsReady(PVIDEORECCONTEXT pCtx, uint32_t uScreen, uint64_t u64TimeStamp)
     614{
     615    uint32_t enmState = ASMAtomicReadU32(&g_enmState);
     616    if (enmState != VIDREC_IDLE)
     617        return false;
     618
     619    PVIDEORECSTREAM pStrm = &pCtx->Strm[uScreen];
     620    if (!pStrm->fEnabled)
     621        return false;
     622
     623    if (u64TimeStamp < pStrm->u64LastTimeStamp + pStrm->uDelay)
     624        return false;
     625
     626    if (ASMAtomicReadBool(&pStrm->fRgbFilled))
     627        return false;
     628
     629    return true;
     630}
     631
     632/**
    605633 * VideoRec utility function to encode the source image and write the encoded
    606634 * image to target file.
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette