Changeset 96141 in vbox
- Timestamp:
- Aug 11, 2022 3:37:19 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 152947
- Location:
- trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/settings.h
r96134 r96141 680 680 { 681 681 /** The audio codec type to use. */ 682 RecordingAudioCodec_T enm AudioCodec;// requires settings version 1.19 (VirtualBox 7.0)682 RecordingAudioCodec_T enmCodec; // requires settings version 1.19 (VirtualBox 7.0) 683 683 /** Codec deadline to use. */ 684 684 RecordingCodecDeadline_T enmDeadline; // requires settings version 1.19 (VirtualBox 7.0) 685 /** Rate control mode to use. */ 686 RecordingRateControlMode_T 687 enmRateCtlMode;// requires settings version 1.19 (VirtualBox 7.0) 685 688 /** Hz rate. */ 686 689 uint16_t uHz; // requires settings version 1.19 (VirtualBox 7.0) … … 700 703 /** Codec deadline to use. */ 701 704 RecordingCodecDeadline_T enmDeadline; // requires settings version 1.19 (VirtualBox 7.0) 705 /** Rate control mode to use. */ 706 RecordingRateControlMode_T 707 enmRateCtlMode; // requires settings version 1.19 (VirtualBox 7.0) 708 /** Rate control mode to use. */ 709 RecordingVideoScalingMode_T 710 enmScalingMode; // requires settings version 1.19 (VirtualBox 7.0) 702 711 /** Target frame width in pixels (X). */ 703 uint32_tulWidth; // requires settings version 1.14 (VirtualBox 4.3)712 uint32_t ulWidth; // requires settings version 1.14 (VirtualBox 4.3) 704 713 /** Target frame height in pixels (Y). */ 705 714 uint32_t ulHeight; // requires settings version 1.14 (VirtualBox 4.3) -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r95748 r96141 5869 5869 5870 5870 <enum 5871 name="RecordingVideoScalingM ethod"5872 uuid=" 5576D890-48EE-449A-A81B-B776233598B7"5871 name="RecordingVideoScalingMode" 5872 uuid="0dd1127d-4f62-4b82-beee-91086a9f1d24" 5873 5873 > 5874 5874 <desc> … … 5877 5877 5878 5878 <const name="None" value="0"> 5879 <desc>No scaling performed.</desc> 5879 <desc>No scaling performed. 5880 The image wil be cropped when the source is bigger than the target size.</desc> 5880 5881 </const> 5881 5882 <const name="NearestNeighbor" value="1"> … … 5894 5895 5895 5896 <enum 5896 name="Recording VideoRateControlMode"5897 uuid=" D4EFB692-9F98-4112-88D3-A16FBE2BF6A8"5897 name="RecordingRateControlMode" 5898 uuid="d07a33ac-b4ea-4917-942d-c03be14fbe2f" 5898 5899 > 5899 5900 <desc> 5900 5901 Recording video rate control mode enumeration. 5902 <note>Not all codecs may support all rate control modes.</note> 5901 5903 </desc> 5902 5904 5903 <const name="CBR" value="0"> 5904 <desc>Constant bit rate (CBR).</desc> 5905 </const> 5906 <const name="VBR" value="1"> 5907 <desc>Variable bit rate (VBR). Not yet implemented.</desc> 5905 <const name="ABR" value="0"> 5906 <desc>Average bit rate (ABR). Constrained to a certain size.</desc> 5907 </const> 5908 <const name="CBR" value="1"> 5909 <desc>Constant bit rate (CBR). Constrained to a certain size.</desc> 5910 </const> 5911 <const name="VBR" value="2"> 5912 <desc>Variable bit rate (VBR). Constrained to a certain quality.</desc> 5908 5913 </const> 5909 5914 </enum> … … 5911 5916 <interface 5912 5917 name="IRecordingScreenSettings" extends="$unknown" 5913 uuid=" 92eb5328-c0b3-4ad2-ae25-75b12c52871f"5918 uuid="2377f7d2-1971-40ff-8e39-e61089bb3a22" 5914 5919 wsmap="managed" 5915 5920 rest="managed" … … 6030 6035 </attribute> 6031 6036 6037 <attribute name="audioRateControlMode" type="RecordingRateControlMode"> 6038 <desc> 6039 Determines the audio rate control mode. This setting cannot be changed 6040 while recording is enabled. 6041 </desc> 6042 </attribute> 6043 6032 6044 <attribute name="audioDeadline" type="RecordingCodecDeadline" default="Default"> 6033 6045 <desc> … … 6100 6112 </attribute> 6101 6113 6102 <attribute name="videoRateControlMode" type="Recording VideoRateControlMode">6103 <desc> 6104 Determines the rate control mode. This setting cannot be changed6114 <attribute name="videoRateControlMode" type="RecordingRateControlMode"> 6115 <desc> 6116 Determines the video rate control mode. This setting cannot be changed 6105 6117 while recording is enabled. 6106 6118 </desc> … … 6116 6128 </attribute> 6117 6129 6118 <attribute name="videoScalingM ethod" type="RecordingVideoScalingMethod">6119 <desc> 6120 Determines the video scaling m ethodto use.6130 <attribute name="videoScalingMode" type="RecordingVideoScalingMode"> 6131 <desc> 6132 Determines the video scaling mode to use. 6121 6133 This setting cannot be changed while recording is enabled. 6122 6134 </desc> … … 12392 12404 name="ISystemProperties" 12393 12405 extends="$unknown" 12394 uuid=" 3624830f-4ac4-404f-bc58-cf20ed8836b0"12406 uuid="068decf8-335d-4ec5-8265-ccfd910c4f9d" 12395 12407 wsmap="managed" 12396 12408 rest="managed" … … 12829 12841 </attribute> 12830 12842 12831 <attribute name="supportedRecordingVSM ethods" type="RecordingVideoScalingMethod" safearray="yes" readonly="yes">12832 <desc> 12833 Returns an array of officially supported values for enum <link to="RecordingVideoScalingM ethod"/>,12843 <attribute name="supportedRecordingVSModes" type="RecordingVideoScalingMode" safearray="yes" readonly="yes"> 12844 <desc> 12845 Returns an array of officially supported values for enum <link to="RecordingVideoScalingMode"/>, 12834 12846 in the sense of what is e.g. worth offering in the VirtualBox GUI. 12835 12847 </desc> 12836 12848 </attribute> 12837 12849 12838 <attribute name="supportedRecordingVRCModes" type="RecordingVideoRateControlMode" safearray="yes" readonly="yes"> 12839 <desc> 12840 Returns an array of officially supported values for enum <link to="RecordingVideoRateControlMode"/>, 12850 <attribute name="supportedRecordingARCModes" type="RecordingRateControlMode" safearray="yes" readonly="yes"> 12851 <desc> 12852 Returns an array of officially supported audio codec values for enum <link to="RecordingVideoRateControlMode"/>, 12853 in the sense of what is e.g. worth offering in the VirtualBox GUI. 12854 </desc> 12855 </attribute> 12856 12857 <attribute name="supportedRecordingVRCModes" type="RecordingRateControlMode" safearray="yes" readonly="yes"> 12858 <desc> 12859 Returns an array of officially supported video codec values for enum <link to="RecordingVideoRateControlMode"/>, 12841 12860 in the sense of what is e.g. worth offering in the VirtualBox GUI. 12842 12861 </desc> -
trunk/src/VBox/Main/include/RecordingScreenSettingsImpl.h
r95741 r96141 91 91 HRESULT getAudioDeadline(RecordingCodecDeadline_T *aDeadline); 92 92 HRESULT setAudioDeadline(RecordingCodecDeadline_T aDeadline); 93 HRESULT getAudioRateControlMode(RecordingRateControlMode_T *aMode); 94 HRESULT setAudioRateControlMode(RecordingRateControlMode_T aMode); 93 95 HRESULT getAudioHz(ULONG *aHz); 94 96 HRESULT setAudioHz(ULONG aHz); … … 108 110 HRESULT getVideoRate(ULONG *aVideoRate); 109 111 HRESULT setVideoRate(ULONG aVideoRate); 110 HRESULT getVideoRateControlMode(Recording VideoRateControlMode_T *aMode);111 HRESULT setVideoRateControlMode(Recording VideoRateControlMode_T aMode);112 HRESULT getVideoRateControlMode(RecordingRateControlMode_T *aMode); 113 HRESULT setVideoRateControlMode(RecordingRateControlMode_T aMode); 112 114 HRESULT getVideoFPS(ULONG *aVideoFPS); 113 115 HRESULT setVideoFPS(ULONG aVideoFPS); 114 HRESULT getVideoScalingM ethod(RecordingVideoScalingMethod_T *aMode);115 HRESULT setVideoScalingM ethod(RecordingVideoScalingMethod_T aMode);116 HRESULT getVideoScalingMode(RecordingVideoScalingMode_T *aMode); 117 HRESULT setVideoScalingMode(RecordingVideoScalingMode_T aMode); 116 118 117 119 private: -
trunk/src/VBox/Main/include/SystemPropertiesImpl.h
r95741 r96141 129 129 HRESULT getSupportedRecordingAudioCodecs(std::vector<RecordingAudioCodec_T> &aSupportedRecordingAudioCodecs) RT_OVERRIDE; 130 130 HRESULT getSupportedRecordingVideoCodecs(std::vector<RecordingVideoCodec_T> &aSupportedRecordingVideoCodecs) RT_OVERRIDE; 131 HRESULT getSupportedRecordingVSMethods(std::vector<RecordingVideoScalingMethod_T> &aSupportedRecordingVideoScalingMethods) RT_OVERRIDE; 132 HRESULT getSupportedRecordingVRCModes(std::vector<RecordingVideoRateControlMode_T> &aSupportedRecordingVideoRateControlModes) RT_OVERRIDE; 131 HRESULT getSupportedRecordingVSModes(std::vector<RecordingVideoScalingMode_T> &aSupportedRecordingVideoScalingModes) RT_OVERRIDE; 132 HRESULT getSupportedRecordingARCModes(std::vector<RecordingRateControlMode_T> &aSupportedRecordingAudioRateControlModes) RT_OVERRIDE; 133 HRESULT getSupportedRecordingVRCModes(std::vector<RecordingRateControlMode_T> &aSupportedRecordingVideoRateControlModes) RT_OVERRIDE; 133 134 HRESULT getSupportedGraphicsControllerTypes(std::vector<GraphicsControllerType_T> &aSupportedGraphicsControllerTypes) RT_OVERRIDE; 134 135 HRESULT getSupportedCloneOptions(std::vector<CloneOptions_T> &aSupportedCloneOptions) RT_OVERRIDE; -
trunk/src/VBox/Main/src-client/ConsoleImpl.cpp
r96137 r96141 7301 7301 AssertComRCReturn(hrc, VERR_INVALID_PARAMETER); 7302 7302 recScreenSettings.strOptions = bstrTemp; 7303 hrc = pRecScreenSettings->COMGETTER(AudioCodec)(&recScreenSettings.Audio.enmCodec); 7304 AssertComRCReturn(hrc, VERR_INVALID_PARAMETER); 7305 hrc = pRecScreenSettings->COMGETTER(AudioDeadline)(&recScreenSettings.Audio.enmDeadline); 7306 AssertComRCReturn(hrc, VERR_INVALID_PARAMETER); 7307 hrc = pRecScreenSettings->COMGETTER(AudioRateControlMode)(&recScreenSettings.Audio.enmRateCtlMode); 7308 AssertComRCReturn(hrc, VERR_INVALID_PARAMETER); 7309 hrc = pRecScreenSettings->COMGETTER(AudioHz)((ULONG *)&recScreenSettings.Audio.uHz); 7310 AssertComRCReturn(hrc, VERR_INVALID_PARAMETER); 7311 hrc = pRecScreenSettings->COMGETTER(AudioBits)((ULONG *)&recScreenSettings.Audio.cBits); 7312 AssertComRCReturn(hrc, VERR_INVALID_PARAMETER); 7313 hrc = pRecScreenSettings->COMGETTER(AudioChannels)((ULONG *)&recScreenSettings.Audio.cChannels); 7314 AssertComRCReturn(hrc, VERR_INVALID_PARAMETER); 7315 hrc = pRecScreenSettings->COMGETTER(VideoCodec)(&recScreenSettings.Video.enmCodec); 7316 AssertComRCReturn(hrc, VERR_INVALID_PARAMETER); 7303 7317 hrc = pRecScreenSettings->COMGETTER(VideoWidth)((ULONG *)&recScreenSettings.Video.ulWidth); 7304 7318 AssertComRCReturn(hrc, VERR_INVALID_PARAMETER); 7305 7319 hrc = pRecScreenSettings->COMGETTER(VideoHeight)((ULONG *)&recScreenSettings.Video.ulHeight); 7320 AssertComRCReturn(hrc, VERR_INVALID_PARAMETER); 7321 hrc = pRecScreenSettings->COMGETTER(VideoDeadline)(&recScreenSettings.Video.enmDeadline); 7322 AssertComRCReturn(hrc, VERR_INVALID_PARAMETER); 7323 hrc = pRecScreenSettings->COMGETTER(VideoRateControlMode)(&recScreenSettings.Video.enmRateCtlMode); 7324 AssertComRCReturn(hrc, VERR_INVALID_PARAMETER); 7325 hrc = pRecScreenSettings->COMGETTER(VideoScalingMode)(&recScreenSettings.Video.enmScalingMode); 7306 7326 AssertComRCReturn(hrc, VERR_INVALID_PARAMETER); 7307 7327 hrc = pRecScreenSettings->COMGETTER(VideoRate)((ULONG *)&recScreenSettings.Video.ulRate); -
trunk/src/VBox/Main/src-server/RecordingScreenSettingsImpl.cpp
r95741 r96141 560 560 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 561 561 562 *aCodec = m->bd->Audio.enm AudioCodec;562 *aCodec = m->bd->Audio.enmCodec; 563 563 564 564 return S_OK; … … 578 578 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 579 579 580 if (m->bd->Audio.enm AudioCodec != aCodec)581 { 582 m->bd.backup(); 583 m->bd->Audio.enm AudioCodec = aCodec;580 if (m->bd->Audio.enmCodec != aCodec) 581 { 582 m->bd.backup(); 583 m->bd->Audio.enmCodec = aCodec; 584 584 585 585 alock.release(); … … 624 624 625 625 return S_OK; 626 } 627 628 HRESULT RecordingScreenSettings::getAudioRateControlMode(RecordingRateControlMode_T *aMode) 629 { 630 AutoCaller autoCaller(this); 631 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 632 633 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 634 635 *aMode = RecordingRateControlMode_VBR; /** @todo Implement CBR. */ 636 637 return S_OK; 638 } 639 640 HRESULT RecordingScreenSettings::setAudioRateControlMode(RecordingRateControlMode_T aMode) 641 { 642 AutoCaller autoCaller(this); 643 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 644 645 if (!m->pParent->i_canChangeSettings()) 646 return setError(E_INVALIDARG, tr("Cannot change audio rate control mode while recording is enabled")); 647 648 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 649 650 /** @todo Implement this. */ 651 RT_NOREF(aMode); 652 653 return E_NOTIMPL; 626 654 } 627 655 … … 909 937 } 910 938 911 HRESULT RecordingScreenSettings::getVideoRateControlMode(Recording VideoRateControlMode_T *aMode)912 { 913 AutoCaller autoCaller(this); 914 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 915 916 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 917 918 *aMode = Recording VideoRateControlMode_CBR; /** @todo Implement VBR. */919 920 return S_OK; 921 } 922 923 HRESULT RecordingScreenSettings::setVideoRateControlMode(Recording VideoRateControlMode_T aMode)939 HRESULT RecordingScreenSettings::getVideoRateControlMode(RecordingRateControlMode_T *aMode) 940 { 941 AutoCaller autoCaller(this); 942 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 943 944 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 945 946 *aMode = RecordingRateControlMode_VBR; /** @todo Implement CBR. */ 947 948 return S_OK; 949 } 950 951 HRESULT RecordingScreenSettings::setVideoRateControlMode(RecordingRateControlMode_T aMode) 924 952 { 925 953 AutoCaller autoCaller(this); … … 972 1000 } 973 1001 974 HRESULT RecordingScreenSettings::getVideoScalingM ethod(RecordingVideoScalingMethod_T *aMode)975 { 976 AutoCaller autoCaller(this); 977 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 978 979 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 980 981 *aMode = RecordingVideoScalingM ethod_None; /** @todo Implement this. */982 983 return S_OK; 984 } 985 986 HRESULT RecordingScreenSettings::setVideoScalingM ethod(RecordingVideoScalingMethod_T aMode)987 { 988 AutoCaller autoCaller(this); 989 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 990 991 if (!m->pParent->i_canChangeSettings()) 992 return setError(E_INVALIDARG, tr("Cannot change video rate scaling methodwhile recording is enabled"));1002 HRESULT RecordingScreenSettings::getVideoScalingMode(RecordingVideoScalingMode_T *aMode) 1003 { 1004 AutoCaller autoCaller(this); 1005 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1006 1007 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1008 1009 *aMode = RecordingVideoScalingMode_None; /** @todo Implement this. */ 1010 1011 return S_OK; 1012 } 1013 1014 HRESULT RecordingScreenSettings::setVideoScalingMode(RecordingVideoScalingMode_T aMode) 1015 { 1016 AutoCaller autoCaller(this); 1017 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1018 1019 if (!m->pParent->i_canChangeSettings()) 1020 return setError(E_INVALIDARG, tr("Cannot change video scaling mode while recording is enabled")); 993 1021 994 1022 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); -
trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp
r95741 r96141 1601 1601 RecordingAudioCodec_WavPCM, 1602 1602 #endif 1603 #ifdef VBOX_WITH_LIBOPUS 1603 1604 RecordingAudioCodec_Opus, 1605 #endif 1606 #ifdef VBOX_WITH_LIBVORBIS 1607 RecordingAudioCodec_OggVorbis, 1608 #endif 1604 1609 }; 1605 1610 aSupportedRecordingAudioCodecs.assign(aRecordingAudioCodecs, … … 1623 1628 } 1624 1629 1625 HRESULT SystemProperties::getSupportedRecordingVSM ethods(std::vector<RecordingVideoScalingMethod_T> &aSupportedRecordingVideoScalingMethods)1626 { 1627 static const RecordingVideoScalingM ethod_T aRecordingVideoScalingMethods[] =1628 { 1629 RecordingVideoScalingM ethod_None,1630 HRESULT SystemProperties::getSupportedRecordingVSModes(std::vector<RecordingVideoScalingMode_T> &aSupportedRecordingVideoScalingModes) 1631 { 1632 static const RecordingVideoScalingMode_T aRecordingVideoScalingModes[] = 1633 { 1634 RecordingVideoScalingMode_None, 1630 1635 #ifdef DEBUG 1631 RecordingVideoScalingMethod_NearestNeighbor, 1632 RecordingVideoScalingMethod_Bilinear, 1633 RecordingVideoScalingMethod_Bicubic, 1634 #endif 1635 }; 1636 aSupportedRecordingVideoScalingMethods.assign(aRecordingVideoScalingMethods, 1637 aRecordingVideoScalingMethods + RT_ELEMENTS(aRecordingVideoScalingMethods)); 1638 return S_OK; 1639 } 1640 1641 HRESULT SystemProperties::getSupportedRecordingVRCModes(std::vector<RecordingVideoRateControlMode_T> &aSupportedRecordingVideoRateControlModes) 1642 { 1643 static const RecordingVideoRateControlMode_T aRecordingVideoRateControlModes[] = 1644 { 1645 RecordingVideoRateControlMode_CBR, 1636 RecordingVideoScalingMode_NearestNeighbor, 1637 RecordingVideoScalingMode_Bilinear, 1638 RecordingVideoScalingMode_Bicubic, 1639 #endif 1640 }; 1641 aSupportedRecordingVideoScalingModes.assign(aRecordingVideoScalingModes, 1642 aRecordingVideoScalingModes + RT_ELEMENTS(aRecordingVideoScalingModes)); 1643 return S_OK; 1644 } 1645 1646 HRESULT SystemProperties::getSupportedRecordingARCModes(std::vector<RecordingRateControlMode_T> &aSupportedRecordingAudioRateControlModes) 1647 { 1648 static const RecordingRateControlMode_T aRecordingAudioRateControlModes[] = 1649 { 1646 1650 #ifdef DEBUG 1647 RecordingVideoRateControlMode_VBR, 1648 #endif 1651 RecordingRateControlMode_ABR, 1652 RecordingRateControlMode_CBR, 1653 #endif 1654 RecordingRateControlMode_VBR 1655 }; 1656 aSupportedRecordingAudioRateControlModes.assign(aRecordingAudioRateControlModes, 1657 aRecordingAudioRateControlModes + RT_ELEMENTS(aRecordingAudioRateControlModes)); 1658 return S_OK; 1659 } 1660 1661 HRESULT SystemProperties::getSupportedRecordingVRCModes(std::vector<RecordingRateControlMode_T> &aSupportedRecordingVideoRateControlModes) 1662 { 1663 static const RecordingRateControlMode_T aRecordingVideoRateControlModes[] = 1664 { 1665 #ifdef DEBUG 1666 RecordingRateControlMode_ABR, 1667 RecordingRateControlMode_CBR, 1668 #endif 1669 RecordingRateControlMode_VBR 1649 1670 }; 1650 1671 aSupportedRecordingVideoRateControlModes.assign(aRecordingVideoRateControlModes, -
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.