Changeset 95639 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Jul 14, 2022 8:30:45 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 152283
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageInfo.cpp
r95423 r95639 2824 2824 #ifdef VBOX_WITH_RECORDING 2825 2825 { 2826 /* Video capture */ 2827 BOOL fCaptureVideo = FALSE; 2826 BOOL fRecordVideo = FALSE; 2828 2827 # ifdef VBOX_WITH_AUDIO_RECORDING 2829 BOOL f CaptureAudio = FALSE;2828 BOOL fRecordAudio = FALSE; 2830 2829 # endif 2831 2830 … … 2833 2832 CHECK_ERROR_RET(machine, COMGETTER(RecordingSettings)(recordingSettings.asOutParam()), hrc); 2834 2833 2835 SafeIfaceArray <IRecordingScreenSettings> saRecordingScreenScreens; 2836 CHECK_ERROR_RET(recordingSettings, COMGETTER(Screens)(ComSafeArrayAsOutParam(saRecordingScreenScreens)), hrc); 2837 2838 /* For now all screens have the same configuration; so take screen 0 and work with that. */ 2839 ULONG fFeatures; 2840 CHECK_ERROR_RET(saRecordingScreenScreens[0], COMGETTER(Features)(&fFeatures), hrc); 2841 ULONG Width; 2842 CHECK_ERROR_RET(saRecordingScreenScreens[0], COMGETTER(VideoWidth)(&Width), hrc); 2843 ULONG Height; 2844 CHECK_ERROR_RET(saRecordingScreenScreens[0], COMGETTER(VideoHeight)(&Height), hrc); 2845 ULONG Rate; 2846 CHECK_ERROR_RET(saRecordingScreenScreens[0], COMGETTER(VideoRate)(&Rate), hrc); 2847 ULONG Fps; 2848 CHECK_ERROR_RET(saRecordingScreenScreens[0], COMGETTER(VideoFPS)(&Fps), hrc); 2849 Bstr bstrFile; 2850 CHECK_ERROR_RET(saRecordingScreenScreens[0], COMGETTER(Filename)(bstrFile.asOutParam()), hrc); 2851 Bstr bstrOptions; 2852 CHECK_ERROR_RET(saRecordingScreenScreens[0], COMGETTER(Options)(bstrOptions.asOutParam()), hrc); 2853 2854 Utf8Str strOptions(bstrOptions); 2855 size_t pos = 0; 2856 com::Utf8Str key, value; 2857 while ((pos = strOptions.parseKeyValue(key, value, pos)) != com::Utf8Str::npos) 2858 { 2859 if (key.compare("vc_enabled", Utf8Str::CaseInsensitive) == 0) 2860 { 2861 fCaptureVideo = value.compare("true", Utf8Str::CaseInsensitive) == 0; 2862 } 2863 else if (key.compare("ac_enabled", Utf8Str::CaseInsensitive) == 0) 2864 { 2834 BOOL fEnabled; 2835 CHECK_ERROR_RET(recordingSettings, COMGETTER(Enabled)(&fEnabled), hrc); 2836 SHOW_BOOL_VALUE_EX("recording_enabled", Info::tr("Recording enabled:"), fEnabled, Info::tr("yes"), Info::tr("no")); 2837 2838 SafeIfaceArray <IRecordingScreenSettings> saScreenSettings; 2839 CHECK_ERROR_RET(recordingSettings, COMGETTER(Screens)(ComSafeArrayAsOutParam(saScreenSettings)), hrc); 2840 2841 SHOW_ULONG_VALUE("recording_screens", Info::tr("Recording screens:"), saScreenSettings.size(), ""); 2842 2843 for (size_t i = 0; i < saScreenSettings.size(); ++i) 2844 { 2845 ComPtr<IRecordingScreenSettings> screenSettings = saScreenSettings[i]; 2846 2847 FmtNm(szNm, details == VMINFO_MACHINEREADABLE ? "rec_screen%zu" : Info::tr("Screen %u:"), i); 2848 RTPrintf(Info::tr(" %s\n"), szNm); 2849 2850 CHECK_ERROR_RET(screenSettings, COMGETTER(Enabled)(&fEnabled), hrc); 2851 ULONG idScreen; 2852 CHECK_ERROR_RET(screenSettings, COMGETTER(Id)(&idScreen), hrc); 2853 ULONG fFeatures; 2854 CHECK_ERROR_RET(screenSettings, COMGETTER(Features)(&fFeatures), hrc); 2855 ULONG Width; 2856 CHECK_ERROR_RET(screenSettings, COMGETTER(VideoWidth)(&Width), hrc); 2857 ULONG Height; 2858 CHECK_ERROR_RET(screenSettings, COMGETTER(VideoHeight)(&Height), hrc); 2859 ULONG Rate; 2860 CHECK_ERROR_RET(screenSettings, COMGETTER(VideoRate)(&Rate), hrc); 2861 ULONG Fps; 2862 CHECK_ERROR_RET(screenSettings, COMGETTER(VideoFPS)(&Fps), hrc); 2863 RecordingDestination_T enmDst; 2864 CHECK_ERROR_RET(screenSettings, COMGETTER(Destination)(&enmDst), hrc); 2865 Bstr bstrFile; 2866 CHECK_ERROR_RET(screenSettings, COMGETTER(Filename)(bstrFile.asOutParam()), hrc); 2867 Bstr bstrOptions; 2868 CHECK_ERROR_RET(screenSettings, COMGETTER(Options)(bstrOptions.asOutParam()), hrc); 2869 2870 Utf8Str strOptions(bstrOptions); 2871 size_t pos = 0; 2872 com::Utf8Str key, value; 2873 while ((pos = strOptions.parseKeyValue(key, value, pos)) != com::Utf8Str::npos) 2874 { 2875 if (key.compare("vc_enabled", Utf8Str::CaseInsensitive) == 0) 2876 { 2877 fRecordVideo = value.compare("true", Utf8Str::CaseInsensitive) == 0; 2878 } 2879 else if (key.compare("ac_enabled", Utf8Str::CaseInsensitive) == 0) 2880 { 2865 2881 # ifdef VBOX_WITH_AUDIO_RECORDING 2866 fCaptureAudio = value.compare("true", Utf8Str::CaseInsensitive) == 0;2882 fRecordAudio = value.compare("true", Utf8Str::CaseInsensitive) == 0; 2867 2883 # endif 2868 } 2869 } 2870 2871 SHOW_BOOL_VALUE_EX("videocap", Info::tr("Capturing:"), fCaptureVideo, Info::tr("active"), Info::tr("not active")); 2884 } 2885 } 2886 2887 SHOW_BOOL_VALUE_EX("rec_screen_enabled", Info::tr(" Enabled:"), fEnabled, 2888 Info::tr("yes"), Info::tr("no")); 2889 SHOW_ULONG_VALUE ("rec_screen_id", Info::tr(" ID:"), idScreen, ""); 2890 SHOW_BOOL_VALUE_EX("rec_screen_video_enabled", Info::tr(" Record video:"), fRecordVideo, 2891 Info::tr("yes"), Info::tr("no")); 2872 2892 # ifdef VBOX_WITH_AUDIO_RECORDING 2873 SHOW_BOOL_VALUE_EX("videocapaudio", Info::tr("Capture audio:"), fCaptureAudio, Info::tr("active"), Info::tr("not active")); 2893 SHOW_BOOL_VALUE_EX("rec_screen_audio_enabled", Info::tr(" Record audio:"), fRecordAudio, 2894 Info::tr("yes"), Info::tr("no")); 2874 2895 # endif 2875 szValue[0] = '\0';2876 for (size_t i = 0, off = 0; i < saRecordingScreenScreens.size(); i++)2877 {2878 BOOL fEnabled;2879 CHECK_ERROR_RET(saRecordingScreenScreens[i], COMGETTER(Enabled)(&fEnabled), hrc);2880 if (fEnabled && off < sizeof(szValue) - 3)2881 off += RTStrPrintf(&szValue[off], sizeof(szValue) - off, off ? ",%zu" : "%zu", i); 2882 }2883 SHOW_UTF8_STRING("capturescreens", Info::tr("Capture screens:"), szValue); 2884 SHOW_BSTR_STRING("capturefilename", Info::tr("Capture file:"), bstrFile);2885 RTStrPrintf(szValue, sizeof(szValue), "%ux%u", Width, Height);2886 SHOW_UTF8_STRING("captureres", Info::tr("Capturedimensions:"), szValue);2887 SHOW_ULONG_VALUE("capturevideorate", Info::tr("Capturerate:"), Rate, Info::tr("kbps"));2888 SHOW_ULONG_VALUE("capturevideofps", Info::tr("Capture FPS:"), Fps, Info::tr("kbps"));2889 SHOW_BSTR_STRING("captureopts", Info::tr("Capture options:"), bstrOptions); 2890 2891 /** @todo Add more audio capturing profile / information here. */2896 SHOW_UTF8_STRING("rec_screen_dest", Info::tr(" Destination:"), 2897 enmDst == RecordingDestination_File 2898 ? Info::tr("File") : Info::tr("Unknown")); 2899 /** @todo Implement other destinations. */ 2900 if (enmDst == RecordingDestination_File) 2901 SHOW_BSTR_STRING("rec_screen_dest_filename", Info::tr(" File:"), bstrFile); 2902 2903 SHOW_BSTR_STRING ("rec_screen_opts", Info::tr(" Options:"), bstrOptions); 2904 2905 /* Video properties. */ 2906 RTStrPrintf(szValue, sizeof(szValue), "%ux%u", Width, Height); 2907 SHOW_UTF8_STRING ("rec_screen_video_res_xy", Info::tr(" Video dimensions:"), szValue); 2908 SHOW_ULONG_VALUE ("rec_screen_video_rate_kbps", Info::tr(" Video rate:"), Rate, Info::tr("kbps")); 2909 SHOW_ULONG_VALUE ("rec_screen_video_fps", Info::tr(" Video FPS:"), Fps, Info::tr("fps")); 2910 2911 /** @todo Add more audio capturing profile / information here. */ 2912 } 2892 2913 } 2893 2914 #endif /* VBOX_WITH_RECORDING */
Note:
See TracChangeset
for help on using the changeset viewer.