VirtualBox

Changeset 96141 in vbox


Ignore:
Timestamp:
Aug 11, 2022 3:37:19 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
152947
Message:

Recording/Main:

  • Renamed RecordingVideoScalingMethod -> RecordingVideoScalingMode (to match the other enums).
  • Renamed RecordingVideoRateControlMode -> RecordingRateControlMode, as this also can apply to audio codecs.
  • Added ABR (average bitrate) mode to RecordingRateControlMode.

IRecordingScreenSettings:

  • Added audioRateControlMode.
  • Added videoScalingMode.

ISystemProperties:

  • Renamed supportedRecordingVSMethods to supportedRecordingVSModes (to match RecordingVideoScalingMode).
  • Added supportedRecordingARCModes.

Renamed com::settings::RecordingScreenSettings.Audio.enmAudioCodec -> .enmCodec (Doppelmoppel).

More documentation.

​bugref:10275

Location:
trunk
Files:
8 edited

Legend:

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

    r96134 r96141  
    680680    {
    681681        /** The audio codec type to use. */
    682         RecordingAudioCodec_T    enmAudioCodec; // requires settings version 1.19 (VirtualBox 7.0)
     682        RecordingAudioCodec_T    enmCodec;      // requires settings version 1.19 (VirtualBox 7.0)
    683683        /** Codec deadline to use. */
    684684        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)
    685688        /** Hz rate. */
    686689        uint16_t                 uHz;           // requires settings version 1.19 (VirtualBox 7.0)
     
    700703        /** Codec deadline to use. */
    701704        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)
    702711        /** Target frame width in pixels (X). */
    703             uint32_t             ulWidth;     // requires settings version 1.14 (VirtualBox 4.3)
     712        uint32_t                 ulWidth;     // requires settings version 1.14 (VirtualBox 4.3)
    704713        /** Target frame height in pixels (Y). */
    705714        uint32_t                 ulHeight;    // requires settings version 1.14 (VirtualBox 4.3)
  • trunk/src/VBox/Main/idl/VirtualBox.xidl

    r95748 r96141  
    58695869
    58705870  <enum
    5871     name="RecordingVideoScalingMethod"
    5872     uuid="5576D890-48EE-449A-A81B-B776233598B7"
     5871    name="RecordingVideoScalingMode"
     5872    uuid="0dd1127d-4f62-4b82-beee-91086a9f1d24"
    58735873    >
    58745874    <desc>
     
    58775877
    58785878    <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>
    58805881    </const>
    58815882    <const name="NearestNeighbor"       value="1">
     
    58945895
    58955896  <enum
    5896     name="RecordingVideoRateControlMode"
    5897     uuid="D4EFB692-9F98-4112-88D3-A16FBE2BF6A8"
     5897    name="RecordingRateControlMode"
     5898    uuid="d07a33ac-b4ea-4917-942d-c03be14fbe2f"
    58985899    >
    58995900    <desc>
    59005901      Recording video rate control mode enumeration.
     5902      <note>Not all codecs may support all rate control modes.</note>
    59015903    </desc>
    59025904
    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>
    59085913    </const>
    59095914  </enum>
     
    59115916  <interface
    59125917    name="IRecordingScreenSettings" extends="$unknown"
    5913     uuid="92eb5328-c0b3-4ad2-ae25-75b12c52871f"
     5918    uuid="2377f7d2-1971-40ff-8e39-e61089bb3a22"
    59145919    wsmap="managed"
    59155920    rest="managed"
     
    60306035    </attribute>
    60316036
     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
    60326044    <attribute name="audioDeadline" type="RecordingCodecDeadline" default="Default">
    60336045      <desc>
     
    61006112    </attribute>
    61016113
    6102     <attribute name="videoRateControlMode" type="RecordingVideoRateControlMode">
    6103       <desc>
    6104         Determines the rate control mode. This setting cannot be changed
     6114    <attribute name="videoRateControlMode" type="RecordingRateControlMode">
     6115      <desc>
     6116        Determines the video rate control mode. This setting cannot be changed
    61056117        while recording is enabled.
    61066118      </desc>
     
    61166128    </attribute>
    61176129
    6118     <attribute name="videoScalingMethod" type="RecordingVideoScalingMethod">
    6119       <desc>
    6120         Determines the video scaling method to use.
     6130    <attribute name="videoScalingMode" type="RecordingVideoScalingMode">
     6131      <desc>
     6132        Determines the video scaling mode to use.
    61216133        This setting cannot be changed while recording is enabled.
    61226134      </desc>
     
    1239212404    name="ISystemProperties"
    1239312405    extends="$unknown"
    12394     uuid="3624830f-4ac4-404f-bc58-cf20ed8836b0"
     12406    uuid="068decf8-335d-4ec5-8265-ccfd910c4f9d"
    1239512407    wsmap="managed"
    1239612408    rest="managed"
     
    1282912841    </attribute>
    1283012842
    12831     <attribute name="supportedRecordingVSMethods" type="RecordingVideoScalingMethod" safearray="yes" readonly="yes">
    12832       <desc>
    12833         Returns an array of officially supported values for enum <link to="RecordingVideoScalingMethod"/>,
     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"/>,
    1283412846        in the sense of what is e.g. worth offering in the VirtualBox GUI.
    1283512847      </desc>
    1283612848    </attribute>
    1283712849
    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"/>,
    1284112860        in the sense of what is e.g. worth offering in the VirtualBox GUI.
    1284212861      </desc>
  • trunk/src/VBox/Main/include/RecordingScreenSettingsImpl.h

    r95741 r96141  
    9191    HRESULT getAudioDeadline(RecordingCodecDeadline_T *aDeadline);
    9292    HRESULT setAudioDeadline(RecordingCodecDeadline_T aDeadline);
     93    HRESULT getAudioRateControlMode(RecordingRateControlMode_T *aMode);
     94    HRESULT setAudioRateControlMode(RecordingRateControlMode_T aMode);
    9395    HRESULT getAudioHz(ULONG *aHz);
    9496    HRESULT setAudioHz(ULONG aHz);
     
    108110    HRESULT getVideoRate(ULONG *aVideoRate);
    109111    HRESULT setVideoRate(ULONG aVideoRate);
    110     HRESULT getVideoRateControlMode(RecordingVideoRateControlMode_T *aMode);
    111     HRESULT setVideoRateControlMode(RecordingVideoRateControlMode_T aMode);
     112    HRESULT getVideoRateControlMode(RecordingRateControlMode_T *aMode);
     113    HRESULT setVideoRateControlMode(RecordingRateControlMode_T aMode);
    112114    HRESULT getVideoFPS(ULONG *aVideoFPS);
    113115    HRESULT setVideoFPS(ULONG aVideoFPS);
    114     HRESULT getVideoScalingMethod(RecordingVideoScalingMethod_T *aMode);
    115     HRESULT setVideoScalingMethod(RecordingVideoScalingMethod_T aMode);
     116    HRESULT getVideoScalingMode(RecordingVideoScalingMode_T *aMode);
     117    HRESULT setVideoScalingMode(RecordingVideoScalingMode_T aMode);
    116118
    117119private:
  • trunk/src/VBox/Main/include/SystemPropertiesImpl.h

    r95741 r96141  
    129129    HRESULT getSupportedRecordingAudioCodecs(std::vector<RecordingAudioCodec_T> &aSupportedRecordingAudioCodecs) RT_OVERRIDE;
    130130    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;
    133134    HRESULT getSupportedGraphicsControllerTypes(std::vector<GraphicsControllerType_T> &aSupportedGraphicsControllerTypes) RT_OVERRIDE;
    134135    HRESULT getSupportedCloneOptions(std::vector<CloneOptions_T> &aSupportedCloneOptions) RT_OVERRIDE;
  • trunk/src/VBox/Main/src-client/ConsoleImpl.cpp

    r96137 r96141  
    73017301        AssertComRCReturn(hrc, VERR_INVALID_PARAMETER);
    73027302        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);
    73037317        hrc = pRecScreenSettings->COMGETTER(VideoWidth)((ULONG *)&recScreenSettings.Video.ulWidth);
    73047318        AssertComRCReturn(hrc, VERR_INVALID_PARAMETER);
    73057319        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);
    73067326        AssertComRCReturn(hrc, VERR_INVALID_PARAMETER);
    73077327        hrc = pRecScreenSettings->COMGETTER(VideoRate)((ULONG *)&recScreenSettings.Video.ulRate);
  • trunk/src/VBox/Main/src-server/RecordingScreenSettingsImpl.cpp

    r95741 r96141  
    560560    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
    561561
    562     *aCodec = m->bd->Audio.enmAudioCodec;
     562    *aCodec = m->bd->Audio.enmCodec;
    563563
    564564    return S_OK;
     
    578578    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
    579579
    580     if (m->bd->Audio.enmAudioCodec != aCodec)
    581     {
    582         m->bd.backup();
    583         m->bd->Audio.enmAudioCodec = aCodec;
     580    if (m->bd->Audio.enmCodec != aCodec)
     581    {
     582        m->bd.backup();
     583        m->bd->Audio.enmCodec = aCodec;
    584584
    585585        alock.release();
     
    624624
    625625    return S_OK;
     626}
     627
     628HRESULT 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
     640HRESULT 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;
    626654}
    627655
     
    909937}
    910938
    911 HRESULT RecordingScreenSettings::getVideoRateControlMode(RecordingVideoRateControlMode_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 = RecordingVideoRateControlMode_CBR; /** @todo Implement VBR. */
    919 
    920     return S_OK;
    921 }
    922 
    923 HRESULT RecordingScreenSettings::setVideoRateControlMode(RecordingVideoRateControlMode_T aMode)
     939HRESULT 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
     951HRESULT RecordingScreenSettings::setVideoRateControlMode(RecordingRateControlMode_T aMode)
    924952{
    925953    AutoCaller autoCaller(this);
     
    9721000}
    9731001
    974 HRESULT RecordingScreenSettings::getVideoScalingMethod(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 = RecordingVideoScalingMethod_None; /** @todo Implement this. */
    982 
    983     return S_OK;
    984 }
    985 
    986 HRESULT RecordingScreenSettings::setVideoScalingMethod(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 method while recording is enabled"));
     1002HRESULT 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
     1014HRESULT 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"));
    9931021
    9941022    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
  • trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp

    r95741 r96141  
    16011601        RecordingAudioCodec_WavPCM,
    16021602#endif
     1603#ifdef VBOX_WITH_LIBOPUS
    16031604        RecordingAudioCodec_Opus,
     1605#endif
     1606#ifdef VBOX_WITH_LIBVORBIS
     1607        RecordingAudioCodec_OggVorbis,
     1608#endif
    16041609    };
    16051610    aSupportedRecordingAudioCodecs.assign(aRecordingAudioCodecs,
     
    16231628}
    16241629
    1625 HRESULT SystemProperties::getSupportedRecordingVSMethods(std::vector<RecordingVideoScalingMethod_T> &aSupportedRecordingVideoScalingMethods)
    1626 {
    1627     static const RecordingVideoScalingMethod_T aRecordingVideoScalingMethods[] =
    1628     {
    1629         RecordingVideoScalingMethod_None,
     1630HRESULT SystemProperties::getSupportedRecordingVSModes(std::vector<RecordingVideoScalingMode_T> &aSupportedRecordingVideoScalingModes)
     1631{
     1632    static const RecordingVideoScalingMode_T aRecordingVideoScalingModes[] =
     1633    {
     1634        RecordingVideoScalingMode_None,
    16301635#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
     1646HRESULT SystemProperties::getSupportedRecordingARCModes(std::vector<RecordingRateControlMode_T> &aSupportedRecordingAudioRateControlModes)
     1647{
     1648    static const RecordingRateControlMode_T aRecordingAudioRateControlModes[] =
     1649    {
    16461650#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
     1661HRESULT 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
    16491670    };
    16501671    aSupportedRecordingVideoRateControlModes.assign(aRecordingVideoRateControlModes,
  • trunk/src/VBox/Main/xml/Settings.cpp

    r96134 r96141  
    30193019    Video.enmCodec       = RecordingVideoCodec_VP8;
    30203020    Video.enmDeadline    = RecordingCodecDeadline_Default;
     3021    Video.enmRateCtlMode = RecordingRateControlMode_VBR;
     3022    Video.enmScalingMode = RecordingVideoScalingMode_None;
    30213023    Video.ulWidth        = 1024;
    30223024    Video.ulHeight       = 768;
    30233025    Video.ulRate         = 512;
    30243026    Video.ulFPS          = 25;
    3025     Audio.enmAudioCodec  = RecordingAudioCodec_Opus;
     3027    Audio.enmCodec       = RecordingAudioCodec_Opus;
    30263028    Audio.enmDeadline    = RecordingCodecDeadline_Default;
     3029    Audio.enmRateCtlMode = RecordingRateControlMode_VBR;
    30273030    Audio.cBits          = 16;
    30283031    Audio.cChannels      = 2;
     
    30523055           && Video.enmCodec                                  == RecordingVideoCodec_VP8
    30533056           && Video.enmDeadline                               == RecordingCodecDeadline_Default
     3057           && Video.enmRateCtlMode                            == RecordingRateControlMode_VBR
     3058           && Video.enmScalingMode                            == RecordingVideoScalingMode_None
    30543059           && Video.ulWidth                                   == 1024
    30553060           && Video.ulHeight                                  == 768
    30563061           && Video.ulRate                                    == 512
    30573062           && Video.ulFPS                                     == 25
    3058            && Audio.enmAudioCodec                             == RecordingAudioCodec_Opus
     3063           && Audio.enmCodec                                  == RecordingAudioCodec_Opus
    30593064           && Audio.enmDeadline                               == RecordingCodecDeadline_Default
     3065           && Audio.enmRateCtlMode                            == RecordingRateControlMode_VBR
    30603066           && Audio.cBits                                     == 16
    30613067           && Audio.cChannels                                 == 2
     
    31003106           && Video.ulRate        == d.Video.ulRate
    31013107           && Video.ulFPS         == d.Video.ulFPS
    3102            && Audio.enmAudioCodec == d.Audio.enmAudioCodec
     3108           && Audio.enmCodec      == d.Audio.enmCodec
    31033109           && Audio.enmDeadline   == d.Audio.enmDeadline
    31043110           && Audio.cBits         == d.Audio.cBits
     
    62526258
    62536259            (*itScreen)->getAttributeValue("enabled",   screenSettings.fEnabled);
    6254             Utf8Str strFeatures;
    6255             (*itScreen)->getAttributeValue("featuresEnabled", strFeatures);
    6256             RecordingScreenSettings::featuresFromString(strFeatures, screenSettings.featureMap);
     6260            Utf8Str strTemp;
     6261            (*itScreen)->getAttributeValue("featuresEnabled", strTemp);
     6262            RecordingScreenSettings::featuresFromString(strTemp, screenSettings.featureMap);
    62576263            (*itScreen)->getAttributeValue("maxTimeS",  screenSettings.ulMaxTimeS);
    62586264            (*itScreen)->getAttributeValue("options",   screenSettings.strOptions);
     
    62646270                                      N_("Not supported Recording/@dest attribute '%#x'"), screenSettings.enmDest);
    62656271            (*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);
    62676275            (*itScreen)->getAttributeValue("videoDeadline", (uint32_t &)screenSettings.Video.enmDeadline);
    62686276            (*itScreen)->getAttributeValue("horzRes",       screenSettings.Video.ulWidth);
     
    62716279            (*itScreen)->getAttributeValue("fps",           screenSettings.Video.ulFPS);
    62726280
     6281            if ((*itScreen)->getAttributeValue("audioCodec", strTemp)) /* Stick with default if not set. */
     6282                RecordingScreenSettings::audioCodecFromString(strTemp, screenSettings.Audio.enmCodec);
    62736283            (*itScreen)->getAttributeValue("audioDeadline", (uint32_t &)screenSettings.Audio.enmDeadline);
    62746284            (*itScreen)->getAttributeValue("audioHz",       (uint32_t &)screenSettings.Audio.uHz);
     
    82868296        xml::ElementNode *pelmRecording = elmParent.createChild("Recording");
    82878297
    8288         if (recordingSettings.common.fEnabled)
     8298        if (!recordingSettings.common.areDefaultSettings())
     8299        {
    82898300            pelmRecording->setAttribute("enabled", recording.common.fEnabled);
     8301        }
    82908302
    82918303        /* Only serialize screens which have non-default settings. */
     
    83128324                pelmScreen->setAttribute("id",                  itScreen->first); /* The key equals the monitor ID. */
    83138325                pelmScreen->setAttribute("enabled",             itScreen->second.fEnabled);
    8314                 com::Utf8Str strFeatures;
    8315                 RecordingScreenSettings::featuresToString(itScreen->second.featureMap, strFeatures);
    8316                 pelmScreen->setAttribute("featuresEnabled",     strFeatures);
     8326                com::Utf8Str strTemp;
     8327                RecordingScreenSettings::featuresToString(itScreen->second.featureMap, strTemp);
     8328                pelmScreen->setAttribute("featuresEnabled",     strTemp);
    83178329                if (itScreen->second.ulMaxTimeS)
    83188330                    pelmScreen->setAttribute("maxTimeS",        itScreen->second.ulMaxTimeS);
     
    83258337                    pelmScreen->setAttribute("maxSizeMB",       itScreen->second.File.ulMaxSizeMB);
    83268338
     8339                RecordingScreenSettings::videoCodecToString(itScreen->second.Video.enmCodec, strTemp);
     8340                pelmScreen->setAttribute("videoCodec",          strTemp);
    83278341                if (itScreen->second.Video.enmDeadline != RecordingCodecDeadline_Default)
    83288342                    pelmScreen->setAttribute("videoDeadline",   itScreen->second.Video.enmDeadline);
     8343                if (itScreen->second.Video.enmScalingMode != RecordingVideoScalingMode_None)
     8344                    pelmScreen->setAttribute("videoScalingMode",itScreen->second.Video.enmScalingMode);
    83298345                if (   itScreen->second.Video.ulWidth  != 1024
    83308346                    || itScreen->second.Video.ulHeight != 768)
     
    83388354                    pelmScreen->setAttribute("fps",             itScreen->second.Video.ulFPS);
    83398355
     8356                RecordingScreenSettings::audioCodecToString(itScreen->second.Audio.enmCodec, strTemp);
     8357                pelmScreen->setAttribute("audioCodec",          strTemp);
    83408358                if (itScreen->second.Audio.enmDeadline != RecordingCodecDeadline_Default)
    83418359                    pelmScreen->setAttribute("audioDeadline",   itScreen->second.Audio.enmDeadline);
     
    83568374        xml::ElementNode *pelmVideoCapture = elmParent.createChild("VideoCapture");
    83578375
    8358         if (recording.common.fEnabled)
     8376        if (!recordingSettings.common.areDefaultSettings())
     8377        {
    83598378            pelmVideoCapture->setAttribute("enabled", recording.common.fEnabled);
     8379        }
    83608380
    83618381        /* Convert the enabled screens to the former uint64_t bit array and vice versa. */
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