- Timestamp:
- Oct 18, 2018 8:52:01 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/Main/src-client/VideoRec.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/VideoRec.cpp
r74906 r74907 284 284 /** Codec-specific data. */ 285 285 VIDEORECVIDEOCODEC Codec; 286 /** Minimal delay (in ms) between two frames. */ 286 /** Minimal delay (in ms) between two video frames. 287 * This value is based on the configured FPS rate. */ 287 288 uint32_t uDelayMs; 288 289 /** Target X resolution (in pixels). */ … … 1445 1446 1446 1447 /** 1447 * Checks if recording engine is ready to accept a new frame for thegiven screen.1448 * 1449 * @returns true if recording engine is ready .1448 * Checks if recording engine is ready to accept new recording data for a given screen. 1449 * 1450 * @returns true if recording engine is ready, false if not. 1450 1451 * @param pCtx Pointer to video recording context. 1451 1452 * @param uScreen Screen ID. 1452 * @param uTimeStampMs Current time stamp (in ms). 1453 * @param uTimeStampMs Current time stamp (in ms). Currently not being used. 1453 1454 */ 1454 1455 bool VideoRecIsReady(PVIDEORECCONTEXT pCtx, uint32_t uScreen, uint64_t uTimeStampMs) 1455 1456 { 1456 1457 AssertPtrReturn(pCtx, false); 1458 RT_NOREF(uTimeStampMs); 1457 1459 1458 1460 if (ASMAtomicReadU32(&pCtx->enmState) != VIDEORECSTS_INITIALIZED) 1459 1461 return false; 1460 1462 1463 bool fIsReady = false; 1464 1461 1465 PVIDEORECSTREAM pStream = videoRecStreamGet(pCtx, uScreen); 1462 if ( !pStream 1463 || !pStream->fEnabled) 1464 { 1465 return false; 1466 } 1467 1468 if (uTimeStampMs < pStream->Video.uLastTimeStampMs + pStream->Video.uDelayMs) 1469 return false; 1470 1471 return true; 1466 if (pStream) 1467 { 1468 videoRecStreamLock(pStream); 1469 fIsReady = pStream->fEnabled; 1470 videoRecStreamUnlock(pStream); 1471 } 1472 1473 /* Note: Do not check for other constraints like the video FPS rate here, 1474 * as this check then also would affect other (non-FPS related) stuff 1475 * like audio data. */ 1476 1477 return fIsReady; 1472 1478 } 1473 1479
Note:
See TracChangeset
for help on using the changeset viewer.

