VirtualBox

Changeset 75307 in vbox for trunk/src/VBox/Main/xml


Ignore:
Timestamp:
Nov 7, 2018 1:56:14 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
126417
Message:

Recording: Bugfixes for Main and FE/Qt.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/xml/Settings.cpp

    r75283 r75307  
    23872387     */
    23882388
    2389     fEnabled            = true;
     2389    fEnabled            = false;
    23902390    enmDest             = CaptureDestination_File;
    23912391    ulMaxTimeS          = 0;
    23922392    strOptions          = "";
    23932393    File.ulMaxSizeMB    = 0;
     2394    File.strName        = "";
    23942395    Video.enmCodec      = CaptureVideoCodec_VP8;
    23952396    Video.ulWidth       = 1024;
     
    24042405    featureMap[CaptureFeature_Video] = true;
    24052406    featureMap[CaptureFeature_Audio] = false;
    2406 
    2407     //i_calculateFullPath
    24082407}
    24092408
     
    24132412bool CaptureScreenSettings::areDefaultSettings(void) const
    24142413{
    2415     const bool fDefault =    fEnabled            == true
    2416                           && enmDest             == CaptureDestination_File
    2417                           && ulMaxTimeS          == 0
    2418                           && strOptions          == ""
    2419                           && File.ulMaxSizeMB    == 0
    2420                           && Video.enmCodec      == CaptureVideoCodec_VP8
    2421                           && Video.ulWidth       == 1024
    2422                           && Video.ulHeight      == 768
    2423                           && Video.ulRate        == 512
    2424                           && Video.ulFPS         == 25
    2425                           && Audio.enmAudioCodec == CaptureAudioCodec_Opus
    2426                           && Audio.cBits         == 16
    2427                           && Audio.cChannels     == 2
    2428                           && Audio.uHz           == 22050;
    2429 
    2430     return fDefault;
     2414    return    fEnabled            == false
     2415           && enmDest             == CaptureDestination_File
     2416           && ulMaxTimeS          == 0
     2417           && strOptions          == ""
     2418           && File.ulMaxSizeMB    == 0
     2419           && File.strName        == ""
     2420           && Video.enmCodec      == CaptureVideoCodec_VP8
     2421           && Video.ulWidth       == 1024
     2422           && Video.ulHeight      == 768
     2423           && Video.ulRate        == 512
     2424           && Video.ulFPS         == 25
     2425           && Audio.enmAudioCodec == CaptureAudioCodec_Opus
     2426           && Audio.cBits         == 16
     2427           && Audio.cChannels     == 2
     2428           && Audio.uHz           == 22050;
    24312429}
    24322430
     
    24722470}
    24732471
     2472/**
     2473 * Applies the default settings.
     2474 */
    24742475void CaptureSettings::applyDefaults(void)
    24752476{
     
    24782479    mapScreens.clear();
    24792480
    2480     CaptureScreenSettings screenSettings; /* Apply default settings. */
    2481     for (uint32_t l = 0; l < SchemaDefs::MaxGuestMonitors; l++)
    2482     {
    2483         mapScreens[l] = screenSettings;
     2481    try
     2482    {
     2483        /* Always add screen 0 to the default configuration. */
     2484        CaptureScreenSettings screenSettings; /* Apply default settings for screen 0. */
     2485        mapScreens[0] = screenSettings;
     2486    }
     2487    catch (std::bad_alloc &)
     2488    {
     2489        AssertFailed();
    24842490    }
    24852491}
     
    24902496bool CaptureSettings::areDefaultSettings() const
    24912497{
     2498    const bool fDefault =    fEnabled          == false
     2499                          && mapScreens.size() == 1;
     2500    if (!fDefault)
     2501        return false;
     2502
    24922503    CaptureScreenMap::const_iterator itScreen = mapScreens.begin();
    2493     while (itScreen != mapScreens.end())
    2494     {
    2495         if (!itScreen->second.areDefaultSettings())
    2496             return false;
    2497 
    2498         ++itScreen;
    2499     }
    2500 
    2501     return true;
     2504    return    itScreen->first == 0
     2505           && itScreen->second.areDefaultSettings();
    25022506}
    25032507
     
    44134417            /* At the moment we only support one capturing configuration, that is, all screens
    44144418             * have the same configuration. So load/save to/from screen 0. */
     4419            Assert(hw.captureSettings.mapScreens.size()); /* At least screen must be present. */
    44154420            CaptureScreenSettings &screen0Settings = hw.captureSettings.mapScreens[0];
    44164421
     
    44244429            pelmHwChild->getAttributeValue("fps",       screen0Settings.Video.ulFPS);
    44254430
    4426             for (unsigned i = 0; i < 64; i++)
     4431            for (unsigned i = 0; i < hw.cMonitors; i++) /* Don't add more settings than we have monitors configured. */
    44274432            {
    44284433                if (u64VideoCaptureScreens & RT_BIT_64(i)) /* Screen i enabled? */
     
    58395844        Assert(hw.captureSettings.mapScreens.size());
    58405845        const CaptureScreenMap::const_iterator itScreen0Settings = hw.captureSettings.mapScreens.find(0);
     5846        Assert(itScreen0Settings != hw.captureSettings.mapScreens.end());
    58415847
    58425848        if (itScreen0Settings->second.ulMaxTimeS)
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