VirtualBox

Changeset 75252 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Nov 5, 2018 6:11:35 PM (6 years ago)
Author:
vboxsync
Message:

Capturing: Build fix.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxHeadless/VBoxHeadless.cpp

    r65381 r75252  
    55
    66/*
    7  * Copyright (C) 2006-2017 Oracle Corporation
     7 * Copyright (C) 2006-2018 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    627627    unsigned fPaused = 0;
    628628#ifdef VBOX_WITH_VIDEOREC
    629     bool fVideoRec = 0;
     629    bool fVideoRec = false;
    630630    unsigned long ulFrameWidth = 800;
    631631    unsigned long ulFrameHeight = 600;
     
    961961        if (fVideoRec)
    962962        {
    963             CHECK_ERROR_BREAK(machine, COMSETTER(VideoCaptureFile)(Bstr(szMpegFile).raw()));
    964             CHECK_ERROR_BREAK(machine, COMSETTER(VideoCaptureWidth)(ulFrameWidth));
    965             CHECK_ERROR_BREAK(machine, COMSETTER(VideoCaptureHeight)(ulFrameHeight));
    966             CHECK_ERROR_BREAK(machine, COMSETTER(VideoCaptureRate)(ulBitRate));
    967             CHECK_ERROR_BREAK(machine, COMSETTER(VideoCaptureEnabled)(TRUE));
     963            ComPtr<ICaptureSettings> captureSettings;
     964            CHECK_ERROR_BREAK(machine, COMGETTER(CaptureSettings)(captureSettings.asOutParam()));
     965            CHECK_ERROR_BREAK(captureSettings, COMSETTER(Enabled)(TRUE));
     966
     967            SafeIfaceArray <ICaptureScreenSettings> saCaptureScreenScreens;
     968            CHECK_ERROR_BREAK(captureSettings, COMGETTER(Screens)(ComSafeArrayAsOutParam(saCaptureScreenScreens)));
     969
     970            /* Note: For now all screens have the same configuration. */
     971            for (size_t i = 0; i < saCaptureScreenScreens.size(); ++i)
     972            {
     973                CHECK_ERROR_BREAK(saCaptureScreenScreens[i], COMSETTER(Enabled)(TRUE));
     974                CHECK_ERROR_BREAK(saCaptureScreenScreens[i], COMSETTER(FileName)(Bstr(szMpegFile).raw()));
     975                CHECK_ERROR_BREAK(saCaptureScreenScreens[i], COMSETTER(VideoWidth)(ulFrameWidth));
     976                CHECK_ERROR_BREAK(saCaptureScreenScreens[i], COMSETTER(VideoHeight)(ulFrameHeight));
     977                CHECK_ERROR_BREAK(saCaptureScreenScreens[i], COMSETTER(VideoRate)(ulBitRate));
     978            }
    968979        }
    969980#endif /* defined(VBOX_WITH_VIDEOREC) */
     
    12201231        {
    12211232            if (!machine.isNull())
    1222                 machine->COMSETTER(VideoCaptureEnabled)(FALSE);
    1223         }
    1224 #endif /* defined(VBOX_WITH_VIDEOREC) */
     1233            {
     1234                ComPtr<ICaptureSettings> captureSettings;
     1235                CHECK_ERROR_BREAK(machine, COMGETTER(CaptureSettings)(captureSettings.asOutParam()));
     1236                CHECK_ERROR_BREAK(captureSettings, COMSETTER(Enabled)(FALSE));
     1237            }
     1238        }
     1239#endif /* VBOX_WITH_VIDEOREC */
    12251240
    12261241        /* we don't have to disable VRDE here because we don't save the settings of the VM */
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