Changeset 96141 in vbox for trunk/src/VBox/Main/xml
- Timestamp:
- Aug 11, 2022 3:37:19 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/xml/Settings.cpp
r96134 r96141 3019 3019 Video.enmCodec = RecordingVideoCodec_VP8; 3020 3020 Video.enmDeadline = RecordingCodecDeadline_Default; 3021 Video.enmRateCtlMode = RecordingRateControlMode_VBR; 3022 Video.enmScalingMode = RecordingVideoScalingMode_None; 3021 3023 Video.ulWidth = 1024; 3022 3024 Video.ulHeight = 768; 3023 3025 Video.ulRate = 512; 3024 3026 Video.ulFPS = 25; 3025 Audio.enm AudioCodec= RecordingAudioCodec_Opus;3027 Audio.enmCodec = RecordingAudioCodec_Opus; 3026 3028 Audio.enmDeadline = RecordingCodecDeadline_Default; 3029 Audio.enmRateCtlMode = RecordingRateControlMode_VBR; 3027 3030 Audio.cBits = 16; 3028 3031 Audio.cChannels = 2; … … 3052 3055 && Video.enmCodec == RecordingVideoCodec_VP8 3053 3056 && Video.enmDeadline == RecordingCodecDeadline_Default 3057 && Video.enmRateCtlMode == RecordingRateControlMode_VBR 3058 && Video.enmScalingMode == RecordingVideoScalingMode_None 3054 3059 && Video.ulWidth == 1024 3055 3060 && Video.ulHeight == 768 3056 3061 && Video.ulRate == 512 3057 3062 && Video.ulFPS == 25 3058 && Audio.enm AudioCodec== RecordingAudioCodec_Opus3063 && Audio.enmCodec == RecordingAudioCodec_Opus 3059 3064 && Audio.enmDeadline == RecordingCodecDeadline_Default 3065 && Audio.enmRateCtlMode == RecordingRateControlMode_VBR 3060 3066 && Audio.cBits == 16 3061 3067 && Audio.cChannels == 2 … … 3100 3106 && Video.ulRate == d.Video.ulRate 3101 3107 && Video.ulFPS == d.Video.ulFPS 3102 && Audio.enm AudioCodec == d.Audio.enmAudioCodec3108 && Audio.enmCodec == d.Audio.enmCodec 3103 3109 && Audio.enmDeadline == d.Audio.enmDeadline 3104 3110 && Audio.cBits == d.Audio.cBits … … 6252 6258 6253 6259 (*itScreen)->getAttributeValue("enabled", screenSettings.fEnabled); 6254 Utf8Str str Features;6255 (*itScreen)->getAttributeValue("featuresEnabled", str Features);6256 RecordingScreenSettings::featuresFromString(str Features, screenSettings.featureMap);6260 Utf8Str strTemp; 6261 (*itScreen)->getAttributeValue("featuresEnabled", strTemp); 6262 RecordingScreenSettings::featuresFromString(strTemp, screenSettings.featureMap); 6257 6263 (*itScreen)->getAttributeValue("maxTimeS", screenSettings.ulMaxTimeS); 6258 6264 (*itScreen)->getAttributeValue("options", screenSettings.strOptions); … … 6264 6270 N_("Not supported Recording/@dest attribute '%#x'"), screenSettings.enmDest); 6265 6271 (*itScreen)->getAttributeValue("maxSizeMB", screenSettings.File.ulMaxSizeMB); 6266 6272 if ((*itScreen)->getAttributeValue("videoCodec", strTemp)) /* Stick with default if not set. */ 6273 RecordingScreenSettings::videoCodecFromString(strTemp, screenSettings.Video.enmCodec); 6274 (*itScreen)->getAttributeValue("videoScalingMode", (uint32_t &)screenSettings.Video.enmScalingMode); 6267 6275 (*itScreen)->getAttributeValue("videoDeadline", (uint32_t &)screenSettings.Video.enmDeadline); 6268 6276 (*itScreen)->getAttributeValue("horzRes", screenSettings.Video.ulWidth); … … 6271 6279 (*itScreen)->getAttributeValue("fps", screenSettings.Video.ulFPS); 6272 6280 6281 if ((*itScreen)->getAttributeValue("audioCodec", strTemp)) /* Stick with default if not set. */ 6282 RecordingScreenSettings::audioCodecFromString(strTemp, screenSettings.Audio.enmCodec); 6273 6283 (*itScreen)->getAttributeValue("audioDeadline", (uint32_t &)screenSettings.Audio.enmDeadline); 6274 6284 (*itScreen)->getAttributeValue("audioHz", (uint32_t &)screenSettings.Audio.uHz); … … 8286 8296 xml::ElementNode *pelmRecording = elmParent.createChild("Recording"); 8287 8297 8288 if (recordingSettings.common.fEnabled) 8298 if (!recordingSettings.common.areDefaultSettings()) 8299 { 8289 8300 pelmRecording->setAttribute("enabled", recording.common.fEnabled); 8301 } 8290 8302 8291 8303 /* Only serialize screens which have non-default settings. */ … … 8312 8324 pelmScreen->setAttribute("id", itScreen->first); /* The key equals the monitor ID. */ 8313 8325 pelmScreen->setAttribute("enabled", itScreen->second.fEnabled); 8314 com::Utf8Str str Features;8315 RecordingScreenSettings::featuresToString(itScreen->second.featureMap, str Features);8316 pelmScreen->setAttribute("featuresEnabled", str Features);8326 com::Utf8Str strTemp; 8327 RecordingScreenSettings::featuresToString(itScreen->second.featureMap, strTemp); 8328 pelmScreen->setAttribute("featuresEnabled", strTemp); 8317 8329 if (itScreen->second.ulMaxTimeS) 8318 8330 pelmScreen->setAttribute("maxTimeS", itScreen->second.ulMaxTimeS); … … 8325 8337 pelmScreen->setAttribute("maxSizeMB", itScreen->second.File.ulMaxSizeMB); 8326 8338 8339 RecordingScreenSettings::videoCodecToString(itScreen->second.Video.enmCodec, strTemp); 8340 pelmScreen->setAttribute("videoCodec", strTemp); 8327 8341 if (itScreen->second.Video.enmDeadline != RecordingCodecDeadline_Default) 8328 8342 pelmScreen->setAttribute("videoDeadline", itScreen->second.Video.enmDeadline); 8343 if (itScreen->second.Video.enmScalingMode != RecordingVideoScalingMode_None) 8344 pelmScreen->setAttribute("videoScalingMode",itScreen->second.Video.enmScalingMode); 8329 8345 if ( itScreen->second.Video.ulWidth != 1024 8330 8346 || itScreen->second.Video.ulHeight != 768) … … 8338 8354 pelmScreen->setAttribute("fps", itScreen->second.Video.ulFPS); 8339 8355 8356 RecordingScreenSettings::audioCodecToString(itScreen->second.Audio.enmCodec, strTemp); 8357 pelmScreen->setAttribute("audioCodec", strTemp); 8340 8358 if (itScreen->second.Audio.enmDeadline != RecordingCodecDeadline_Default) 8341 8359 pelmScreen->setAttribute("audioDeadline", itScreen->second.Audio.enmDeadline); … … 8356 8374 xml::ElementNode *pelmVideoCapture = elmParent.createChild("VideoCapture"); 8357 8375 8358 if (recording.common.fEnabled) 8376 if (!recordingSettings.common.areDefaultSettings()) 8377 { 8359 8378 pelmVideoCapture->setAttribute("enabled", recording.common.fEnabled); 8379 } 8360 8380 8361 8381 /* Convert the enabled screens to the former uint64_t bit array and vice versa. */
Note:
See TracChangeset
for help on using the changeset viewer.