VirtualBox

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


Ignore:
Timestamp:
Nov 12, 2018 9:53:28 AM (6 years ago)
Author:
vboxsync
Message:

Recording/Main: Renaming, docs.

Location:
trunk/src/VBox/Main/src-client
Files:
2 edited

Legend:

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

    r75392 r75393  
    349349                PRECORDINGVIDEOFRAME pVideoFrame  = (PRECORDINGVIDEOFRAME)pBlock->pvData;
    350350
    351                 rc = recordingRGBToYUV(pVideoFrame->uPixelFormat,
    352                                        /* Destination */
    353                                        this->Video.Codec.VPX.pu8YuvBuf, pVideoFrame->uWidth, pVideoFrame->uHeight,
    354                                        /* Source */
    355                                        pVideoFrame->pu8RGBBuf, this->ScreenSettings.Video.ulWidth, this->ScreenSettings.Video.ulHeight);
     351                rc = RecordingUtilsRGBToYUV(pVideoFrame->uPixelFormat,
     352                                            /* Destination */
     353                                            this->Video.Codec.VPX.pu8YuvBuf, pVideoFrame->uWidth, pVideoFrame->uHeight,
     354                                            /* Source */
     355                                            pVideoFrame->pu8RGBBuf, this->ScreenSettings.Video.ulWidth, this->ScreenSettings.Video.ulHeight);
    356356                if (RT_SUCCESS(rc))
    357357                {
  • trunk/src/VBox/Main/src-client/RecordingUtils.cpp

    r75354 r75393  
    3131 * Convert an image to YUV420p format.
    3232 *
    33  * @return true on success, false on failure.
     33 * @return \c true on success, \c false on failure.
    3434 * @param  aDstBuf              The destination image buffer.
    3535 * @param  aDstWidth            Width (in pixel) of destination buffer.
     
    4040 */
    4141template <class T>
    42 inline bool videoRecColorConvWriteYUV420p(uint8_t *aDstBuf, unsigned aDstWidth, unsigned aDstHeight,
    43                                           uint8_t *aSrcBuf, unsigned aSrcWidth, unsigned aSrcHeight)
     42inline bool recordingUtilsColorConvWriteYUV420p(uint8_t *aDstBuf, unsigned aDstWidth, unsigned aDstHeight,
     43                                                uint8_t *aSrcBuf, unsigned aSrcWidth, unsigned aSrcHeight)
    4444{
    4545    RT_NOREF(aDstWidth, aDstHeight);
     
    103103
    104104/**
    105  * Convert an image to RGB24 format
    106  * @returns true on success, false on failure
    107  * @param aWidth    width of image
    108  * @param aHeight   height of image
    109  * @param aDestBuf  an allocated memory buffer large enough to hold the
    110  *                  destination image (i.e. width * height * 12bits)
    111  * @param aSrcBuf   the source image as an array of bytes
     105 * Convert an image to RGB24 format.
     106 *
     107 * @returns true on success, false on failure.
     108 * @param aWidth    Width of image.
     109 * @param aHeight   Height of image.
     110 * @param aDestBuf  An allocated memory buffer large enough to hold the
     111 *                  destination image (i.e. width * height * 12bits).
     112 * @param aSrcBuf   The source image as an array of bytes.
    112113 */
    113114template <class T>
    114 inline bool videoRecColorConvWriteRGB24(unsigned aWidth, unsigned aHeight,
    115                                         uint8_t *aDestBuf, uint8_t *aSrcBuf)
     115inline bool RecordingUtilsColorConvWriteRGB24(unsigned aWidth, unsigned aHeight,
     116                                              uint8_t *aDestBuf, uint8_t *aSrcBuf)
    116117{
    117118    enum { PIX_SIZE = 3 };
     
    147148 * @param   uSrcHeight          Height (Y, in pixels) of source buffer.
    148149 */
    149 int recordingRGBToYUV(uint32_t uPixelFormat,
    150                      uint8_t *paDst, uint32_t uDstWidth, uint32_t uDstHeight,
    151                      uint8_t *paSrc, uint32_t uSrcWidth, uint32_t uSrcHeight)
     150int RecordingUtilsRGBToYUV(uint32_t uPixelFormat,
     151                           uint8_t *paDst, uint32_t uDstWidth, uint32_t uDstHeight,
     152                           uint8_t *paSrc, uint32_t uSrcWidth, uint32_t uSrcHeight)
    152153{
    153154    switch (uPixelFormat)
    154155    {
    155156        case RECORDINGPIXELFMT_RGB32:
    156             if (!videoRecColorConvWriteYUV420p<ColorConvBGRA32Iter>(paDst, uDstWidth, uDstHeight,
    157                                                             paSrc, uSrcWidth, uSrcHeight))
     157            if (!recordingUtilsColorConvWriteYUV420p<ColorConvBGRA32Iter>(paDst, uDstWidth, uDstHeight,
     158                                                                          paSrc, uSrcWidth, uSrcHeight))
    158159                return VERR_INVALID_PARAMETER;
    159160            break;
    160161        case RECORDINGPIXELFMT_RGB24:
    161             if (!videoRecColorConvWriteYUV420p<ColorConvBGR24Iter>(paDst, uDstWidth, uDstHeight,
    162                                                            paSrc, uSrcWidth, uSrcHeight))
     162            if (!recordingUtilsColorConvWriteYUV420p<ColorConvBGR24Iter>(paDst, uDstWidth, uDstHeight,
     163                                                                         paSrc, uSrcWidth, uSrcHeight))
    163164                return VERR_INVALID_PARAMETER;
    164165            break;
    165166        case RECORDINGPIXELFMT_RGB565:
    166             if (!videoRecColorConvWriteYUV420p<ColorConvBGR565Iter>(paDst, uDstWidth, uDstHeight,
    167                                                             paSrc, uSrcWidth, uSrcHeight))
     167            if (!recordingUtilsColorConvWriteYUV420p<ColorConvBGR565Iter>(paDst, uDstWidth, uDstHeight,
     168                                                                          paSrc, uSrcWidth, uSrcHeight))
    168169                return VERR_INVALID_PARAMETER;
    169170            break;
Note: See TracChangeset for help on using the changeset viewer.

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