Changeset 95918 in vbox for trunk/src/VBox/Main
- Timestamp:
- Jul 28, 2022 2:56:13 PM (2 years ago)
- Location:
- trunk/src/VBox/Main
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/RecordingStream.cpp
r95750 r95918 37 37 , enmState(RECORDINGSTREAMSTATE_UNINITIALIZED) 38 38 , tsStartMs(0) 39 , ScreenSettings(UINT32_MAX) 39 40 { 40 41 File.pWEBM = NULL; … … 45 46 : enmState(RECORDINGSTREAMSTATE_UNINITIALIZED) 46 47 , tsStartMs(0) 48 , ScreenSettings(uScreen) 47 49 { 48 50 File.pWEBM = NULL; -
trunk/src/VBox/Main/src-server/RecordingSettingsImpl.cpp
r95714 r95918 773 773 if (m->mapScreenObj.find(i) == m->mapScreenObj.end()) 774 774 { 775 settings::RecordingScreenSettings defaultScreenSettings ; /* Apply default settings. */775 settings::RecordingScreenSettings defaultScreenSettings(i /* Screen ID */); /* Apply default settings. */ 776 776 777 777 int vrc2 = i_createScreenObj(m->mapScreenObj, i /* Screen ID */, defaultScreenSettings); -
trunk/src/VBox/Main/xml/Settings.cpp
r95839 r95918 2769 2769 } 2770 2770 2771 RecordingScreenSettings::RecordingScreenSettings(void) 2771 RecordingScreenSettings::RecordingScreenSettings(uint32_t a_idScreen /* = UINT32_MAX */) 2772 : idScreen(a_idScreen) 2772 2773 { 2773 2774 applyDefaults(); … … 2781 2782 /** 2782 2783 * Returns the default options string for screen recording settings. 2784 * 2785 * @returns Default options string for a given screen. 2783 2786 */ 2784 2787 /* static */ … … 2846 2849 */ 2847 2850 2848 fEnabled = false; 2851 /* 2852 * Enable screen 0 by default. 2853 * Otherwise enabling recording without any screen enabled at all makes no sense. 2854 * 2855 * Note: When tweaking this, make sure to also alter RecordingScreenSettings::areDefaultSettings(). 2856 */ 2857 fEnabled = idScreen == 0 ? true : false;; 2849 2858 enmDest = RecordingDestination_File; 2850 2859 ulMaxTimeS = 0; … … 2872 2881 * 2873 2882 * @returns \c true if default, \c false if not. 2874 * @param idScreen Screen ID of screen settings to check. 2875 * Set to UINT32_MAX if not specified / optional. 2876 */ 2877 bool RecordingScreenSettings::areDefaultSettings(uint32_t idScreen /* = UINT32_MAX */) const 2883 */ 2884 bool RecordingScreenSettings::areDefaultSettings(void) const 2878 2885 { 2879 2886 return ( fEnabled == false … … 3002 3009 { 3003 3010 /* Always add screen 0 to the default configuration. */ 3004 RecordingScreenSettings screenSettings; 3005 3006 /* Make sure to enable this per default. 3007 * Otherwise enabling recording without any screen enabled at all makes no sense. 3008 * 3009 * Note: When tweaking this, make sure to also alter RecordingScreenSettings::areDefaultSettings(). */ 3010 screenSettings.fEnabled = true; 3011 3012 mapScreens[0] = screenSettings; 3011 RecordingScreenSettings screenSettings(0 /* Screen ID */); 3012 3013 mapScreens[0 /* Screen ID */] = screenSettings; 3013 3014 } 3014 3015 catch (std::bad_alloc &) … … 3031 3032 while (itScreen != mapScreens.end()) 3032 3033 { 3033 if (!itScreen->second.areDefaultSettings( itScreen->first /* Screen ID */))3034 if (!itScreen->second.areDefaultSettings()) 3034 3035 return false; 3035 3036 ++itScreen; … … 6147 6148 recording.mapScreens[i] = screen0; 6148 6149 6149 if (uScreensBitmap & RT_BIT_64(i)) /* Screen i enabled? */ 6150 recording.mapScreens[i].fEnabled = true; 6150 /* Screen i enabled? */ 6151 recording.mapScreens[i].idScreen = i; 6152 recording.mapScreens[i].fEnabled = RT_BOOL(uScreensBitmap & RT_BIT_64(i)); 6151 6153 } 6152 6154 }
Note:
See TracChangeset
for help on using the changeset viewer.