VirtualBox

Ignore:
Timestamp:
Aug 12, 2022 1:27:46 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
152980
Message:

Recording/Main: Changed IRecordingScreenSettings::features attribute to get/set a safe array of RecordingFeature entries instead of an anonymous ULONG. Makes it much easier to use. bugref:10275

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp

    r96171 r96172  
    28462846            ULONG idScreen;
    28472847            CHECK_ERROR_RET(screenSettings, COMGETTER(Id)(&idScreen), hrc);
    2848             ULONG fFeatures;
    2849             CHECK_ERROR_RET(screenSettings, COMGETTER(Features)(&fFeatures), hrc);
     2848            com::SafeArray<RecordingFeature_T> vecFeatures;
     2849            CHECK_ERROR_RET(screenSettings, COMGETTER(Features)(ComSafeArrayAsOutParam(vecFeatures)), hrc);
    28502850            ULONG Width;
    28512851            CHECK_ERROR_RET(screenSettings, COMGETTER(VideoWidth)(&Width), hrc);
     
    28672867            BOOL fRecordAudio = FALSE;
    28682868# endif
    2869             Utf8Str strOptions(bstrOptions);
    2870             size_t pos = 0;
    2871             com::Utf8Str key, value;
    2872             while ((pos = strOptions.parseKeyValue(key, value, pos)) != com::Utf8Str::npos)
    2873             {
    2874                 if (key.compare("vc_enabled", Utf8Str::CaseInsensitive) == 0)
    2875                 {
    2876                     fRecordVideo = value.compare("true", Utf8Str::CaseInsensitive) == 0;
    2877                 }
    2878                 else if (key.compare("ac_enabled", Utf8Str::CaseInsensitive) == 0)
    2879                 {
    2880 # ifdef VBOX_WITH_AUDIO_RECORDING
    2881                     fRecordAudio = value.compare("true", Utf8Str::CaseInsensitive) == 0;
    2882 # endif
    2883                 }
     2869            for (size_t f = 0; f < vecFeatures.size(); ++f)
     2870            {
     2871                if (vecFeatures[f] == RecordingFeature_Audio)
     2872                    fRecordAudio = TRUE;
     2873                else if (vecFeatures[f] == RecordingFeature_Video)
     2874                    fRecordVideo = TRUE;
    28842875            }
    28852876
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