VirtualBox

Changeset 96141 in vbox for trunk/src/VBox/Main/src-server


Ignore:
Timestamp:
Aug 11, 2022 3:37:19 PM (2 years ago)
Author:
vboxsync
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/src/VBox/Main/src-server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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,
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