VirtualBox

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


Ignore:
Timestamp:
Jul 20, 2022 9:30:30 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
152447
Message:

Main/Recording: Added ISystemProperties::getRecordingFeatures to allow clients querying for enabled recording features at runtime. Also added IRecordingScreenSettings::videoDeadline + audioDeadline attributes to allow specifying the video/audio codec's (encoding) deadlines. bugref:10244

Location:
trunk/src/VBox/Main/src-server
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/RecordingScreenSettingsImpl.cpp

    r95718 r95741  
    591591}
    592592
     593HRESULT RecordingScreenSettings::getAudioDeadline(RecordingCodecDeadline_T *aDeadline)
     594{
     595    AutoCaller autoCaller(this);
     596    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     597
     598    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     599
     600    *aDeadline = m->bd->Audio.enmDeadline;
     601
     602    return S_OK;
     603}
     604
     605HRESULT RecordingScreenSettings::setAudioDeadline(RecordingCodecDeadline_T aDeadline)
     606{
     607    AutoCaller autoCaller(this);
     608    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     609
     610    if (!m->pParent->i_canChangeSettings())
     611        return setError(E_INVALIDARG, tr("Cannot change audio deadline while recording is enabled"));
     612
     613    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     614
     615    if (m->bd->Audio.enmDeadline != aDeadline)
     616    {
     617        m->bd.backup();
     618        m->bd->Audio.enmDeadline = aDeadline;
     619
     620        alock.release();
     621
     622        m->pParent->i_onSettingsChanged();
     623    }
     624
     625    return S_OK;
     626}
     627
    593628HRESULT RecordingScreenSettings::getAudioHz(ULONG *aHz)
    594629{
     
    725760        m->bd.backup();
    726761        m->bd->Video.enmCodec = aCodec;
     762
     763        alock.release();
     764
     765        m->pParent->i_onSettingsChanged();
     766    }
     767
     768    return S_OK;
     769}
     770
     771HRESULT RecordingScreenSettings::getVideoDeadline(RecordingCodecDeadline_T *aDeadline)
     772{
     773    AutoCaller autoCaller(this);
     774    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     775
     776    AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS);
     777
     778    *aDeadline = m->bd->Video.enmDeadline;
     779
     780    return S_OK;
     781}
     782
     783HRESULT RecordingScreenSettings::setVideoDeadline(RecordingCodecDeadline_T aDeadline)
     784{
     785    AutoCaller autoCaller(this);
     786    if (FAILED(autoCaller.rc())) return autoCaller.rc();
     787
     788    if (!m->pParent->i_canChangeSettings())
     789        return setError(E_INVALIDARG, tr("Cannot change video deadline while recording is enabled"));
     790
     791    AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
     792
     793    if (m->bd->Video.enmDeadline != aDeadline)
     794    {
     795        m->bd.backup();
     796        m->bd->Video.enmDeadline = aDeadline;
    727797
    728798        alock.release();
  • trunk/src/VBox/Main/src-server/SystemPropertiesImpl.cpp

    r95395 r95741  
    15761576}
    15771577
     1578HRESULT SystemProperties::getSupportedRecordingFeatures(std::vector<RecordingFeature_T> &aSupportedRecordingFeatures)
     1579{
     1580#ifdef VBOX_WITH_RECORDING
     1581    static const RecordingFeature_T aRecordingFeatures[] =
     1582    {
     1583# ifdef VBOX_WITH_AUDIO_RECORDING
     1584        RecordingFeature_Audio,
     1585# endif
     1586        RecordingFeature_Video,
     1587    };
     1588    aSupportedRecordingFeatures.assign(aRecordingFeatures,
     1589                                       aRecordingFeatures + RT_ELEMENTS(aRecordingFeatures));
     1590#else  /* !VBOX_WITH_RECORDING */
     1591    aSupportedRecordingFeatures.clear();
     1592#endif /* VBOX_WITH_RECORDING */
     1593    return S_OK;
     1594}
     1595
    15781596HRESULT SystemProperties::getSupportedRecordingAudioCodecs(std::vector<RecordingAudioCodec_T> &aSupportedRecordingAudioCodecs)
    15791597{
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