Changeset 42913 in vbox for trunk/src/VBox
- Timestamp:
- Aug 22, 2012 8:22:26 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r42878 r42913 3284 3284 { 3285 3285 uint32_t u32VideoRecImgFormat = VPX_IMG_FMT_NONE; 3286 ULONG ulGuestHeight = 0; 3287 ULONG ulGuestWidth = 0; 3286 3288 DISPLAYFBINFO *pFBInfo = &pDisplay->maFramebuffers[VBOX_VIDEO_PRIMARY_SCREEN]; 3287 3289 … … 3297 3299 ULONG ulBitsPerPixel; 3298 3300 rc = pFBInfo->pFramebuffer->COMGETTER(BitsPerPixel)(&ulBitsPerPixel); 3299 AssertComRC(rc);3300 3301 ULONG ulGuestHeight = 0;3302 rc = pFBInfo->pFramebuffer->COMGETTER(Height)(&ulGuestHeight);3303 AssertComRC(rc);3304 3305 ULONG ulGuestWidth = 0;3306 rc = pFBInfo->pFramebuffer->COMGETTER(Width)(&ulGuestWidth);3307 AssertComRC(rc);3308 3309 BYTE *address = NULL;3310 rc = pFBInfo->pFramebuffer->COMGETTER(Address)(&address);3311 AssertComRC(rc);3312 3313 ULONG ulBytesPerLine = 0;3314 rc = pFBInfo->pFramebuffer->COMGETTER(BytesPerLine)(&ulBytesPerLine);3315 3301 AssertComRC(rc); 3316 3302 … … 3337 3323 } 3338 3324 3339 if ( u32VideoRecImgFormat != VPX_IMG_FMT_NONE 3340 && address) 3325 if (u32VideoRecImgFormat != VPX_IMG_FMT_NONE) 3341 3326 { 3342 VideoRecCopyToIntBuffer(pDisplay->mpVideoRecContext, pFBInfo->xOrigin, pFBInfo->yOrigin, 3343 ulPixelFormat, ulBitsPerPixel, ulBytesPerLine, 3344 ulGuestWidth, ulGuestHeight, address); 3345 3346 VideoRecDoRGBToYUV(pDisplay->mpVideoRecContext, u32VideoRecImgFormat); 3347 VideoRecEncodeAndWrite(pDisplay->mpVideoRecContext, ulGuestWidth, ulGuestHeight); 3327 if (pFBInfo->fVBVAEnabled && pFBInfo->pu8FramebufferVRAM) 3328 { 3329 rc = VideoRecCopyToIntBuffer(pDisplay->mpVideoRecContext, 0, 0, 3330 ulPixelFormat, pFBInfo->u16BitsPerPixel, pFBInfo->u32LineSize, 3331 pFBInfo->w, pFBInfo->h, pFBInfo->pu8FramebufferVRAM); 3332 ulGuestWidth = pFBInfo->w; 3333 ulGuestHeight = pFBInfo->h; 3334 } 3335 else 3336 { 3337 rc = VideoRecCopyToIntBuffer(pDisplay->mpVideoRecContext, 0, 0, 3338 ulPixelFormat, pDrv->IConnector.cBits, pDrv->IConnector.cbScanline, 3339 pDrv->IConnector.cx, pDrv->IConnector.cy, pDrv->IConnector.pu8Data); 3340 ulGuestWidth = pDrv->IConnector.cx; 3341 ulGuestHeight = pDrv->IConnector.cy; 3342 } 3343 3344 /* Just return in case of filure without any assertion */ 3345 if(rc) 3346 return; 3347 3348 if (!(VideoRecDoRGBToYUV(pDisplay->mpVideoRecContext, u32VideoRecImgFormat))) 3349 VideoRecEncodeAndWrite(pDisplay->mpVideoRecContext, ulGuestWidth, ulGuestHeight); 3348 3350 } 3349 3351 }
Note:
See TracChangeset
for help on using the changeset viewer.