VirtualBox

Changeset 68871 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Sep 26, 2017 10:24:37 AM (7 years ago)
Author:
vboxsync
Message:

VideoRec/DisplayImpl: Moved getting IMachine::VideoCaptureEnabled to Display::videoCaptureInvalidate().

File:
1 edited

Legend:

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

    r68857 r68871  
    24102410    Assert(pMachine.isNotNull());
    24112411
    2412     mVideoRecCfg.fEnabled = true;
    2413     mVideoRecCfg.enmDst   = VIDEORECDEST_FILE; /** @todo Make this configurable once we have more variations. */
     2412    mVideoRecCfg.enmDst = VIDEORECDEST_FILE; /** @todo Make this configurable once we have more variations. */
    24142413
    24152414    /*
    24162415     * Get parameters from API.
    24172416     */
     2417    BOOL fValue;
     2418    HRESULT rc = pMachine->COMGETTER(VideoCaptureEnabled)(&fValue);
     2419    AssertComRCReturn(rc, VERR_COM_UNEXPECTED);
     2420    mVideoRecCfg.fEnabled = RT_BOOL(fValue);
     2421
    24182422    com::SafeArray<BOOL> aScreens;
    2419     HRESULT rc = pMachine->COMGETTER(VideoCaptureScreens)(ComSafeArrayAsOutParam(aScreens));
     2423    rc = pMachine->COMGETTER(VideoCaptureScreens)(ComSafeArrayAsOutParam(aScreens));
    24202424    AssertComRCReturn(rc, VERR_COM_UNEXPECTED);
    24212425
     
    45404544
    45414545#ifdef VBOX_WITH_VIDEOREC
    4542     ComPtr<IMachine> pMachine = pDisplay->mParent->i_machine();
    4543     BOOL fEnabled = false;
    4544     HRESULT hrc = pMachine->COMGETTER(VideoCaptureEnabled)(&fEnabled);
    4545     AssertComRCReturn(hrc, VERR_COM_UNEXPECTED);
    4546 
    4547     if (fEnabled)
    4548     {
    4549         int rc2 = pDisplay->i_videoCaptureInvalidate();
     4546    int rc2 = pDisplay->i_videoCaptureInvalidate();
     4547    if (pDisplay->i_videoCaptureGetEnabled())
     4548    {
     4549        rc2 = pDisplay->i_videoCaptureStart();
    45504550        if (RT_SUCCESS(rc2))
    4551         {
    4552             rc2 = pDisplay->i_videoCaptureStart();
    4553             if (RT_SUCCESS(rc2))
    4554                 fireVideoCaptureChangedEvent(pDisplay->mParent->i_getEventSource());
    4555         }
     4551            fireVideoCaptureChangedEvent(pDisplay->mParent->i_getEventSource());
    45564552
    45574553        /* If video capturing fails for whatever reason here, this is
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