VirtualBox

Changeset 46667 in vbox


Ignore:
Timestamp:
Jun 19, 2013 3:30:23 PM (11 years ago)
Author:
vboxsync
Message:

Main/idl: clarify IMachine.videoCaptureFile to be an absolute path, and many naming convention cleanups for method/attribute names starting with an uppercase letter or containing an acronym
Main/xml/Settings.cpp: clean up default video capture file handling and related path conversions, version handling of the new functionality
Main/Machine: handle default value for video capture file better, store relative path in settings if possible, cleanups
Main/src-client/VideoRec.cpp: do not overwrite a file ever
Main/Display: generate a unique name if there is a collision, matching cleanups for name changes
Frontends/VirtualBox: matching name changes
Frontends/VBoxManage: matching name changes, fixing the machine readable output

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/settings.h

    r46367 r46667  
    822822                        fAccelerate2DVideo;     // requires settings version 1.8 (VirtualBox 3.1)
    823823
    824     uint32_t            ulVideoCaptureHorzRes;  // requires settings version 1.12 (VirtualBox 4.3)
    825     uint32_t            ulVideoCaptureVertRes;  // requires settings version 1.12 (VirtualBox 4.3)
    826     uint32_t            ulVideoCaptureRate;     // requires settings version 1.12 (VirtualBox 4.3)
    827     uint32_t            ulVideoCaptureFps;      // requires settings version 1.12 (VirtualBox 4.3)
    828     bool                fVideoCaptureEnabled;   // requires settings version 1.12 (VirtualBox 4.3)
    829     uint64_t            u64VideoCaptureScreens; // requires settings version 1.12 (VirtualBox 4.3)
    830     com::Utf8Str        strVideoCaptureFile;    // requires settings version 1.12 (VirtualBox 4.3)
     824    uint32_t            ulVideoCaptureHorzRes;  // requires settings version 1.14 (VirtualBox 4.3)
     825    uint32_t            ulVideoCaptureVertRes;  // requires settings version 1.14 (VirtualBox 4.3)
     826    uint32_t            ulVideoCaptureRate;     // requires settings version 1.14 (VirtualBox 4.3)
     827    uint32_t            ulVideoCaptureFPS;      // requires settings version 1.14 (VirtualBox 4.3)
     828    bool                fVideoCaptureEnabled;   // requires settings version 1.14 (VirtualBox 4.3)
     829    uint64_t            u64VideoCaptureScreens; // requires settings version 1.14 (VirtualBox 4.3)
     830    com::Utf8Str        strVideoCaptureFile;    // requires settings version 1.14 (VirtualBox 4.3)
    831831
    832832    FirmwareType_T      firmwareType;           // requires settings version 1.9 (VirtualBox 3.1)
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp

    r46123 r46667  
    23152315        CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureRate)(&Rate), rc);
    23162316        ULONG Fps;
    2317         CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureFps)(&Fps), rc);
     2317        CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureFPS)(&Fps), rc);
    23182318        Bstr File;
    23192319        CHECK_ERROR_RET(machine, COMGETTER(VideoCaptureFile)(File.asOutParam()), rc);
    23202320        if (details == VMINFO_MACHINEREADABLE)
    23212321        {
    2322             RTPrintf("VideoCaptureEnabled=\"%s\"\n", bActive ? "on" : "off");
    2323             RTPrintf("VideoCaptureScreens=");
     2322            RTPrintf("vcpenabled=\"%s\"\n", bActive ? "on" : "off");
     2323            RTPrintf("vcpscreens=");
    23242324            bool fComma = false;
    23252325            for (unsigned i = 0; i < screens.size(); i++)
     
    23302330                }
    23312331            RTPrintf("\n");
    2332             RTPrintf("VideoCaptureWidth=%u\n", (unsigned)Width);
    2333             RTPrintf("VideoCaptureFile=\"%ls\"\n", File.raw());
    2334             RTPrintf("VideoCaptureHeight=%u\n", (unsigned)Height);
    2335             RTPrintf("VideoCaptureRate=%u\n", (unsigned)Rate);
    2336             RTPrintf("VideoCaptureFps=%u\n", (unsigned)Fps);
     2332            RTPrintf("vcpfile=\"%ls\"\n", File.raw());
     2333            RTPrintf("vcpwidth=%u\n", (unsigned)Width);
     2334            RTPrintf("vcpheight=%u\n", (unsigned)Height);
     2335            RTPrintf("vcprate=%u\n", (unsigned)Rate);
     2336            RTPrintf("vcpfps=%u\n", (unsigned)Fps);
    23372337        }
    23382338        else
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp

    r46658 r46667  
    25172517            case MODIFYVM_VCP_FPS:
    25182518            {
    2519                 CHECK_ERROR(machine, COMSETTER(VideoCaptureFps)(ValueUnion.u32));
     2519                CHECK_ERROR(machine, COMSETTER(VideoCaptureFPS)(ValueUnion.u32));
    25202520                break;
    25212521            }
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r46622 r46667  
    119119    displayData.m_iVideoCaptureFrameWidth = m_machine.GetVideoCaptureWidth();
    120120    displayData.m_iVideoCaptureFrameHeight = m_machine.GetVideoCaptureHeight();
    121     displayData.m_iVideoCaptureFrameRate = m_machine.GetVideoCaptureFps();
     121    displayData.m_iVideoCaptureFrameRate = m_machine.GetVideoCaptureFPS();
    122122    displayData.m_iVideoCaptureBitRate = m_machine.GetVideoCaptureRate();
    123123    displayData.m_screens = m_machine.GetVideoCaptureScreens();
     
    275275                m_machine.SetVideoCaptureWidth(displayData.m_iVideoCaptureFrameWidth);
    276276                m_machine.SetVideoCaptureHeight(displayData.m_iVideoCaptureFrameHeight);
    277                 m_machine.SetVideoCaptureFps(displayData.m_iVideoCaptureFrameRate);
     277                m_machine.SetVideoCaptureFPS(displayData.m_iVideoCaptureFrameRate);
    278278                m_machine.SetVideoCaptureRate(displayData.m_iVideoCaptureBitRate);
    279279                m_machine.SetVideoCaptureScreens(displayData.m_screens);
     
    290290            m_machine.SetVideoCaptureWidth(displayData.m_iVideoCaptureFrameWidth);
    291291            m_machine.SetVideoCaptureHeight(displayData.m_iVideoCaptureFrameHeight);
    292             m_machine.SetVideoCaptureFps(displayData.m_iVideoCaptureFrameRate);
     292            m_machine.SetVideoCaptureFPS(displayData.m_iVideoCaptureFrameRate);
    293293            m_machine.SetVideoCaptureRate(displayData.m_iVideoCaptureBitRate);
    294294            m_machine.SetVideoCaptureScreens(displayData.m_screens);
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r46524 r46667  
    13801380    uuid="03DFD6F7-1B78-48A3-8345-C785281E9523"
    13811381    wsmap="managed">
    1382     <attribute name="NetworkName" type="wstring">
     1382    <attribute name="networkName" type="wstring">
    13831383      <desc>
    13841384        TBD: the idea, technically we can start any number of the NAT networks,
     
    42484248    </attribute>
    42494249
    4250     <attribute name="VideoCaptureEnabled" type="boolean" default="false">
     4250    <attribute name="videoCaptureEnabled" type="boolean" default="false">
    42514251      <desc>
    42524252        This setting determines whether VirtualBox uses video recording to
     
    42544254    </attribute>
    42554255
    4256     <attribute name="VideoCaptureScreens" type="boolean" safearray="yes">
     4256    <attribute name="videoCaptureScreens" type="boolean" safearray="yes">
    42574257      <desc>
    42584258        This setting determines for which screens video recording is
     
    42604260    </attribute>
    42614261
    4262     <attribute name="VideoCaptureFile" type="wstring" default="Test.webm">
     4262    <attribute name="videoCaptureFile" type="wstring">
    42634263      <desc>
    42644264        This setting determines the filename VirtualBox uses to save
    42654265        the recorded content. This setting cannot be changed while video
    4266         capturing is enabled.
    4267       </desc>
    4268     </attribute>
    4269 
    4270     <attribute name="VideoCaptureWidth" type="unsigned long" default="640">
     4266        capturing is enabled.
     4267        <note>
     4268          When setting this attribute, the specified path has to be
     4269          absolute (full path). When reading this attribute, a full path is
     4270          always returned.
     4271        </note>
     4272      </desc>
     4273    </attribute>
     4274
     4275    <attribute name="videoCaptureWidth" type="unsigned long" default="640">
    42714276      <desc>
    42724277        This setting determines the horizontal resolution of the recorded
     
    42764281    </attribute>
    42774282
    4278     <attribute name="VideoCaptureHeight" type="unsigned long" default="480">
     4283    <attribute name="videoCaptureHeight" type="unsigned long" default="480">
    42794284      <desc>
    42804285        This setting determines the vertical resolution of the recorded
     
    42844289    </attribute>
    42854290
    4286     <attribute name="VideoCaptureRate" type="unsigned long" default="512">
     4291    <attribute name="videoCaptureRate" type="unsigned long" default="512">
    42874292      <desc>
    42884293        This setting determines the bitrate in kilobits per second.
     
    42934298    </attribute>
    42944299
    4295     <attribute name="VideoCaptureFps" type="unsigned long" default="25">
     4300    <attribute name="videoCaptureFPS" type="unsigned long" default="25">
    42964301      <desc>
    42974302        This setting determines the maximum number of frames per second.
    42984303        Frames with a higher frequency will be skipped. Reducing this
    4299         value increses the number of skipped frames but reduces the
     4304        value increases the number of skipped frames and reduces the
    43004305        file size. This setting cannot be changed while video capturing
    43014306        is enabled.
     
    1274912754      <desc>
    1275012755        Returns the storage format variant information for this medium
    12751         as an aaray of the flags described at <link to="MediumVariant" />.
     12756        as an array of the flags described at <link to="MediumVariant" />.
    1275212757        Before <link to="#refreshState"/> is called this method returns
    1275312758        an undefined value.
     
    2094220947    >
    2094320948    <!-- network name is common setting for all event types -->
    20944     <attribute name="NetworkName" type="wstring" readonly="yes"/>
     20949    <attribute name="networkName" type="wstring" readonly="yes"/>
    2094520950  </interface>
    2094620951  <!-- base class for start/stop events -->
  • trunk/src/VBox/Main/include/MachineImpl.h

    r46465 r46667  
    262262        ULONG               mVideoCaptureHeight;
    263263        ULONG               mVideoCaptureRate;
    264         ULONG               mVideoCaptureFps;
    265         Bstr                mVideoCaptureFile;
     264        ULONG               mVideoCaptureFPS;
     265        Utf8Str             mVideoCaptureFile;
    266266        BOOL                mVideoCaptureEnabled;
    267267        BOOL                maVideoCaptureScreens[SchemaDefs::MaxGuestMonitors];
     
    448448    STDMETHOD(COMGETTER(VideoCaptureRate))(ULONG *aRate);
    449449    STDMETHOD(COMSETTER(VideoCaptureRate))(ULONG aRate);
    450     STDMETHOD(COMGETTER(VideoCaptureFps))(ULONG *aFps);
    451     STDMETHOD(COMSETTER(VideoCaptureFps))(ULONG aFps);
     450    STDMETHOD(COMGETTER(VideoCaptureFPS))(ULONG *aFPS);
     451    STDMETHOD(COMSETTER(VideoCaptureFPS))(ULONG aFPS);
    452452    STDMETHOD(COMGETTER(BIOSSettings))(IBIOSSettings **biosSettings);
    453453    STDMETHOD(COMGETTER(SnapshotFolder))(BSTR *aSavedStateFolder);
     
    753753    void composeSavedStateFilename(Utf8Str &strStateFilePath);
    754754
     755    void getDefaultVideoCaptureFile(Utf8Str &strFile);
     756
    755757    HRESULT launchVMProcess(IInternalSessionControl *aControl,
    756758                            const Utf8Str &strType,
  • trunk/src/VBox/Main/src-client/DisplayImpl.cpp

    r46549 r46667  
    3131#include <iprt/thread.h>
    3232#include <iprt/asm.h>
     33#include <iprt/time.h>
    3334#include <iprt/cpp/utils.h>
    3435
     
    27162717    hrc = pMachine->COMGETTER(VideoCaptureRate)(&ulRate);
    27172718    AssertComRCReturn(hrc, VERR_COM_UNEXPECTED);
    2718     ULONG ulFps;
    2719     hrc = pMachine->COMGETTER(VideoCaptureFps)(&ulFps);
     2719    ULONG ulFPS;
     2720    hrc = pMachine->COMGETTER(VideoCaptureFPS)(&ulFPS);
    27202721    AssertComRCReturn(hrc, VERR_COM_UNEXPECTED);
    27212722    BSTR strFile;
     
    27422743        }
    27432744        if (RT_SUCCESS(rc))
     2745        {
    27442746            rc = VideoRecStrmInit(mpVideoRecCtx, uScreen,
    2745                                   pszName, ulWidth, ulHeight, ulRate, ulFps);
     2747                                  pszName, ulWidth, ulHeight, ulRate, ulFPS);
     2748            if (rc == VERR_ALREADY_EXISTS)
     2749            {
     2750                RTStrFree(pszName);
     2751                pszName = NULL;
     2752
     2753                static RTTIMESPEC ts = { 0 };
     2754                if (!RTTimeSpecGetNano(&ts))
     2755                    RTTimeNow(&ts);
     2756                RTTIME time;
     2757                RTTimeExplode(&time, &ts);
     2758                if (mcMonitors > 1)
     2759                    rc = RTStrAPrintf(&pszName, "%s-%04d-%02u-%02uT%02u-%02u-%02u-%09uZ-%u%s",
     2760                                      pszAbsPath, time.i32Year, time.u8Month, time.u8MonthDay,
     2761                                      time.u8Hour, time.u8Minute, time.u8Second, time.u32Nanosecond,
     2762                                      uScreen+1, pszExt);
     2763                else
     2764                    rc = RTStrAPrintf(&pszName, "%s-%04d-%02u-%02uT%02u-%02u-%02u-%09uZ%s",
     2765                                      pszAbsPath, time.i32Year, time.u8Month, time.u8MonthDay,
     2766                                      time.u8Hour, time.u8Minute, time.u8Second, time.u32Nanosecond,
     2767                                      pszExt);
     2768                if (RT_SUCCESS(rc))
     2769                    rc = VideoRecStrmInit(mpVideoRecCtx, uScreen,
     2770                                          pszName, ulWidth, ulHeight, ulRate, ulFPS);
     2771            }
     2772        }
     2773
    27462774        if (RT_SUCCESS(rc))
    27472775            LogRel(("WebM/VP8 video recording screen #%u with %ux%u @ %u kbps, %u fps to '%s' enabled.\n",
    2748                    uScreen, ulWidth, ulHeight, ulRate, ulFps, pszName));
     2776                   uScreen, ulWidth, ulHeight, ulRate, ulFPS, pszName));
    27492777        else
    27502778            LogRel(("Failed to initialize video recording context #%u (%Rrc)!\n", uScreen, rc));
  • trunk/src/VBox/Main/src-client/VideoRec.cpp

    r46578 r46667  
    474474    AssertReturn(pStrm->pu8RgbBuf, VERR_NO_MEMORY);
    475475
     476    /* Play safe: the file must not exist, overwriting is potentially
     477     * hazardous as nothing prevents the user from picking a file name of some
     478     * other important file, causing unintentional data loss. */
    476479    int rc = RTFileOpen(&pStrm->Ebml.file, pszFile,
    477                         RTFILE_O_CREATE_REPLACE | RTFILE_O_WRITE | RTFILE_O_DENY_NONE);
     480                        RTFILE_O_CREATE | RTFILE_O_WRITE | RTFILE_O_DENY_NONE);
    478481    if (RT_FAILURE(rc))
    479482    {
    480         LogFlow(("Failed to open the video capture output File (%Rrc)\n", rc));
     483        LogRel(("Failed to create the video capture output file \"%s\" (%Rrc)\n", pszFile, rc));
    481484        return rc;
    482485    }
     
    500503    /* disable multithreading */
    501504    pStrm->VpxConfig.g_threads = 0;
    502 //    pStrm->VpxConfig.kf_max_dist = 1;
     505
    503506    pStrm->uDelay = 1000 / uFps;
    504507
  • trunk/src/VBox/Main/src-server/MachineImpl.cpp

    r46532 r46667  
    168168    mAccelerate2DVideoEnabled = false;
    169169    mMonitorCount = 1;
    170     mVideoCaptureFile = "Test.webm";
    171170    mVideoCaptureWidth = 1024;
    172171    mVideoCaptureHeight = 768;
    173172    mVideoCaptureRate = 512;
    174     mVideoCaptureFps = 25;
     173    mVideoCaptureFPS = 25;
    175174    mVideoCaptureEnabled = false;
    176175    for (unsigned i = 0; i < RT_ELEMENTS(maVideoCaptureScreens); i++)
     
    17951794
    17961795    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    1797     mHWData->mVideoCaptureFile.cloneTo(apFile);
     1796    if (mHWData->mVideoCaptureFile.isEmpty())
     1797    {
     1798        Utf8Str defaultFile;
     1799        getDefaultVideoCaptureFile(defaultFile);
     1800        defaultFile.cloneTo(apFile);
     1801    }
     1802    else
     1803        mHWData->mVideoCaptureFile.cloneTo(apFile);
    17981804    return S_OK;
    17991805}
     
    18111817        return setError(E_INVALIDARG, tr("Cannot change parameters while capturing is enabled"));
    18121818
    1813     if (strFile.isEmpty())
    1814        strFile = "VideoCap.webm";
     1819    if (!RTPathStartsWithRoot(strFile.c_str()))
     1820        return setError(E_INVALIDARG, tr("Video capture file name '%s' is not absolute"), strFile.c_str());
     1821
     1822    if (!strFile.isEmpty())
     1823    {
     1824        Utf8Str defaultFile;
     1825        getDefaultVideoCaptureFile(defaultFile);
     1826        if (!RTPathCompare(strFile.c_str(), defaultFile.c_str()))
     1827            strFile.setNull();
     1828    }
    18151829
    18161830    setModified(IsModified_MachineData);
     
    19051919}
    19061920
    1907 STDMETHODIMP Machine::COMGETTER(VideoCaptureFps)(ULONG *aFps)
     1921STDMETHODIMP Machine::COMGETTER(VideoCaptureFPS)(ULONG *aFPS)
    19081922{
    19091923    AutoCaller autoCaller(this);
     
    19111925
    19121926    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    1913      *aFps = mHWData->mVideoCaptureFps;
    1914     return S_OK;
    1915 }
    1916 
    1917 STDMETHODIMP Machine::COMSETTER(VideoCaptureFps)(ULONG aFps)
     1927     *aFPS = mHWData->mVideoCaptureFPS;
     1928    return S_OK;
     1929}
     1930
     1931STDMETHODIMP Machine::COMSETTER(VideoCaptureFPS)(ULONG aFPS)
    19181932{
    19191933    AutoCaller autoCaller(this);
     
    19281942    setModified(IsModified_MachineData);
    19291943    mHWData.backup();
    1930     mHWData->mVideoCaptureFps = aFps;
     1944    mHWData->mVideoCaptureFPS = aFPS;
    19311945
    19321946    return S_OK;
     
    76607674                                   time.i32Year, time.u8Month, time.u8MonthDay,
    76617675                                   time.u8Hour, time.u8Minute, time.u8Second, time.u32Nanosecond);
     7676}
     7677
     7678/**
     7679 *  Returns the full path to the default video capture file.
     7680 */
     7681void Machine::getDefaultVideoCaptureFile(Utf8Str &strFile)
     7682{
     7683    AutoCaller autoCaller(this);
     7684    AssertComRCReturnVoid(autoCaller.rc());
     7685
     7686    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     7687
     7688    strFile = mData->m_strConfigFileFull;       // path/to/machinesfolder/vmname/vmname.vbox
     7689    strFile.stripExt();                         // path/to/machinesfolder/vmname/vmname
     7690    strFile.append(".webm");                    // path/to/machinesfolder/vmname/vmname.webm
    76627691}
    76637692
     
    90479076        AssertCompile(RT_ELEMENTS(mHWData->maVideoCaptureScreens) == sizeof(data.u64VideoCaptureScreens) * 8);
    90489077        mHWData->mVideoCaptureRate = data.ulVideoCaptureRate;
    9049         mHWData->mVideoCaptureFps = data.ulVideoCaptureFps;
    9050         mHWData->mVideoCaptureFile = data.strVideoCaptureFile;
     9078        mHWData->mVideoCaptureFPS = data.ulVideoCaptureFPS;
     9079        if (!data.strVideoCaptureFile.isEmpty())
     9080            calculateFullPath(data.strVideoCaptureFile, mHWData->mVideoCaptureFile);
     9081        else
     9082            mHWData->mVideoCaptureFile.setNull();
    90519083        mHWData->mFirmwareType = data.firmwareType;
    90529084        mHWData->mPointingHIDType = data.pointingHIDType;
     
    1028610318        data.ulVideoCaptureVertRes = mHWData->mVideoCaptureHeight;
    1028710319        data.ulVideoCaptureRate = mHWData->mVideoCaptureRate;
    10288         data.ulVideoCaptureFps = mHWData->mVideoCaptureFps;
     10320        data.ulVideoCaptureFPS = mHWData->mVideoCaptureFPS;
    1028910321        data.fVideoCaptureEnabled  = !!mHWData->mVideoCaptureEnabled;
    1029010322        for (unsigned i = 0; i < sizeof(data.u64VideoCaptureScreens) * 8; i++)
     
    1029510327                ASMBitClear(&data.u64VideoCaptureScreens, i);
    1029610328        }
    10297         data.strVideoCaptureFile = mHWData->mVideoCaptureFile;
     10329        /* store relative video capture file if possible */
     10330        copyPathRelativeToMachine(mHWData->mVideoCaptureFile, data.strVideoCaptureFile);
    1029810331
    1029910332        /* VRDEServer settings (optional) */
  • trunk/src/VBox/Main/xml/Settings.cpp

    r46367 r46667  
    17541754          ulVideoCaptureVertRes(768),
    17551755          ulVideoCaptureRate(512),
    1756           ulVideoCaptureFps(25),
     1756          ulVideoCaptureFPS(25),
    17571757          fVideoCaptureEnabled(false),
    17581758          u64VideoCaptureScreens(UINT64_C(0xffffffffffffffff)),
    1759           strVideoCaptureFile("Test.webm"),
     1759          strVideoCaptureFile(""),
    17601760          firmwareType(FirmwareType_BIOS),
    17611761          pointingHIDType(PointingHIDType_PS2Mouse),
     
    18321832                  && (ulVideoCaptureVertRes     == h.ulVideoCaptureVertRes)
    18331833                  && (ulVideoCaptureRate        == h.ulVideoCaptureRate)
    1834                   && (ulVideoCaptureFps         == h.ulVideoCaptureFps)
     1834                  && (ulVideoCaptureFPS         == h.ulVideoCaptureFPS)
    18351835                  && (firmwareType              == h.firmwareType)
    18361836                  && (pointingHIDType           == h.pointingHIDType)
     
    27312731            pelmHwChild->getAttributeValue("enabled",   hw.fVideoCaptureEnabled);
    27322732            pelmHwChild->getAttributeValue("screens",   hw.u64VideoCaptureScreens);
    2733             pelmHwChild->getAttributeValue("file",      hw.strVideoCaptureFile);
     2733            pelmHwChild->getAttributeValuePath("file",  hw.strVideoCaptureFile);
    27342734            pelmHwChild->getAttributeValue("horzRes",   hw.ulVideoCaptureHorzRes);
    27352735            pelmHwChild->getAttributeValue("vertRes",   hw.ulVideoCaptureVertRes);
    27362736            pelmHwChild->getAttributeValue("rate",      hw.ulVideoCaptureRate);
    2737             pelmHwChild->getAttributeValue("fps",       hw.ulVideoCaptureFps);
     2737            pelmHwChild->getAttributeValue("fps",       hw.ulVideoCaptureFPS);
    27382738        }
    27392739        else if (pelmHwChild->nameEquals("RemoteDisplay"))
     
    39163916    xml::ElementNode *pelmVideoCapture = pelmHardware->createChild("VideoCapture");
    39173917
    3918     if (m->sv >= SettingsVersion_v1_12)
     3918    if (m->sv >= SettingsVersion_v1_14)
    39193919    {
    39203920        pelmVideoCapture->setAttribute("enabled",   hw.fVideoCaptureEnabled);
    39213921        pelmVideoCapture->setAttribute("screens",   hw.u64VideoCaptureScreens);
    3922         pelmVideoCapture->setAttribute("file",      hw.strVideoCaptureFile);
     3922        if (!hw.strVideoCaptureFile.isEmpty())
     3923            pelmVideoCapture->setAttributePath("file",  hw.strVideoCaptureFile);
    39233924        pelmVideoCapture->setAttribute("horzRes",   hw.ulVideoCaptureHorzRes);
    39243925        pelmVideoCapture->setAttribute("vertRes",   hw.ulVideoCaptureVertRes);
    39253926        pelmVideoCapture->setAttribute("rate",      hw.ulVideoCaptureRate);
    3926         pelmVideoCapture->setAttribute("fps",       hw.ulVideoCaptureFps);
     3927        pelmVideoCapture->setAttribute("fps",       hw.ulVideoCaptureFPS);
    39273928    }
    39283929
     
    50525053    {
    50535054        // VirtualBox 4.3 adds default frontend setting, graphics controller
    5054         // setting, explicit long mode setting.
     5055        // setting, explicit long mode setting and video capturing.
    50555056        if (   !hardwareMachine.strDefaultFrontend.isEmpty()
    50565057            || hardwareMachine.graphicsControllerType != GraphicsControllerType_VBoxVGA
    50575058            || hardwareMachine.enmLongMode != Hardware::LongMode_Legacy
    5058             || machineUserData.ovIcon.length() > 0)
     5059            || machineUserData.ovIcon.length() > 0
     5060            || hardwareMachine.fVideoCaptureEnabled)
    50595061            m->sv = SettingsVersion_v1_14;
    50605062    }
     
    50975099    if (m->sv < SettingsVersion_v1_12)
    50985100    {
    5099         // 4.1: Emulated USB devices.
    5100         if (hardwareMachine.fEmulatedUSBCardReader)
    5101             m->sv = SettingsVersion_v1_12;
    5102     }
    5103 
    5104     if (m->sv < SettingsVersion_v1_12)
    5105     {
    5106         // VirtualBox 4.1 adds PCI passthrough.
     5101        // VirtualBox 4.1 adds PCI passthrough and emulated USB Smart Card reader
    51075102        if (   hardwareMachine.pciAttachments.size()
    5108             || hardwareMachine.fVideoCaptureEnabled)
     5103            || hardwareMachine.fEmulatedUSBCardReader)
    51095104            m->sv = SettingsVersion_v1_12;
    51105105    }
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