Changeset 50314 in vbox for trunk/src/VBox/Main/src-client
- Timestamp:
- Feb 3, 2014 7:29:26 PM (11 years ago)
- Location:
- trunk/src/VBox/Main/src-client
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r50313 r50314 155 155 mCrOglScreenshotData.u32Screen = CRSCREEN_ALL; 156 156 mCrOglScreenshotData.pvContext = this; 157 mCrOglScreenshotData.pfnScreenshot = displayCrVRecScreenshot; 157 mCrOglScreenshotData.pfnScreenshotBegin = displayCrVRecScreenshotBegin; 158 mCrOglScreenshotData.pfnScreenshotPerform = displayCrVRecScreenshotPerform; 159 mCrOglScreenshotData.pfnScreenshotEnd = displayCrVRecScreenshotEnd; 158 160 #endif 159 161 … … 4205 4207 } 4206 4208 4207 4208 void Display::handleCrVRecScreenshot(uint32_t uScreen, 4209 bool Display::handleCrVRecScreenshotBegin(uint32_t uScreen, uint64_t u64TimeStamp) 4210 { 4211 return VideoRecIsReady(mpVideoRecCtx, uScreen, u64TimeStamp); 4212 } 4213 4214 void Display::handleCrVRecScreenshotEnd(uint32_t uScreen, uint64_t u64TimeStamp) 4215 { 4216 } 4217 4218 void Display::handleCrVRecScreenshotPerform(uint32_t uScreen, 4209 4219 uint32_t x, uint32_t y, uint32_t uPixelFormat, uint32_t uBitsPerPixel, 4210 4220 uint32_t uBytesPerLine, uint32_t uGuestWidth, uint32_t uGuestHeight, … … 4217 4227 uGuestWidth, uGuestHeight, 4218 4228 pu8BufferAddress, u64TimeStamp); 4219 Assert(rc == VINF_SUCCESS || rc == VERR_TRY_AGAIN || rc == VINF_TRY_AGAIN);4229 Assert(rc == VINF_SUCCESS/* || rc == VERR_TRY_AGAIN || rc == VINF_TRY_AGAIN*/); 4220 4230 } 4221 4231 … … 4226 4236 } 4227 4237 4228 DECLCALLBACK(void) Display::displayCrVRecScreenshot (void *pvCtx, uint32_t uScreen,4238 DECLCALLBACK(void) Display::displayCrVRecScreenshotPerform(void *pvCtx, uint32_t uScreen, 4229 4239 uint32_t x, uint32_t y, uint32_t uBitsPerPixel, 4230 4240 uint32_t uBytesPerLine, uint32_t uGuestWidth, uint32_t uGuestHeight, … … 4232 4242 { 4233 4243 Display *pDisplay = (Display *)pvCtx; 4234 pDisplay->handleCrVRecScreenshot (uScreen,4244 pDisplay->handleCrVRecScreenshotPerform(uScreen, 4235 4245 x, y, FramebufferPixelFormat_FOURCC_RGB, uBitsPerPixel, 4236 4246 uBytesPerLine, uGuestWidth, uGuestHeight, 4237 4247 pu8BufferAddress, u64TimeStamp); 4248 } 4249 4250 DECLCALLBACK(bool) Display::displayCrVRecScreenshotBegin(void *pvCtx, uint32_t uScreen, uint64_t u64TimeStamp) 4251 { 4252 Display *pDisplay = (Display *)pvCtx; 4253 return pDisplay->handleCrVRecScreenshotBegin(uScreen, u64TimeStamp); 4254 } 4255 4256 DECLCALLBACK(void) Display::displayCrVRecScreenshotEnd(void *pvCtx, uint32_t uScreen, uint64_t u64TimeStamp) 4257 { 4258 Display *pDisplay = (Display *)pvCtx; 4259 pDisplay->handleCrVRecScreenshotEnd(uScreen, u64TimeStamp); 4238 4260 } 4239 4261 -
trunk/src/VBox/Main/src-client/VideoRec.cpp
r50041 r50314 603 603 604 604 /** 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 */ 613 bool 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 /** 605 633 * VideoRec utility function to encode the source image and write the encoded 606 634 * image to target file. -
trunk/src/VBox/Main/src-client/VideoRec.h
r50313 r50314 34 34 uint32_t uBytesPerLine, uint32_t uGuestWidth, uint32_t uGuestHeight, 35 35 uint8_t *pu8BufferAddress, uint64_t u64TimeStamp); 36 bool VideoRecIsReady(PVIDEORECCONTEXT pCtx, uint32_t uScreen, uint64_t u64TimeStamp); 36 37 37 38 #endif /* !____H_VIDEOREC */
Note:
See TracChangeset
for help on using the changeset viewer.