VirtualBox

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


Ignore:
Timestamp:
Aug 31, 2012 2:18:10 PM (13 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
80512
Message:

Main/Display: clean up the interface to the video recording code

File:
1 edited

Legend:

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

    r42944 r43139  
    445445
    446446#ifdef VBOX_WITH_VPX
    447     BOOL fEnabled = false;
    448447    if (VideoRecContextCreate(&mpVideoRecContext))
    449448    {
     
    451450        return E_FAIL;
    452451    }
    453     int rc = RTCritSectInit(&mpVideoRecContext->CritSect);
    454     AssertRCReturn(rc, E_UNEXPECTED);
    455 
    456     mpVideoRecContext->fEnabled = false;
     452
     453    BOOL fEnabled = false;
    457454    mParent->machine()->COMGETTER(VideoCaptureEnabled)(&fEnabled);
    458455    if (fEnabled)
     
    465462        mParent->machine()->COMGETTER(VideoCaptureFile)(&strVideoCaptureFile);
    466463        LogFlow(("VidoeRecording VPX enabled\n"));
    467         if (VideoRecContextInit(mpVideoRecContext,strVideoCaptureFile,
     464        if (VideoRecContextInit(mpVideoRecContext, strVideoCaptureFile,
    468465                                ulVideoCaptureHorzRes, ulVideoCaptureVertRes))
    469466        {
     
    471468            return E_FAIL;
    472469        }
    473         mpVideoRecContext->fEnabled = true;
    474470    }
    475471#endif
     
    564560
    565561#ifdef VBOX_WITH_VPX
    566     if (   mpVideoRecContext
    567         && mpVideoRecContext->fEnabled)
     562    if (mpVideoRecContext)
    568563        VideoRecContextClose(mpVideoRecContext);
    569564#endif
     
    32813276
    32823277#ifdef VBOX_WITH_VPX
    3283     if (pDisplay->mpVideoRecContext->fEnabled)
     3278    if (VideoRecIsEnabled(pDisplay->mpVideoRecContext))
    32843279    {
    32853280        uint32_t u32VideoRecImgFormat = VPX_IMG_FMT_NONE;
     
    33343329            }
    33353330
    3336                 /* Just return in case of filure without any assertion */
     3331                /* Just return in case of failure without any assertion */
    33373332                if( RT_SUCCESS(rc))
    33383333                    if (RT_SUCCESS(VideoRecDoRGBToYUV(pDisplay->mpVideoRecContext, u32VideoRecImgFormat)))
     
    33413336    }
    33423337#endif
    3343 
    3344 
    33453338
    33463339#ifdef DEBUG_sunlover
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