VirtualBox

Changeset 42646 in vbox for trunk/src/VBox/Main/src-client


Ignore:
Timestamp:
Aug 7, 2012 7:12:56 AM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
79843
Message:

Main/src-client/DisplayImpl: Code improvement for video recording of SDL session.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r42619 r42646  
    32563256         && pFBInfo->u32ResizeStatus==ResizeStatus_Void)
    32573257    {
     3258        HRESULT rc;
    32583259        ULONG ulPixelFormat = 0;
    3259         pFBInfo->pFramebuffer->COMGETTER(PixelFormat)(&ulPixelFormat);
     3260        rc = pFBInfo->pFramebuffer->COMGETTER(PixelFormat)(&ulPixelFormat);
     3261        AssertComRC (rc);
    32603262
    32613263        ULONG ulBitsPerPixel;
    3262         pFBInfo->pFramebuffer->COMGETTER(BitsPerPixel)(&ulBitsPerPixel);
    3263 
    3264         ULONG ulFrameHeight = 0;
    3265         pFBInfo->pFramebuffer->COMGETTER(Height)(&ulFrameHeight);
    3266 
    3267         ULONG ulFrameWidth = 0;
    3268         pFBInfo->pFramebuffer->COMGETTER(Width)(&ulFrameWidth);
     3264        rc = pFBInfo->pFramebuffer->COMGETTER(BitsPerPixel)(&ulBitsPerPixel);
     3265        AssertComRC (rc);
     3266
     3267        ULONG ulGuestHeight = 0;
     3268        rc = pFBInfo->pFramebuffer->COMGETTER(Height)(&ulGuestHeight);
     3269        AssertComRC (rc);
     3270
     3271        ULONG ulGuestWidth = 0;
     3272        rc = pFBInfo->pFramebuffer->COMGETTER(Width)(&ulGuestWidth);
     3273        AssertComRC (rc);
    32693274
    32703275        BYTE *address = NULL;
    3271         HRESULT hrc = pFBInfo->pFramebuffer->COMGETTER(Address) (&address);
     3276        rc = pFBInfo->pFramebuffer->COMGETTER(Address) (&address);
     3277        AssertComRC (rc);
     3278
     3279        ULONG ulBytesPerLine = 0;
     3280        rc = pFBInfo->pFramebuffer->COMGETTER(BytesPerLine) (&ulBytesPerLine);
     3281        AssertComRC (rc);
    32723282
    32733283
     
    33063316        }
    33073317
    3308         LogFlow(("cp to IntBuf orgx=%d orgy=%d cx=%d cy=%d bpp=%d\n",
    3309                    pFBInfo->xOrigin, pFBInfo->yOrigin,  pDrv->IConnector.cx, pDrv->IConnector.cy,
    3310                    pDrv->IConnector.cBits));
    3311 
    3312 
    33133318        if (u32VideoRecImgFormat != VPX_IMG_FMT_NONE && address != NULL)
    33143319        {
    33153320            VideoRecCopyToIntBuffer(pVideoRecContext, pFBInfo->xOrigin, pFBInfo->yOrigin,
    3316                               u32PixelFormat, ulBitsPerPixel, pDrv->IConnector.cbScanline,
    3317                               ulFrameWidth, ulFrameHeight,address);
     3321                              u32PixelFormat, ulBitsPerPixel, ulBytesPerLine,
     3322                              ulGuestWidth, ulGuestHeight, address);
    33183323
    33193324
    33203325            LogFlow(("RGB:YUV\n"));
    3321             VideoRecDoRGBToYUV(ulFrameWidth, ulFrameHeight, u32VideoRecImgFormat,
    3322                             pVideoRecContext->pu8TempYUVBuffer,
    3323                             pVideoRecContext->pu8TempRGBBuffer);
     3326            VideoRecDoRGBToYUV(pVideoRecContext, u32VideoRecImgFormat);
    33243327            LogFlow(("Encode\n"));
    3325             VideoRecEncodeAndWrite(pVideoRecContext, ulFrameWidth,
    3326                                     ulFrameHeight, pVideoRecContext->pu8TempYUVBuffer);
     3328            VideoRecEncodeAndWrite(pVideoRecContext, ulGuestWidth, ulGuestHeight);
    33273329        }
    33283330    }
     
    43154317
    43164318    if(res == VINF_SUCCESS)
    4317         res = VideoRecContextInit(pVideoRecContext, "test.webm", 800, 720);
     4319        res = VideoRecContextInit(pVideoRecContext, "test.webm", 640, 480);
    43184320
    43194321#endif
Note: See TracChangeset for help on using the changeset viewer.

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