VirtualBox

Changeset 95639 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Jul 14, 2022 8:30:45 AM (2 years ago)
Author:
vboxsync
Message:

Recording: Settings handling fixes / overhaul. This adds the ability to handle per-screen settings, which can be different from the first screen (screen 0). Also fixed a couple of bugs regarding snapshot handling and persistence (committing, rolling back, ++) in that area. FE/VBoxManage now can also list the per-screen settings. Added some further @todos. bugref:9286

File:
1 edited

Legend:

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

    r95364 r95639  
    636636    bool isFeatureEnabled(RecordingFeature_T enmFeature) const;
    637637
     638    static const char *getDefaultOptions(void);
     639
    638640    bool operator==(const RecordingScreenSettings &d) const;
    639641
     
    641643    bool                   fEnabled;   // requires settings version 1.14 (VirtualBox 4.3)
    642644    /** Destination to record to. */
    643     RecordingDestination_T enmDest;    /** @todo Implement with next settings version bump. */
     645    RecordingDestination_T enmDest;
    644646    /** Which features are enable or not. */
    645647    RecordingFeatureMap    featureMap; /** @todo Implement with next settings version bump. */
    646648    /** Maximum time (in s) to record. If set to 0, no time limit is set. */
    647649    uint32_t               ulMaxTimeS; // requires settings version 1.14 (VirtualBox 4.3)
    648     /** Options string for hidden / advanced / experimental features. */
     650    /** Options string for hidden / advanced / experimental features.
     651     *  Use RecordingScreenSettings::getDefaultOptions(). */
    649652    com::Utf8Str           strOptions; // new since VirtualBox 5.2.
    650653
     
    703706
    704707        /** Maximum size (in MB) the file is allowed to have.
    705          *  When reaching the limit, recording will stop. */
     708         *  When reaching the limit, recording will stop. 0 means no limit. */
    706709        uint32_t     ulMaxSizeMB; // requires settings version 1.14 (VirtualBox 4.3)
    707         /** Absolute file name path to use for recording. */
     710        /** Absolute file name path to use for recording.
     711         *  When empty, this is considered as being the default setting. */
    708712        com::Utf8Str strName;     // requires settings version 1.14 (VirtualBox 4.3)
    709713    } File;
     
    712716/** Map for keeping settings per virtual screen.
    713717 *  The key specifies the screen ID. */
    714 typedef std::map<uint32_t, RecordingScreenSettings> RecordingScreenMap;
     718typedef std::map<uint32_t, RecordingScreenSettings> RecordingScreenSettingsMap;
     719
     720/**
     721 * Common recording settings, shared among all per-screen recording settings.
     722 */
     723struct RecordingCommonSettings
     724{
     725    RecordingCommonSettings();
     726
     727    void applyDefaults(void);
     728
     729    bool areDefaultSettings(void) const;
     730
     731    bool operator==(const RecordingCommonSettings &d) const;
     732
     733    /** Whether recording as a whole is enabled or disabled. */
     734    bool fEnabled;       // requires settings version 1.14 (VirtualBox 4.3)
     735};
    715736
    716737/**
     
    727748    bool areDefaultSettings(void) const;
    728749
    729     bool operator==(const RecordingSettings &d) const;
    730 
    731     /** Whether recording as a whole is enabled or disabled. */
    732     bool               fEnabled;       // requires settings version 1.14 (VirtualBox 4.3)
     750    bool operator==(const RecordingSettings &that) const;
     751
     752    /** Common settings for all per-screen recording settings. */
     753    RecordingCommonSettings    common;
    733754    /** Map of handled recording screen settings.
    734755     *  The key specifies the screen ID. */
    735     RecordingScreenMap mapScreens;
     756    RecordingScreenSettingsMap mapScreens;
    736757};
    737758
     
    12351256    BIOSSettings        biosSettings;
    12361257    NvramSettings       nvramSettings;
    1237     RecordingSettings   recordingSettings;
    12381258    GraphicsAdapter     graphicsAdapter;
    12391259    USB                 usbSettings;
     
    13111331    bool operator==(const Snapshot &s) const;
    13121332
    1313     com::Guid       uuid;
    1314     com::Utf8Str    strName,
    1315                     strDescription;             // optional
    1316     RTTIMESPEC      timestamp;
    1317 
    1318     com::Utf8Str    strStateFile;               // for online snapshots only
    1319 
    1320     Hardware        hardware;
    1321 
    1322     Debugging       debugging;
    1323     Autostart       autostart;
    1324 
    1325     SnapshotsList   llChildSnapshots;
     1333    com::Guid           uuid;
     1334    com::Utf8Str        strName,
     1335                        strDescription;             // optional
     1336    RTTIMESPEC          timestamp;
     1337
     1338    com::Utf8Str        strStateFile;               // for online snapshots only
     1339
     1340    Hardware            hardware;
     1341
     1342    Debugging           debugging;
     1343    Autostart           autostart;
     1344    RecordingSettings   recordingSettings;
     1345
     1346    SnapshotsList       llChildSnapshots;
    13261347
    13271348    static const struct Snapshot Empty;
     
    13911412    Debugging               debugging;
    13921413    Autostart               autostart;
     1414    RecordingSettings       recordingSettings;
    13931415
    13941416    StringsMap              mapExtraDataItems;
     
    14471469    void readDebugging(const xml::ElementNode &elmDbg, Debugging &dbg);
    14481470    void readAutostart(const xml::ElementNode &elmAutostart, Autostart &autostrt);
     1471    void readRecordingSettings(const xml::ElementNode &elmRecording, RecordingSettings &recording);
    14491472    void readGroups(const xml::ElementNode &elmGroups, StringsList &llGroups);
    14501473    bool readSnapshot(const com::Guid &curSnapshotUuid, const xml::ElementNode &elmSnapshot, Snapshot &snap);
     
    14611484    void buildDebuggingXML(xml::ElementNode &elmParent, const Debugging &dbg);
    14621485    void buildAutostartXML(xml::ElementNode &elmParent, const Autostart &autostrt);
     1486    void buildRecordingXML(xml::ElementNode &elmParent, const RecordingSettings &recording);
    14631487    void buildGroupsXML(xml::ElementNode &elmParent, const StringsList &llGroups);
    14641488    void buildSnapshotXML(xml::ElementNode &elmParent, const Snapshot &snap);
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