Changeset 75291 in vbox for trunk/src/VBox
- Timestamp:
- Nov 6, 2018 3:03:21 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
r75251 r75291 609 609 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_GuestAutoresize: strResult = "GuestAutoresize"; break; 610 610 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_TakeScreenshot: strResult = "TakeScreenshot"; break; 611 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_ VideoCapture:strResult = "VideoCapture"; break;612 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_ VideoCaptureSettings:strResult = "VideoCaptureSettings"; break;613 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_Start VideoCapture:strResult = "StartVideoCapture"; break;611 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_Recording: strResult = "VideoCapture"; break; 612 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_RecordingSettings: strResult = "VideoCaptureSettings"; break; 613 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_StartRecording: strResult = "StartVideoCapture"; break; 614 614 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_VRDEServer: strResult = "VRDEServer"; break; 615 615 case UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBar: strResult = "MenuBar"; break; … … 649 649 keys << "GuestAutoresize"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_GuestAutoresize; 650 650 keys << "TakeScreenshot"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_TakeScreenshot; 651 keys << "VideoCapture"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_ VideoCapture;652 keys << "VideoCaptureSettings"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_ VideoCaptureSettings;653 keys << "StartVideoCapture"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_Start VideoCapture;651 keys << "VideoCapture"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_Recording; 652 keys << "VideoCaptureSettings"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_RecordingSettings; 653 keys << "StartVideoCapture"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_StartRecording; 654 654 keys << "VRDEServer"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_VRDEServer; 655 655 keys << "MenuBar"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBar; … … 1403 1403 case IndicatorType_SharedFolders: strResult = "SharedFolders"; break; 1404 1404 case IndicatorType_Display: strResult = "Display"; break; 1405 case IndicatorType_ Capture:strResult = "VideoCapture"; break;1405 case IndicatorType_Recording: strResult = "VideoCapture"; break; 1406 1406 case IndicatorType_Features: strResult = "Features"; break; 1407 1407 case IndicatorType_Mouse: strResult = "Mouse"; break; … … 1430 1430 keys << "SharedFolders"; values << IndicatorType_SharedFolders; 1431 1431 keys << "Display"; values << IndicatorType_Display; 1432 keys << "VideoCapture"; values << IndicatorType_ Capture;1432 keys << "VideoCapture"; values << IndicatorType_Recording; 1433 1433 keys << "Features"; values << IndicatorType_Features; 1434 1434 keys << "Mouse"; values << IndicatorType_Mouse; … … 1455 1455 case IndicatorType_SharedFolders: strResult = QApplication::translate("VBoxGlobal", "Shared Folders", "IndicatorType"); break; 1456 1456 case IndicatorType_Display: strResult = QApplication::translate("VBoxGlobal", "Display", "IndicatorType"); break; 1457 case IndicatorType_ Capture:strResult = QApplication::translate("VBoxGlobal", "Video Capture", "IndicatorType"); break;1457 case IndicatorType_Recording: strResult = QApplication::translate("VBoxGlobal", "Video Capture", "IndicatorType"); break; 1458 1458 case IndicatorType_Features: strResult = QApplication::translate("VBoxGlobal", "Features", "IndicatorType"); break; 1459 1459 case IndicatorType_Mouse: strResult = QApplication::translate("VBoxGlobal", "Mouse", "IndicatorType"); break; … … 1481 1481 case IndicatorType_SharedFolders: return UIIconPool::iconSet(":/sf_16px.png"); 1482 1482 case IndicatorType_Display: return UIIconPool::iconSet(":/display_software_16px.png"); 1483 case IndicatorType_ Capture:return UIIconPool::iconSet(":/video_capture_16px.png");1483 case IndicatorType_Recording: return UIIconPool::iconSet(":/video_capture_16px.png"); 1484 1484 case IndicatorType_Features: return UIIconPool::iconSet(":/vtx_amdv_16px.png"); 1485 1485 case IndicatorType_Mouse: return UIIconPool::iconSet(":/mouse_16px.png"); -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r75251 r75291 500 500 RuntimeMenuViewActionType_GuestAutoresize = RT_BIT(5), 501 501 RuntimeMenuViewActionType_TakeScreenshot = RT_BIT(6), 502 RuntimeMenuViewActionType_ VideoCapture= RT_BIT(7),503 RuntimeMenuViewActionType_ VideoCaptureSettings= RT_BIT(8),504 RuntimeMenuViewActionType_Start VideoCapture= RT_BIT(9),502 RuntimeMenuViewActionType_Recording = RT_BIT(7), 503 RuntimeMenuViewActionType_RecordingSettings = RT_BIT(8), 504 RuntimeMenuViewActionType_StartRecording = RT_BIT(9), 505 505 RuntimeMenuViewActionType_VRDEServer = RT_BIT(10), 506 506 RuntimeMenuViewActionType_MenuBar = RT_BIT(11), … … 765 765 IndicatorType_SharedFolders, 766 766 IndicatorType_Display, 767 IndicatorType_ Capture,767 IndicatorType_Recording, 768 768 IndicatorType_Features, 769 769 IndicatorType_Mouse, -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.cpp
r75251 r75291 1051 1051 1052 1052 /** Menu action extension, used as 'View' menu class. */ 1053 class UIActionMenuRuntime VideoCapture: public UIActionMenu1054 { 1055 Q_OBJECT; 1056 1057 public: 1058 1059 /** Constructs action passing @a pParent to the base-class. */ 1060 UIActionMenuRuntime VideoCapture(UIActionPool *pParent)1053 class UIActionMenuRuntimeRecording : public UIActionMenu 1054 { 1055 Q_OBJECT; 1056 1057 public: 1058 1059 /** Constructs action passing @a pParent to the base-class. */ 1060 UIActionMenuRuntimeRecording(UIActionPool *pParent) 1061 1061 : UIActionMenu(pParent) 1062 1062 {} … … 1067 1067 virtual int extraDataID() const /* override */ 1068 1068 { 1069 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_ VideoCapture;1070 } 1071 /** Returns action extra-data key. */ 1072 virtual QString extraDataKey() const /* override */ 1073 { 1074 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ VideoCapture);1075 } 1076 /** Returns whether action is allowed. */ 1077 virtual bool isAllowed() const /* override */ 1078 { 1079 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ VideoCapture);1069 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_Recording; 1070 } 1071 /** Returns action extra-data key. */ 1072 virtual QString extraDataKey() const /* override */ 1073 { 1074 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Recording); 1075 } 1076 /** Returns whether action is allowed. */ 1077 virtual bool isAllowed() const /* override */ 1078 { 1079 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Recording); 1080 1080 } 1081 1081 … … 1087 1087 }; 1088 1088 1089 /** Simple action extension, used as 'Show Video CaptureSettings' action class. */1090 class UIActionSimpleRuntimeShow VideoCaptureSettings : public UIActionSimple1091 { 1092 Q_OBJECT; 1093 1094 public: 1095 1096 /** Constructs action passing @a pParent to the base-class. */ 1097 UIActionSimpleRuntimeShow VideoCaptureSettings(UIActionPool *pParent)1089 /** Simple action extension, used as 'Show Recording Settings' action class. */ 1090 class UIActionSimpleRuntimeShowRecordingSettings : public UIActionSimple 1091 { 1092 Q_OBJECT; 1093 1094 public: 1095 1096 /** Constructs action passing @a pParent to the base-class. */ 1097 UIActionSimpleRuntimeShowRecordingSettings(UIActionPool *pParent) 1098 1098 : UIActionSimple(pParent, ":/video_capture_settings_16px.png", ":/video_capture_settings_16px.png", true) 1099 1099 {} … … 1104 1104 virtual int extraDataID() const /* override */ 1105 1105 { 1106 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_ VideoCaptureSettings;1107 } 1108 /** Returns action extra-data key. */ 1109 virtual QString extraDataKey() const /* override */ 1110 { 1111 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ VideoCaptureSettings);1112 } 1113 /** Returns whether action is allowed. */ 1114 virtual bool isAllowed() const /* override */ 1115 { 1116 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_ VideoCaptureSettings);1106 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_RecordingSettings; 1107 } 1108 /** Returns action extra-data key. */ 1109 virtual QString extraDataKey() const /* override */ 1110 { 1111 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_RecordingSettings); 1112 } 1113 /** Returns whether action is allowed. */ 1114 virtual bool isAllowed() const /* override */ 1115 { 1116 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_RecordingSettings); 1117 1117 } 1118 1118 … … 1131 1131 }; 1132 1132 1133 /** Toggle action extension, used as ' Video Capture' action class. */1134 class UIActionToggleRuntime VideoCapture: public UIActionToggle1135 { 1136 Q_OBJECT; 1137 1138 public: 1139 1140 /** Constructs action passing @a pParent to the base-class. */ 1141 UIActionToggleRuntime VideoCapture(UIActionPool *pParent)1133 /** Toggle action extension, used as 'Recording' action class. */ 1134 class UIActionToggleRuntimeRecording : public UIActionToggle 1135 { 1136 Q_OBJECT; 1137 1138 public: 1139 1140 /** Constructs action passing @a pParent to the base-class. */ 1141 UIActionToggleRuntimeRecording(UIActionPool *pParent) 1142 1142 : UIActionToggle(pParent, 1143 1143 ":/video_capture_on_16px.png", ":/video_capture_16px.png", … … 1151 1151 virtual int extraDataID() const /* override */ 1152 1152 { 1153 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_Start VideoCapture;1154 } 1155 /** Returns action extra-data key. */ 1156 virtual QString extraDataKey() const /* override */ 1157 { 1158 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Start VideoCapture);1159 } 1160 /** Returns whether action is allowed. */ 1161 virtual bool isAllowed() const /* override */ 1162 { 1163 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_Start VideoCapture);1153 return UIExtraDataMetaDefs::RuntimeMenuViewActionType_StartRecording; 1154 } 1155 /** Returns action extra-data key. */ 1156 virtual QString extraDataKey() const /* override */ 1157 { 1158 return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StartRecording); 1159 } 1160 /** Returns whether action is allowed. */ 1161 virtual bool isAllowed() const /* override */ 1162 { 1163 return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StartRecording); 1164 1164 } 1165 1165 … … 3306 3306 m_pool[UIActionIndexRT_M_View_T_GuestAutoresize] = new UIActionToggleRuntimeGuestAutoresize(this); 3307 3307 m_pool[UIActionIndexRT_M_View_S_TakeScreenshot] = new UIActionSimpleRuntimePerformTakeScreenshot(this); 3308 m_pool[UIActionIndexRT_M_View_M_ VideoCapture] = new UIActionMenuRuntimeVideoCapture(this);3309 m_pool[UIActionIndexRT_M_View_M_ Capture_S_Settings] = new UIActionSimpleRuntimeShowVideoCaptureSettings(this);3310 m_pool[UIActionIndexRT_M_View_M_ Capture_T_Start] = new UIActionToggleRuntimeVideoCapture(this);3308 m_pool[UIActionIndexRT_M_View_M_Recording] = new UIActionMenuRuntimeRecording(this); 3309 m_pool[UIActionIndexRT_M_View_M_Recording_S_Settings] = new UIActionSimpleRuntimeShowRecordingSettings(this); 3310 m_pool[UIActionIndexRT_M_View_M_Recording_T_Start] = new UIActionToggleRuntimeRecording(this); 3311 3311 m_pool[UIActionIndexRT_M_View_T_VRDEServer] = new UIActionToggleRuntimeVRDEServer(this); 3312 3312 m_pool[UIActionIndexRT_M_View_M_MenuBar] = new UIActionMenuRuntimeMenuBar(this); … … 3377 3377 m_menuUpdateHandlers[UIActionIndexRT_M_View].ptfr = &UIActionPoolRuntime::updateMenuView; 3378 3378 m_menuUpdateHandlers[UIActionIndexRT_M_ViewPopup].ptfr = &UIActionPoolRuntime::updateMenuViewPopup; 3379 m_menuUpdateHandlers[UIActionIndexRT_M_View_M_ VideoCapture].ptfr = &UIActionPoolRuntime::updateMenuViewVideoCapture;3379 m_menuUpdateHandlers[UIActionIndexRT_M_View_M_Recording].ptfr = &UIActionPoolRuntime::updateMenuViewRecording; 3380 3380 m_menuUpdateHandlers[UIActionIndexRT_M_View_M_MenuBar].ptfr = &UIActionPoolRuntime::updateMenuViewMenuBar; 3381 3381 m_menuUpdateHandlers[UIActionIndexRT_M_View_M_StatusBar].ptfr = &UIActionPoolRuntime::updateMenuViewStatusBar; … … 3452 3452 (m_restrictedActionsMenuMachine[UIActionRestrictionLevel_Base] | UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SettingsDialog); 3453 3453 m_restrictedActionsMenuView[UIActionRestrictionLevel_Base] = (UIExtraDataMetaDefs::RuntimeMenuViewActionType) 3454 (m_restrictedActionsMenuView[UIActionRestrictionLevel_Base] | UIExtraDataMetaDefs::RuntimeMenuViewActionType_ VideoCaptureSettings);3454 (m_restrictedActionsMenuView[UIActionRestrictionLevel_Base] | UIExtraDataMetaDefs::RuntimeMenuViewActionType_RecordingSettings); 3455 3455 m_restrictedActionsMenuInput[UIActionRestrictionLevel_Base] = (UIExtraDataMetaDefs::RuntimeMenuInputActionType) 3456 3456 (m_restrictedActionsMenuInput[UIActionRestrictionLevel_Base] | UIExtraDataMetaDefs::RuntimeMenuInputActionType_KeyboardSettings); … … 3658 3658 /* 'Take Screenshot' action: */ 3659 3659 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_S_TakeScreenshot)) || fSeparator; 3660 /* ' Video Capture' submenu: */3661 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_M_ VideoCapture), false) || fSeparator;3662 updateMenuView VideoCapture();3663 /* ' Video CaptureStart' action: */3664 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_M_ Capture_T_Start)) || fSeparator;3660 /* 'Recording' submenu: */ 3661 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_M_Recording), false) || fSeparator; 3662 updateMenuViewRecording(); 3663 /* 'Recording Start' action: */ 3664 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_M_Recording_T_Start)) || fSeparator; 3665 3665 /* 'VRDE Server' action: */ 3666 3666 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_T_VRDEServer)) || fSeparator; … … 3765 3765 } 3766 3766 3767 void UIActionPoolRuntime::updateMenuView VideoCapture()3767 void UIActionPoolRuntime::updateMenuViewRecording() 3768 3768 { 3769 3769 /* Get corresponding menu: */ 3770 UIMenu *pMenu = action(UIActionIndexRT_M_View_M_ VideoCapture)->menu();3770 UIMenu *pMenu = action(UIActionIndexRT_M_View_M_Recording)->menu(); 3771 3771 AssertPtrReturnVoid(pMenu); 3772 3772 /* Clear contents: */ … … 3776 3776 bool fSeparator = false; 3777 3777 3778 /* ' Video CaptureSettings' action: */3779 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_M_ Capture_S_Settings)) || fSeparator;3778 /* 'Recording Settings' action: */ 3779 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_M_Recording_S_Settings)) || fSeparator; 3780 3780 3781 3781 /* Separator: */ … … 3786 3786 } 3787 3787 3788 /* 'Start Video Capture' action: */3789 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_M_ Capture_T_Start)) || fSeparator;3788 /* 'Start Recording' action: */ 3789 fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_M_Recording_T_Start)) || fSeparator; 3790 3790 3791 3791 /* Mark menu as valid: */ 3792 m_invalidations.remove(UIActionIndexRT_M_View_M_ VideoCapture);3792 m_invalidations.remove(UIActionIndexRT_M_View_M_Recording); 3793 3793 } 3794 3794 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.h
r75251 r75291 64 64 UIActionIndexRT_M_View_T_GuestAutoresize, 65 65 UIActionIndexRT_M_View_S_TakeScreenshot, 66 UIActionIndexRT_M_View_M_ VideoCapture,67 UIActionIndexRT_M_View_M_ Capture_S_Settings,68 UIActionIndexRT_M_View_M_ Capture_T_Start,66 UIActionIndexRT_M_View_M_Recording, 67 UIActionIndexRT_M_View_M_Recording_S_Settings, 68 UIActionIndexRT_M_View_M_Recording_T_Start, 69 69 UIActionIndexRT_M_View_T_VRDEServer, 70 70 UIActionIndexRT_M_View_M_MenuBar, … … 242 242 /** Updates 'View' : 'Popup' menu. */ 243 243 void updateMenuViewPopup(); 244 /** Updates 'View' : ' Video Capture' menu. */245 void updateMenuView VideoCapture();244 /** Updates 'View' : 'Recording' menu. */ 245 void updateMenuViewRecording(); 246 246 /** Updates 'View' : 'Menu Bar' menu. */ 247 247 void updateMenuViewMenuBar(); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp
r75251 r75291 377 377 case KVBoxEventType_OnCaptureChanged: 378 378 { 379 emit sig CaptureChange();379 emit sigRecordingChange(); 380 380 break; 381 381 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h
r75251 r75291 125 125 void sigVRDEChange(); 126 126 /** Notifies about capture state change. */ 127 void sig CaptureChange();127 void sigRecordingChange(); 128 128 /** Notifies about USB controller state change. */ 129 129 void sigUSBControllerChange(); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp
r75251 r75291 570 570 } 571 571 572 void UIPopupCenter::cannotToggle Capture(QWidget *pParent, const CMachine &comMachine, bool fEnable)572 void UIPopupCenter::cannotToggleRecording(QWidget *pParent, const CMachine &comMachine, bool fEnable) 573 573 { 574 574 /* Get machine-name preserving error-info: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.h
r75251 r75291 162 162 void cannotDetachWebCam(QWidget *pParent, const CEmulatedUSB &comDispatcher, 163 163 const QString &strWebCamName, const QString &strMachineName); 164 void cannotToggle Capture(QWidget *pParent, const CMachine &comMachine, bool fEnable);164 void cannotToggleRecording(QWidget *pParent, const CMachine &comMachine, bool fEnable); 165 165 void cannotToggleVRDEServer(QWidget *pParent, const CVRDEServer &comServer, 166 166 const QString &strMachineName, bool fEnable); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElements.cpp
r75251 r75291 449 449 } 450 450 451 /* Captureinfo: */451 /* Recording info: */ 452 452 CCaptureSettings captureSettings = machine.GetCaptureSettings(); 453 453 if (captureSettings.GetEnabled()) … … 457 457 458 458 /** @todo r=andy Refine these texts (wrt audio and/or video). */ 459 table << UITextTableLine(QApplication::translate("UIDetails", " Video CaptureFile", "details (display/video capture)"),459 table << UITextTableLine(QApplication::translate("UIDetails", "Recording File", "details (display/video capture)"), 460 460 captureScreen0Settings.GetFileName()); 461 table << UITextTableLine(QApplication::translate("UIDetails", " Video CaptureAttributes", "details (display/video capture)"),461 table << UITextTableLine(QApplication::translate("UIDetails", "Recording Attributes", "details (display/video capture)"), 462 462 QApplication::translate("UIDetails", "Frame Size: %1x%2, Frame Rate: %3fps, Bit Rate: %4kbps") 463 463 .arg(captureScreen0Settings.GetVideoWidth()).arg(captureScreen0Settings.GetVideoHeight()) … … 467 467 { 468 468 /** @todo r=andy Refine these texts (wrt audio and/or video). */ 469 table << UITextTableLine(QApplication::translate("UIDetails", " Video Capture", "details (display/video capture)"),469 table << UITextTableLine(QApplication::translate("UIDetails", "Recording", "details (display/video capture)"), 470 470 QApplication::translate("UIDetails", "Disabled", "details (display/video capture)")); 471 471 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.cpp
r75251 r75291 64 64 /** Notifies about VRDE device state change. */ 65 65 void sigVRDEChange(); 66 /** Notifies about Video Capture devicestate change. */67 void sig VideoCaptureChange();66 /** Notifies about recording state change. */ 67 void sigRecordingChange(); 68 68 /** Notifies about USB controller state change. */ 69 69 void sigUSBControllerChange(); … … 243 243 this, SIGNAL(sigVRDEChange()), 244 244 Qt::DirectConnection); 245 connect(m_pQtListener->getWrapped(), SIGNAL(sig VideoCaptureChange()),246 this, SIGNAL(sig VideoCaptureChange()),245 connect(m_pQtListener->getWrapped(), SIGNAL(sigRecordingChange()), 246 this, SIGNAL(sigRecordingChange()), 247 247 Qt::DirectConnection); 248 248 connect(m_pQtListener->getWrapped(), SIGNAL(sigUSBControllerChange()), … … 402 402 this, SIGNAL(sigVRDEChange()), 403 403 Qt::QueuedConnection); 404 connect(m_pProxy, SIGNAL(sig VideoCaptureChange()),405 this, SIGNAL(sig VideoCaptureChange()),404 connect(m_pProxy, SIGNAL(sigRecordingChange()), 405 this, SIGNAL(sigRecordingChange()), 406 406 Qt::QueuedConnection); 407 407 connect(m_pProxy, SIGNAL(sigUSBControllerChange()), -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.h
r69500 r75291 60 60 /** Notifies about VRDE device state change. */ 61 61 void sigVRDEChange(); 62 /** Notifies about Video Capture devicestate change. */63 void sig VideoCaptureChange();62 /** Notifies about recording state change. */ 63 void sigRecordingChange(); 64 64 /** Notifies about USB controller state change. */ 65 65 void sigUSBControllerChange(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
r75251 r75291 782 782 783 783 784 /** UISessionStateStatusBarIndicator extension for Runtime UI: Video-captureindicator. */785 class UIIndicator Capture: public UISessionStateStatusBarIndicator784 /** UISessionStateStatusBarIndicator extension for Runtime UI: Recording indicator. */ 785 class UIIndicatorRecording : public UISessionStateStatusBarIndicator 786 786 { 787 787 Q_OBJECT; … … 790 790 Q_PROPERTY(double rotationAngle READ rotationAngle WRITE setRotationAngle); 791 791 792 /** Capturestates. */793 enum UIIndicatorState Capture794 { 795 UIIndicatorState Capture_Disabled = 0,796 UIIndicatorState Capture_Enabled = 1,797 UIIndicatorState Capture_Paused = 2792 /** Recording states. */ 793 enum UIIndicatorStateRecording 794 { 795 UIIndicatorStateRecording_Disabled = 0, 796 UIIndicatorStateRecording_Enabled = 1, 797 UIIndicatorStateRecording_Paused = 2 798 798 }; 799 799 800 /** Capturemodes. */801 enum UIIndicatorState CaptureMode802 { 803 UIIndicatorState CaptureMode_None= RT_BIT(0),804 UIIndicatorState CaptureMode_Video= RT_BIT(1),805 UIIndicatorState CaptureMode_Audio= RT_BIT(2)800 /** Recording modes. */ 801 enum UIIndicatorStateRecordingMode 802 { 803 UIIndicatorStateRecordingMode_None = RT_BIT(0), 804 UIIndicatorStateRecordingMode_Video = RT_BIT(1), 805 UIIndicatorStateRecordingMode_Audio = RT_BIT(2) 806 806 }; 807 807 … … 809 809 810 810 /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */ 811 UIIndicator Capture(UISession *pSession)812 : UISessionStateStatusBarIndicator(IndicatorType_ Capture, pSession)811 UIIndicatorRecording(UISession *pSession) 812 : UISessionStateStatusBarIndicator(IndicatorType_Recording, pSession) 813 813 , m_pAnimation(0) 814 814 , m_dRotationAngle(0) 815 , m_e CaptureMode(UIIndicatorStateCaptureMode_None)815 , m_eRecordingMode(UIIndicatorStateRecordingMode_None) 816 816 { 817 817 /* Assign state-icons: */ 818 setStateIcon(UIIndicatorState Capture_Disabled, UIIconPool::iconSet(":/video_capture_16px.png"));819 setStateIcon(UIIndicatorState Capture_Enabled, UIIconPool::iconSet(":/movie_reel_16px.png"));820 setStateIcon(UIIndicatorState Capture_Paused, UIIconPool::iconSet(":/movie_reel_16px.png"));818 setStateIcon(UIIndicatorStateRecording_Disabled, UIIconPool::iconSet(":/video_capture_16px.png")); 819 setStateIcon(UIIndicatorStateRecording_Enabled, UIIconPool::iconSet(":/movie_reel_16px.png")); 820 setStateIcon(UIIndicatorStateRecording_Paused, UIIconPool::iconSet(":/movie_reel_16px.png")); 821 821 /* Create *enabled* state animation: */ 822 822 m_pAnimation = UIAnimationLoop::installAnimationLoop(this, "rotationAngle", … … 835 835 switch (iState) 836 836 { 837 case UIIndicatorState Capture_Disabled:837 case UIIndicatorStateRecording_Disabled: 838 838 m_pAnimation->stop(); 839 839 m_dRotationAngle = 0; 840 840 break; 841 case UIIndicatorState Capture_Enabled:841 case UIIndicatorStateRecording_Enabled: 842 842 m_pAnimation->start(); 843 843 break; 844 case UIIndicatorState Capture_Paused:844 case UIIndicatorStateRecording_Paused: 845 845 m_pAnimation->stop(); 846 846 break; … … 860 860 QPainter painter(this); 861 861 /* Configure painter for *enabled* state: */ 862 if (state() == UIIndicatorState Capture_Enabled)862 if (state() == UIIndicatorStateRecording_Enabled) 863 863 { 864 864 /* Configure painter for smooth animation: */ … … 885 885 /* Update indicator state early: */ 886 886 CCaptureSettings captureSettings = machine.GetCaptureSettings(); 887 Assert(captureSettings.isOk()); 887 888 /* For now all screens have the same config: */ 888 889 CCaptureScreenSettings captureScreen0Settings = captureSettings.GetScreenSettings(0); 890 Assert(captureScreen0Settings.isOk()); 889 891 if (!captureScreen0Settings.GetEnabled()) 890 setState(UIIndicatorState Capture_Disabled);892 setState(UIIndicatorStateRecording_Disabled); 891 893 else if (!fMachinePaused) 892 setState(UIIndicatorState Capture_Enabled);894 setState(UIIndicatorStateRecording_Enabled); 893 895 else 894 setState(UIIndicatorState Capture_Paused);895 896 update CaptureMode();896 setState(UIIndicatorStateRecording_Paused); 897 898 updateRecordingMode(); 897 899 898 900 /* Prepare tool-tip: */ … … 900 902 switch (state()) 901 903 { 902 case UIIndicatorState Capture_Disabled:904 case UIIndicatorStateRecording_Disabled: 903 905 { 904 906 strFullData += s_strTableRow1 /** @todo r=andy Refine this tooltip (audio and/or video). */ … … 906 908 break; 907 909 } 908 case UIIndicatorState Capture_Enabled:909 case UIIndicatorState Capture_Paused:910 case UIIndicatorStateRecording_Enabled: 911 case UIIndicatorStateRecording_Paused: 910 912 { 911 913 QString strToolTip; 912 if ( m_e CaptureMode & UIIndicatorStateCaptureMode_Audio &&913 m_e CaptureMode & UIIndicatorStateCaptureMode_Video)914 if ( m_eRecordingMode & UIIndicatorStateRecordingMode_Audio && 915 m_eRecordingMode & UIIndicatorStateRecordingMode_Video) 914 916 strToolTip = "Video/audio capture file"; 915 else if (m_e CaptureMode & UIIndicatorStateCaptureMode_Audio)917 else if (m_eRecordingMode & UIIndicatorStateRecordingMode_Audio) 916 918 strToolTip = "Audio capture file"; 917 else if (m_e CaptureMode & UIIndicatorStateCaptureMode_Video)919 else if (m_eRecordingMode & UIIndicatorStateRecordingMode_Video) 918 920 strToolTip = "Video capture file"; 919 921 … … 940 942 void setRotationAngle(double dRotationAngle) { m_dRotationAngle = dRotationAngle; update(); } 941 943 942 /* Parses CaptureScreenSettings::Options and updates m_e CaptureMode accordingly. */943 void update CaptureMode()944 { 945 m_e CaptureMode = UIIndicatorStateCaptureMode_None;944 /* Parses CaptureScreenSettings::Options and updates m_eRecordingMode accordingly. */ 945 void updateRecordingMode() 946 { 947 m_eRecordingMode = UIIndicatorStateRecordingMode_None; 946 948 947 949 /* Get machine: */ … … 952 954 return; 953 955 954 CCaptureSettings captureSettings = machine.GetCaptureSettings();956 CCaptureSettings recordingSettings = machine.GetCaptureSettings(); 955 957 /* For now all screens have the same config: */ 956 CCaptureScreenSettings captureScreen0Settings = captureSettings.GetScreenSettings(0);957 958 QStringList strOptionsPairList = captureScreen0Settings.GetOptions().split(",", QString::SkipEmptyParts);958 CCaptureScreenSettings recordingScreen0Settings = recordingSettings.GetScreenSettings(0); 959 960 QStringList strOptionsPairList = recordingScreen0Settings.GetOptions().split(",", QString::SkipEmptyParts); 959 961 960 962 for (int i = 0; i < strOptionsPairList.size(); ++i) … … 962 964 if (strOptionsPairList.at(i).contains("vc_enabled", Qt::CaseInsensitive) && 963 965 strOptionsPairList.at(i).contains("true", Qt::CaseInsensitive)) 964 m_e CaptureMode = (UIIndicatorStateCaptureMode)((int)m_eCaptureMode | (int)UIIndicatorStateCaptureMode_Video);966 m_eRecordingMode = (UIIndicatorStateRecordingMode)((int)m_eRecordingMode | (int)UIIndicatorStateRecordingMode_Video); 965 967 966 968 if (strOptionsPairList.at(i).contains("ac_enabled", Qt::CaseInsensitive) && 967 969 strOptionsPairList.at(i).contains("true", Qt::CaseInsensitive)) 968 m_e CaptureMode = (UIIndicatorStateCaptureMode)((int)m_eCaptureMode | (int)UIIndicatorStateCaptureMode_Audio);970 m_eRecordingMode = (UIIndicatorStateRecordingMode)((int)m_eRecordingMode | (int)UIIndicatorStateRecordingMode_Audio); 969 971 } 970 972 } … … 975 977 double m_dRotationAngle; 976 978 977 UIIndicatorState CaptureMode m_eCaptureMode;979 UIIndicatorStateRecordingMode m_eRecordingMode; 978 980 }; 979 981 … … 1474 1476 case IndicatorType_SharedFolders: m_pool[indicatorType] = new UIIndicatorSharedFolders(m_pSession); break; 1475 1477 case IndicatorType_Display: m_pool[indicatorType] = new UIIndicatorDisplay(m_pSession); break; 1476 case IndicatorType_ Capture: m_pool[indicatorType] = new UIIndicatorCapture(m_pSession);break;1478 case IndicatorType_Recording: m_pool[indicatorType] = new UIIndicatorRecording(m_pSession); break; 1477 1479 case IndicatorType_Features: m_pool[indicatorType] = new UIIndicatorFeatures(m_pSession); break; 1478 1480 case IndicatorType_Mouse: m_pool[indicatorType] = new UIIndicatorMouse(m_pSession); break; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineDefs.h
r73924 r75291 36 36 UIVisualElement_SharedFolderStuff = RT_BIT(9), 37 37 UIVisualElement_Display = RT_BIT(10), 38 UIVisualElement_ VideoCapture= RT_BIT(11),38 UIVisualElement_Recording = RT_BIT(11), 39 39 UIVisualElement_FeaturesStuff = RT_BIT(12), 40 40 #ifndef VBOX_WS_MAC -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r75251 r75291 1052 1052 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_S_AdjustWindow)); 1053 1053 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_S_TakeScreenshot)); 1054 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_ VideoCapture));1055 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_ Capture_S_Settings));1056 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_ Capture_T_Start));1054 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_Recording)); 1055 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_Recording_S_Settings)); 1056 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_Recording_T_Start)); 1057 1057 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_T_VRDEServer)); 1058 1058 m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar)); … … 1137 1137 connect(actionPool()->action(UIActionIndexRT_M_View_S_TakeScreenshot), SIGNAL(triggered()), 1138 1138 this, SLOT(sltTakeScreenshot())); 1139 connect(actionPool()->action(UIActionIndexRT_M_View_M_ Capture_S_Settings), SIGNAL(triggered()),1140 this, SLOT(sltOpen CaptureOptions()));1141 connect(actionPool()->action(UIActionIndexRT_M_View_M_ Capture_T_Start), SIGNAL(toggled(bool)),1142 this, SLOT(sltToggle Capture(bool)));1139 connect(actionPool()->action(UIActionIndexRT_M_View_M_Recording_S_Settings), SIGNAL(triggered()), 1140 this, SLOT(sltOpenRecordingOptions())); 1141 connect(actionPool()->action(UIActionIndexRT_M_View_M_Recording_T_Start), SIGNAL(toggled(bool)), 1142 this, SLOT(sltToggleRecording(bool))); 1143 1143 connect(actionPool()->action(UIActionIndexRT_M_View_T_VRDEServer), SIGNAL(toggled(bool)), 1144 1144 this, SLOT(sltToggleVRDE(bool))); … … 2091 2091 } 2092 2092 2093 void UIMachineLogic::sltOpen CaptureOptions()2094 { 2095 /* Open VM settings : Display page : Video Capturetab: */2093 void UIMachineLogic::sltOpenRecordingOptions() 2094 { 2095 /* Open VM settings : Display page : Recording tab: */ 2096 2096 sltOpenVMSettingsDialog("#display", "m_pCheckboxVideoCapture"); 2097 2097 } 2098 2098 2099 void UIMachineLogic::sltToggle Capture(bool fEnabled)2099 void UIMachineLogic::sltToggleRecording(bool fEnabled) 2100 2100 { 2101 2101 /* Do not process if window(s) missed! */ … … 2104 2104 2105 2105 /* Make sure something had changed: */ 2106 CCaptureSettings captureSettings = machine().GetCaptureSettings();2107 if ( captureSettings.GetEnabled() == static_cast<BOOL>(fEnabled))2108 return; 2109 2110 /* Update Video Capturestate: */2111 captureSettings.SetEnabled(fEnabled);2112 if (! captureSettings.isOk())2106 CCaptureSettings recordingSettings = machine().GetCaptureSettings(); 2107 if (recordingSettings.GetEnabled() == static_cast<BOOL>(fEnabled)) 2108 return; 2109 2110 /* Update recording state: */ 2111 recordingSettings.SetEnabled(fEnabled); 2112 if (!recordingSettings.isOk()) 2113 2113 { 2114 2114 /* Make sure action is updated: */ 2115 uisession()->updateStatus Capture();2115 uisession()->updateStatusRecording(); 2116 2116 /* Notify about the error: */ 2117 return popupCenter().cannotToggle Capture(activeMachineWindow(), machine(), fEnabled);2117 return popupCenter().cannotToggleRecording(activeMachineWindow(), machine(), fEnabled); 2118 2118 } 2119 2119 … … 2123 2123 { 2124 2124 /* Make sure action is updated: */ 2125 uisession()->updateStatus Capture();2125 uisession()->updateStatusRecording(); 2126 2126 /* Notify about the error: */ 2127 2127 return msgCenter().cannotSaveMachineSettings(machine()); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h
r75251 r75291 291 291 void sltToggleGuestAutoresize(bool fEnabled); 292 292 void sltTakeScreenshot(); 293 void sltOpen CaptureOptions();294 void sltToggle Capture(bool fEnabled);293 void sltOpenRecordingOptions(); 294 void sltToggleRecording(bool fEnabled); 295 295 void sltToggleVRDE(bool fEnabled); 296 296 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r75251 r75291 722 722 } 723 723 724 void UISession::slt CaptureChange()724 void UISession::sltRecordingChange() 725 725 { 726 726 CCaptureSettings captureSettings = machine().GetCaptureSettings(); 727 727 728 728 /* Check/Uncheck Capture action depending on feature status: */ 729 actionPool()->action(UIActionIndexRT_M_View_M_ Capture_T_Start)->blockSignals(true);730 actionPool()->action(UIActionIndexRT_M_View_M_ Capture_T_Start)->setChecked(captureSettings.GetEnabled());731 actionPool()->action(UIActionIndexRT_M_View_M_ Capture_T_Start)->blockSignals(false);729 actionPool()->action(UIActionIndexRT_M_View_M_Recording_T_Start)->blockSignals(true); 730 actionPool()->action(UIActionIndexRT_M_View_M_Recording_T_Start)->setChecked(captureSettings.GetEnabled()); 731 actionPool()->action(UIActionIndexRT_M_View_M_Recording_T_Start)->blockSignals(false); 732 732 733 733 /* Notify listeners about Capture change: */ 734 emit sig CaptureChange();734 emit sigRecordingChange(); 735 735 } 736 736 … … 1133 1133 this, SLOT(sltVRDEChange())); 1134 1134 1135 connect(gConsoleEvents, SIGNAL(sig VideoCaptureChange()),1136 this, SLOT(slt CaptureChange()));1135 connect(gConsoleEvents, SIGNAL(sigRecordingChange()), 1136 this, SLOT(sltRecordingChange())); 1137 1137 1138 1138 connect(gConsoleEvents, SIGNAL(sigNetworkAdapterChange(CNetworkAdapter)), -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r75251 r75291 259 259 void updateStatusVRDE() { sltVRDEChange(); } 260 260 /** Updates Video Capture action state. */ 261 void updateStatus Capture() { sltCaptureChange(); }261 void updateStatusRecording() { sltRecordingChange(); } 262 262 /** Updates Audio output action state. */ 263 263 void updateAudioOutput() { sltAudioAdapterChange(); } … … 305 305 void sigMediumChange(const CMediumAttachment &mediumAttachment); 306 306 void sigVRDEChange(); 307 void sig CaptureChange();307 void sigRecordingChange(); 308 308 void sigUSBControllerChange(); 309 309 void sigUSBDeviceStateChange(const CUSBDevice &device, bool bIsAttached, const CVirtualBoxErrorInfo &error); … … 357 357 void sltAdditionsChange(); 358 358 void sltVRDEChange(); 359 void slt CaptureChange();359 void sltRecordingChange(); 360 360 void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo); 361 361 /** Handles storage device change for @a attachment, which was @a fRemoved and it was @a fSilent for guest. */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r75251 r75291 71 71 72 72 /* Update indicator-pool and virtualization stuff: */ 73 updateAppearanceOf(UIVisualElement_IndicatorPoolStuff | UIVisualElement_ VideoCapture| UIVisualElement_FeaturesStuff);73 updateAppearanceOf(UIVisualElement_IndicatorPoolStuff | UIVisualElement_Recording | UIVisualElement_FeaturesStuff); 74 74 } 75 75 … … 116 116 } 117 117 118 void UIMachineWindowNormal::slt VideoCaptureChange()118 void UIMachineWindowNormal::sltRecordingChange() 119 119 { 120 120 /* Update video-capture stuff: */ 121 updateAppearanceOf(UIVisualElement_ VideoCapture);121 updateAppearanceOf(UIVisualElement_Recording); 122 122 } 123 123 … … 219 219 case IndicatorType_SharedFolders: pAction = actionPool()->action(UIActionIndexRT_M_Devices_M_SharedFolders); break; 220 220 case IndicatorType_Display: pAction = actionPool()->action(UIActionIndexRT_M_ViewPopup); break; 221 case IndicatorType_ Capture: pAction = actionPool()->action(UIActionIndexRT_M_View_M_VideoCapture); break;221 case IndicatorType_Recording: pAction = actionPool()->action(UIActionIndexRT_M_View_M_Recording); break; 222 222 case IndicatorType_Mouse: pAction = actionPool()->action(UIActionIndexRT_M_Input_M_Mouse); break; 223 223 case IndicatorType_Keyboard: pAction = actionPool()->action(UIActionIndexRT_M_Input_M_Keyboard); break; … … 255 255 connect(machineLogic()->uisession(), SIGNAL(sigSharedFolderChange()), 256 256 this, SLOT(sltSharedFolderChange())); 257 connect(machineLogic()->uisession(), SIGNAL(sig VideoCaptureChange()),258 this, SLOT(slt VideoCaptureChange()));257 connect(machineLogic()->uisession(), SIGNAL(sigRecordingChange()), 258 this, SLOT(sltRecordingChange())); 259 259 connect(machineLogic()->uisession(), SIGNAL(sigCPUExecutionCapChange()), 260 260 this, SLOT(sltCPUExecutionCapChange())); … … 464 464 disconnect(machineLogic()->uisession(), SIGNAL(sigSharedFolderChange()), 465 465 this, SLOT(sltSharedFolderChange())); 466 disconnect(machineLogic()->uisession(), SIGNAL(sig VideoCaptureChange()),467 this, SLOT(slt VideoCaptureChange()));466 disconnect(machineLogic()->uisession(), SIGNAL(sigRecordingChange()), 467 this, SLOT(sltRecordingChange())); 468 468 disconnect(machineLogic()->uisession(), SIGNAL(sigCPUExecutionCapChange()), 469 469 this, SLOT(sltCPUExecutionCapChange())); … … 639 639 if (uisession()->isRunning() || uisession()->isPaused()) 640 640 { 641 if (iElement & UIVisualElement_ VideoCapture)642 m_pIndicatorsPool->updateAppearance(IndicatorType_ Capture);641 if (iElement & UIVisualElement_Recording) 642 m_pIndicatorsPool->updateAppearance(IndicatorType_Recording); 643 643 } 644 644 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h
r74942 r75291 59 59 /** Handles shared folder change event. */ 60 60 void sltSharedFolderChange(); 61 /** Handles video capturechange event. */62 void slt VideoCaptureChange();61 /** Handles recording change event. */ 62 void sltRecordingChange(); 63 63 /** Handles CPU execution cap change event. */ 64 64 void sltCPUExecutionCapChange(); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r75251 r75291 59 59 , m_uRemoteDisplayTimeout(0) 60 60 , m_fRemoteDisplayMultiConnAllowed(false) 61 , m_f VideoCaptureEnabled(false)62 , m_str VideoCaptureFolder(QString())63 , m_str VideoCaptureFilePath(QString())64 , m_i VideoCaptureFrameWidth(0)65 , m_i VideoCaptureFrameHeight(0)66 , m_i VideoCaptureFrameRate(0)67 , m_i VideoCaptureBitRate(0)68 , m_str VideoCaptureOptions(QString())61 , m_fRecordingEnabled(false) 62 , m_strRecordingFolder(QString()) 63 , m_strRecordingFilePath(QString()) 64 , m_iRecordingVideoFrameWidth(0) 65 , m_iRecordingVideoFrameHeight(0) 66 , m_iRecordingVideoFrameRate(0) 67 , m_iRecordingVideoBitRate(0) 68 , m_strRecordingVideoOptions(QString()) 69 69 {} 70 70 … … 86 86 && (m_uRemoteDisplayTimeout == other.m_uRemoteDisplayTimeout) 87 87 && (m_fRemoteDisplayMultiConnAllowed == other.m_fRemoteDisplayMultiConnAllowed) 88 && (m_f VideoCaptureEnabled == other.m_fVideoCaptureEnabled)89 && (m_str VideoCaptureFilePath == other.m_strVideoCaptureFilePath)90 && (m_i VideoCaptureFrameWidth == other.m_iVideoCaptureFrameWidth)91 && (m_i VideoCaptureFrameHeight == other.m_iVideoCaptureFrameHeight)92 && (m_i VideoCaptureFrameRate == other.m_iVideoCaptureFrameRate)93 && (m_i VideoCaptureBitRate == other.m_iVideoCaptureBitRate)94 && (m_ screens == other.m_screens)95 && (m_str VideoCaptureOptions == other.m_strVideoCaptureOptions)88 && (m_fRecordingEnabled == other.m_fRecordingEnabled) 89 && (m_strRecordingFilePath == other.m_strRecordingFilePath) 90 && (m_iRecordingVideoFrameWidth == other.m_iRecordingVideoFrameWidth) 91 && (m_iRecordingVideoFrameHeight == other.m_iRecordingVideoFrameHeight) 92 && (m_iRecordingVideoFrameRate == other.m_iRecordingVideoFrameRate) 93 && (m_iRecordingVideoBitRate == other.m_iRecordingVideoBitRate) 94 && (m_vecRecordingScreens == other.m_vecRecordingScreens) 95 && (m_strRecordingVideoOptions == other.m_strRecordingVideoOptions) 96 96 ; 97 97 } … … 102 102 bool operator!=(const UIDataSettingsMachineDisplay &other) const { return !equal(other); } 103 103 104 /** Video Capture Options. */105 enum VideoCaptureOption106 { 107 VideoCaptureOption_Unknown,108 VideoCaptureOption_AC,109 VideoCaptureOption_VC,110 VideoCaptureOption_AC_Profile104 /** Recording options. */ 105 enum RecordingOption 106 { 107 RecordingOption_Unknown, 108 RecordingOption_AC, 109 RecordingOption_VC, 110 RecordingOption_AC_Profile 111 111 }; 112 112 113 enum CaptureMode114 { 115 CaptureMode_VideoAudio,116 CaptureMode_VideoOnly,117 CaptureMode_AudioOnly113 enum RecordingMode 114 { 115 RecordingMode_VideoAudio, 116 RecordingMode_VideoOnly, 117 RecordingMode_AudioOnly 118 118 }; 119 119 120 120 /** Returns enum value corresponding to passed @a strKey. */ 121 static VideoCaptureOption toVideoCaptureOptionKey(const QString &strKey)121 static RecordingOption toRecordingOptionKey(const QString &strKey) 122 122 { 123 123 /* Compare case-sensitive: */ 124 QMap<QString, VideoCaptureOption> keys;125 keys["ac_enabled"] = VideoCaptureOption_AC;126 keys["vc_enabled"] = VideoCaptureOption_VC;127 keys["ac_profile"] = VideoCaptureOption_AC_Profile;128 /* Return known value or VideoCaptureOption_Unknown otherwise: */129 return keys.value(strKey, VideoCaptureOption_Unknown);124 QMap<QString, RecordingOption> keys; 125 keys["ac_enabled"] = RecordingOption_AC; 126 keys["vc_enabled"] = RecordingOption_VC; 127 keys["ac_profile"] = RecordingOption_AC_Profile; 128 /* Return known value or RecordingOption_Unknown otherwise: */ 129 return keys.value(strKey, RecordingOption_Unknown); 130 130 } 131 131 132 132 /** Returns string representation for passed enum @a enmKey. */ 133 static QString from VideoCaptureOptionKey(VideoCaptureOption enmKey)133 static QString fromRecordingOptionKey(RecordingOption enmKey) 134 134 { 135 135 /* Compare case-sensitive: */ 136 QMap< VideoCaptureOption, QString> values;137 values[ VideoCaptureOption_AC] = "ac_enabled";138 values[ VideoCaptureOption_VC] = "vc_enabled";139 values[ VideoCaptureOption_AC_Profile] = "ac_profile";136 QMap<RecordingOption, QString> values; 137 values[RecordingOption_AC] = "ac_enabled"; 138 values[RecordingOption_VC] = "vc_enabled"; 139 values[RecordingOption_AC_Profile] = "ac_profile"; 140 140 /* Return known value or QString() otherwise: */ 141 141 return values.value(enmKey); 142 142 } 143 143 144 /** Parses Video Capture Options. */145 static void parse VideoCaptureOptions(const QString &strOptions,146 QList<VideoCaptureOption> &outKeys,147 144 /** Parses recording options. */ 145 static void parseRecordingOptions(const QString &strOptions, 146 QList<RecordingOption> &outKeys, 147 QStringList &outValues) 148 148 { 149 149 outKeys.clear(); … … 155 155 if (aPair.size() != 2) 156 156 continue; 157 const VideoCaptureOption enmKey = toVideoCaptureOptionKey(aPair.value(0));158 if (enmKey == VideoCaptureOption_Unknown)157 const RecordingOption enmKey = toRecordingOptionKey(aPair.value(0)); 158 if (enmKey == RecordingOption_Unknown) 159 159 continue; 160 160 outKeys << enmKey; … … 163 163 } 164 164 165 /** Serializes Video Capture Options. */166 static void serialize VideoCaptureOptions(const QList<VideoCaptureOption> &inKeys,167 168 165 /** Serializes recording options. */ 166 static void serializeRecordingOptions(const QList<RecordingOption> &inKeys, 167 const QStringList &inValues, 168 QString &strOptions) 169 169 { 170 170 QStringList aPairs; … … 172 172 { 173 173 QStringList aPair; 174 aPair << from VideoCaptureOptionKey(inKeys.value(i));174 aPair << fromRecordingOptionKey(inKeys.value(i)); 175 175 aPair << inValues.value(i); 176 176 aPairs << aPair.join('='); … … 179 179 } 180 180 181 /** Returns whether passed Video Capture@a enmOption is enabled. */182 static bool is VideoCaptureOptionEnabled(const QString &strOptions,183 VideoCaptureOption enmOption)184 { 185 QList< VideoCaptureOption> aKeys;181 /** Returns whether passed Recording @a enmOption is enabled. */ 182 static bool isRecordingOptionEnabled(const QString &strOptions, 183 RecordingOption enmOption) 184 { 185 QList<RecordingOption> aKeys; 186 186 QStringList aValues; 187 parse VideoCaptureOptions(strOptions, aKeys, aValues);187 parseRecordingOptions(strOptions, aKeys, aValues); 188 188 int iIndex = aKeys.indexOf(enmOption); 189 189 if (iIndex == -1) … … 198 198 static int getAudioQualityFromOptions(const QString &strOptions) 199 199 { 200 QList< VideoCaptureOption> aKeys;200 QList<RecordingOption> aKeys; 201 201 QStringList aValues; 202 parse VideoCaptureOptions(strOptions, aKeys, aValues);203 int iIndex = aKeys.indexOf( VideoCaptureOption_AC_Profile);202 parseRecordingOptions(strOptions, aKeys, aValues); 203 int iIndex = aKeys.indexOf(RecordingOption_AC_Profile); 204 204 if (iIndex == -1) 205 205 return 2; … … 211 211 } 212 212 213 /** Sets the video captureoptions for @a enmOptions to @a values. */214 static QString set VideoCaptureOptions(const QString &strOptions,215 const QVector<VideoCaptureOption> &enmOptions,216 213 /** Sets the video recording options for @a enmOptions to @a values. */ 214 static QString setRecordingOptions(const QString &strOptions, 215 const QVector<RecordingOption> &enmOptions, 216 const QStringList &values) 217 217 { 218 218 if (enmOptions.size() != values.size()) 219 219 return QString(); 220 QList< VideoCaptureOption> aKeys;220 QList<RecordingOption> aKeys; 221 221 QStringList aValues; 222 parse VideoCaptureOptions(strOptions, aKeys, aValues);222 parseRecordingOptions(strOptions, aKeys, aValues); 223 223 for(int i = 0; i < values.size(); ++i) 224 224 { … … 236 236 } 237 237 QString strResult; 238 serialize VideoCaptureOptions(aKeys, aValues, strResult);238 serializeRecordingOptions(aKeys, aValues, strResult); 239 239 return strResult; 240 240 } … … 266 266 bool m_fRemoteDisplayMultiConnAllowed; 267 267 268 /** Holds whether the video captureis enabled. */269 bool m_f VideoCaptureEnabled;270 /** Holds the video capturefolder. */271 QString m_str VideoCaptureFolder;272 /** Holds the video capturefile path. */273 QString m_str VideoCaptureFilePath;274 /** Holds the video captureframe width. */275 int m_i VideoCaptureFrameWidth;276 /** Holds the video captureframe height. */277 int m_i VideoCaptureFrameHeight;278 /** Holds the video captureframe rate. */279 int m_i VideoCaptureFrameRate;280 /** Holds the video capturebit rate. */281 int m_i VideoCaptureBitRate;282 /** Holds which of the guest screens should be captured. */283 QVector<BOOL> m_ screens;284 /** Holds the video captureoptions. */285 QString m_str VideoCaptureOptions;268 /** Holds whether recording is enabled. */ 269 bool m_fRecordingEnabled; 270 /** Holds the recording folder. */ 271 QString m_strRecordingFolder; 272 /** Holds the recording file path. */ 273 QString m_strRecordingFilePath; 274 /** Holds the recording frame width. */ 275 int m_iRecordingVideoFrameWidth; 276 /** Holds the recording frame height. */ 277 int m_iRecordingVideoFrameHeight; 278 /** Holds the recording frame rate. */ 279 int m_iRecordingVideoFrameRate; 280 /** Holds the recording bit rate. */ 281 int m_iRecordingVideoBitRate; 282 /** Holds which of the guest screens should be recorded. */ 283 QVector<BOOL> m_vecRecordingScreens; 284 /** Holds the video recording options. */ 285 QString m_strRecordingVideoOptions; 286 286 }; 287 287 … … 382 382 } 383 383 384 /* Gather old ' Capture' data: */385 CCaptureSettings captureSettings = m_machine.GetCaptureSettings();386 oldDisplayData.m_f VideoCaptureEnabled = captureSettings.GetEnabled();384 /* Gather old 'Recording' data: */ 385 CCaptureSettings recordingSettings = m_machine.GetCaptureSettings(); 386 oldDisplayData.m_fRecordingEnabled = recordingSettings.GetEnabled(); 387 387 388 388 /* For now we're using the same settings for all screens; so get settings from screen 0 and work with that. */ 389 CCaptureScreenSettings captureScreen0Settings = captureSettings.GetScreenSettings(0);390 if (! captureScreen0Settings.isNull())391 { 392 oldDisplayData.m_str VideoCaptureFolder = QFileInfo(m_machine.GetSettingsFilePath()).absolutePath();393 oldDisplayData.m_str VideoCaptureFilePath = captureScreen0Settings.GetFileName();394 oldDisplayData.m_i VideoCaptureFrameWidth = captureScreen0Settings.GetVideoWidth();395 oldDisplayData.m_i VideoCaptureFrameHeight = captureScreen0Settings.GetVideoHeight();396 oldDisplayData.m_i VideoCaptureFrameRate = captureScreen0Settings.GetVideoFPS();397 oldDisplayData.m_i VideoCaptureBitRate = captureScreen0Settings.GetVideoRate();398 oldDisplayData.m_str VideoCaptureOptions = captureScreen0Settings.GetOptions();399 } 400 401 CCaptureScreenSettingsVector captureScreenSettingsVector = captureSettings.GetScreens();402 for (int iScreenIndex = 0; iScreenIndex < captureScreenSettingsVector.size(); ++iScreenIndex)403 { 404 CCaptureScreenSettings captureScreenSettings = captureScreenSettingsVector.at(iScreenIndex);405 oldDisplayData.m_ screens[iScreenIndex] = captureScreenSettings.GetEnabled();389 CCaptureScreenSettings recordingScreen0Settings = recordingSettings.GetScreenSettings(0); 390 if (!recordingScreen0Settings.isNull()) 391 { 392 oldDisplayData.m_strRecordingFolder = QFileInfo(m_machine.GetSettingsFilePath()).absolutePath(); 393 oldDisplayData.m_strRecordingFilePath = recordingScreen0Settings.GetFileName(); 394 oldDisplayData.m_iRecordingVideoFrameWidth = recordingScreen0Settings.GetVideoWidth(); 395 oldDisplayData.m_iRecordingVideoFrameHeight = recordingScreen0Settings.GetVideoHeight(); 396 oldDisplayData.m_iRecordingVideoFrameRate = recordingScreen0Settings.GetVideoFPS(); 397 oldDisplayData.m_iRecordingVideoBitRate = recordingScreen0Settings.GetVideoRate(); 398 oldDisplayData.m_strRecordingVideoOptions = recordingScreen0Settings.GetOptions(); 399 } 400 401 CCaptureScreenSettingsVector recordingScreenSettingsVector = recordingSettings.GetScreens(); 402 for (int iScreenIndex = 0; iScreenIndex < recordingScreenSettingsVector.size(); ++iScreenIndex) 403 { 404 CCaptureScreenSettings captureScreenSettings = recordingScreenSettingsVector.at(iScreenIndex); 405 oldDisplayData.m_vecRecordingScreens[iScreenIndex] = captureScreenSettings.GetEnabled(); 406 406 } 407 407 … … 443 443 } 444 444 445 /* Load old ' Video Capture' data from the cache: */446 m_pCheckboxVideoCapture->setChecked(oldDisplayData.m_f VideoCaptureEnabled);447 m_pEditorVideoCapturePath->setHomeDir(oldDisplayData.m_str VideoCaptureFolder);448 m_pEditorVideoCapturePath->setPath(oldDisplayData.m_str VideoCaptureFilePath);449 m_pEditorVideoCaptureWidth->setValue(oldDisplayData.m_i VideoCaptureFrameWidth);450 m_pEditorVideoCaptureHeight->setValue(oldDisplayData.m_i VideoCaptureFrameHeight);451 m_pEditorVideoCaptureFrameRate->setValue(oldDisplayData.m_i VideoCaptureFrameRate);452 m_pEditorVideoCaptureBitRate->setValue(oldDisplayData.m_i VideoCaptureBitRate);453 m_pScrollerVideoCaptureScreens->setValue(oldDisplayData.m_ screens);454 455 /* Load data from old ' Video Capture Option': */456 bool f AudioCapture = UIDataSettingsMachineDisplay::isVideoCaptureOptionEnabled(oldDisplayData.m_strVideoCaptureOptions,457 UIDataSettingsMachineDisplay::VideoCaptureOption_AC);458 bool f VideoCapture = UIDataSettingsMachineDisplay::isVideoCaptureOptionEnabled(oldDisplayData.m_strVideoCaptureOptions,459 UIDataSettingsMachineDisplay::VideoCaptureOption_VC);460 if (f AudioCapture && fVideoCapture)461 m_pComboBoxCaptureMode->setCurrentIndex(static_cast<int>(UIDataSettingsMachineDisplay:: CaptureMode_VideoAudio));462 else if (f AudioCapture && !fVideoCapture)463 m_pComboBoxCaptureMode->setCurrentIndex(static_cast<int>(UIDataSettingsMachineDisplay:: CaptureMode_AudioOnly));445 /* Load old 'Recording' data from the cache: */ 446 m_pCheckboxVideoCapture->setChecked(oldDisplayData.m_fRecordingEnabled); 447 m_pEditorVideoCapturePath->setHomeDir(oldDisplayData.m_strRecordingFolder); 448 m_pEditorVideoCapturePath->setPath(oldDisplayData.m_strRecordingFilePath); 449 m_pEditorVideoCaptureWidth->setValue(oldDisplayData.m_iRecordingVideoFrameWidth); 450 m_pEditorVideoCaptureHeight->setValue(oldDisplayData.m_iRecordingVideoFrameHeight); 451 m_pEditorVideoCaptureFrameRate->setValue(oldDisplayData.m_iRecordingVideoFrameRate); 452 m_pEditorVideoCaptureBitRate->setValue(oldDisplayData.m_iRecordingVideoBitRate); 453 m_pScrollerVideoCaptureScreens->setValue(oldDisplayData.m_vecRecordingScreens); 454 455 /* Load data from old 'Recording option': */ 456 bool fRecordAudio = UIDataSettingsMachineDisplay::isRecordingOptionEnabled(oldDisplayData.m_strRecordingVideoOptions, 457 UIDataSettingsMachineDisplay::RecordingOption_AC); 458 bool fRecordVideo = UIDataSettingsMachineDisplay::isRecordingOptionEnabled(oldDisplayData.m_strRecordingVideoOptions, 459 UIDataSettingsMachineDisplay::RecordingOption_VC); 460 if (fRecordAudio && fRecordVideo) 461 m_pComboBoxCaptureMode->setCurrentIndex(static_cast<int>(UIDataSettingsMachineDisplay::RecordingMode_VideoAudio)); 462 else if (fRecordAudio && !fRecordVideo) 463 m_pComboBoxCaptureMode->setCurrentIndex(static_cast<int>(UIDataSettingsMachineDisplay::RecordingMode_AudioOnly)); 464 464 else 465 m_pComboBoxCaptureMode->setCurrentIndex(static_cast<int>(UIDataSettingsMachineDisplay:: CaptureMode_VideoOnly));466 467 m_pSliderAudioCaptureQuality->setValue(UIDataSettingsMachineDisplay::getAudioQualityFromOptions(oldDisplayData.m_str VideoCaptureOptions));465 m_pComboBoxCaptureMode->setCurrentIndex(static_cast<int>(UIDataSettingsMachineDisplay::RecordingMode_VideoOnly)); 466 467 m_pSliderAudioCaptureQuality->setValue(UIDataSettingsMachineDisplay::getAudioQualityFromOptions(oldDisplayData.m_strRecordingVideoOptions)); 468 468 469 469 /* Polish page finally: */ … … 500 500 } 501 501 502 /* Gather new ' Video Capture' data: */503 newDisplayData.m_f VideoCaptureEnabled = m_pCheckboxVideoCapture->isChecked();504 newDisplayData.m_str VideoCaptureFolder = m_pCache->base().m_strVideoCaptureFolder;505 newDisplayData.m_str VideoCaptureFilePath = m_pEditorVideoCapturePath->path();506 newDisplayData.m_i VideoCaptureFrameWidth = m_pEditorVideoCaptureWidth->value();507 newDisplayData.m_i VideoCaptureFrameHeight = m_pEditorVideoCaptureHeight->value();508 newDisplayData.m_i VideoCaptureFrameRate = m_pEditorVideoCaptureFrameRate->value();509 newDisplayData.m_i VideoCaptureBitRate = m_pEditorVideoCaptureBitRate->value();510 newDisplayData.m_ screens = m_pScrollerVideoCaptureScreens->value();511 512 /* Update video captureoptions */502 /* Gather new 'Recording' data: */ 503 newDisplayData.m_fRecordingEnabled = m_pCheckboxVideoCapture->isChecked(); 504 newDisplayData.m_strRecordingFolder = m_pCache->base().m_strRecordingFolder; 505 newDisplayData.m_strRecordingFilePath = m_pEditorVideoCapturePath->path(); 506 newDisplayData.m_iRecordingVideoFrameWidth = m_pEditorVideoCaptureWidth->value(); 507 newDisplayData.m_iRecordingVideoFrameHeight = m_pEditorVideoCaptureHeight->value(); 508 newDisplayData.m_iRecordingVideoFrameRate = m_pEditorVideoCaptureFrameRate->value(); 509 newDisplayData.m_iRecordingVideoBitRate = m_pEditorVideoCaptureBitRate->value(); 510 newDisplayData.m_vecRecordingScreens = m_pScrollerVideoCaptureScreens->value(); 511 512 /* Update recording options */ 513 513 QStringList optionValues; 514 optionValues.push_back((m_pComboBoxCaptureMode->currentIndex() == static_cast<int>(UIDataSettingsMachineDisplay:: CaptureMode_VideoAudio) ||515 m_pComboBoxCaptureMode->currentIndex() == static_cast<int>(UIDataSettingsMachineDisplay:: CaptureMode_VideoOnly)) ? "true" : "false");516 optionValues.push_back((m_pComboBoxCaptureMode->currentIndex() == static_cast<int>(UIDataSettingsMachineDisplay:: CaptureMode_VideoAudio) ||517 m_pComboBoxCaptureMode->currentIndex() == static_cast<int>(UIDataSettingsMachineDisplay:: CaptureMode_AudioOnly)) ? "true" : "false");514 optionValues.push_back((m_pComboBoxCaptureMode->currentIndex() == static_cast<int>(UIDataSettingsMachineDisplay::RecordingMode_VideoAudio) || 515 m_pComboBoxCaptureMode->currentIndex() == static_cast<int>(UIDataSettingsMachineDisplay::RecordingMode_VideoOnly)) ? "true" : "false"); 516 optionValues.push_back((m_pComboBoxCaptureMode->currentIndex() == static_cast<int>(UIDataSettingsMachineDisplay::RecordingMode_VideoAudio) || 517 m_pComboBoxCaptureMode->currentIndex() == static_cast<int>(UIDataSettingsMachineDisplay::RecordingMode_AudioOnly)) ? "true" : "false"); 518 518 if (m_pSliderAudioCaptureQuality->value() == 1) 519 519 optionValues.push_back("low"); … … 523 523 optionValues.push_back("high"); 524 524 525 QVector<UIDataSettingsMachineDisplay:: VideoCaptureOption> videoCaptureOptionVector;526 videoCaptureOptionVector.push_back(UIDataSettingsMachineDisplay::VideoCaptureOption_VC);527 videoCaptureOptionVector.push_back(UIDataSettingsMachineDisplay::VideoCaptureOption_AC);528 videoCaptureOptionVector.push_back(UIDataSettingsMachineDisplay::VideoCaptureOption_AC_Profile);529 530 newDisplayData.m_str VideoCaptureOptions = UIDataSettingsMachineDisplay::setVideoCaptureOptions(m_pCache->base().m_strVideoCaptureOptions,531 videoCaptureOptionVector,525 QVector<UIDataSettingsMachineDisplay::RecordingOption> recordingOptionsVector; 526 recordingOptionsVector.push_back(UIDataSettingsMachineDisplay::RecordingOption_VC); 527 recordingOptionsVector.push_back(UIDataSettingsMachineDisplay::RecordingOption_AC); 528 recordingOptionsVector.push_back(UIDataSettingsMachineDisplay::RecordingOption_AC_Profile); 529 530 newDisplayData.m_strRecordingVideoOptions = UIDataSettingsMachineDisplay::setRecordingOptions(m_pCache->base().m_strRecordingVideoOptions, 531 recordingOptionsVector, 532 532 optionValues); 533 533 … … 688 688 setTabOrder(m_pEditorRemoteDisplayTimeout, m_pCheckboxMultipleConn); 689 689 690 /* Video Capturetab-order: */690 /* Recording tab-order: */ 691 691 setTabOrder(m_pCheckboxMultipleConn, m_pCheckboxVideoCapture); 692 692 setTabOrder(m_pCheckboxVideoCapture, m_pEditorVideoCapturePath); … … 718 718 m_pComboRemoteDisplayAuthMethod->setItemText(2, gpConverter->toString(KAuthType_Guest)); 719 719 720 /* Video Capturestuff: */720 /* Recording stuff: */ 721 721 m_pEditorVideoCaptureFrameRate->setSuffix(QString(" %1").arg(tr("fps"))); 722 722 m_pEditorVideoCaptureBitRate->setSuffix(QString(" %1").arg(tr("kbps"))); … … 730 730 m_pLabelAudioCaptureQualityMed->setText(tr("medium", "quality")); 731 731 m_pLabelAudioCaptureQualityMax->setText(tr("high", "quality")); 732 update VideoCaptureFileSizeHint();732 updateRecordingFileSizeHint(); 733 733 } 734 734 … … 765 765 m_pCheckboxMultipleConn->setEnabled(isMachineOffline() || isMachineSaved()); 766 766 767 /* Polish ' Video Capture' availability: */767 /* Polish 'Recording' availability: */ 768 768 m_pContainerVideoCapture->setEnabled(isMachineInValidMode()); 769 sltHandle VideoCaptureCheckboxToggle();769 sltHandleRecordingCheckboxToggle(); 770 770 } 771 771 … … 802 802 checkVRAMRequirements(); 803 803 804 /* Update Video Capturetab screen count: */804 /* Update recording tab screen count: */ 805 805 updateGuestScreenCount(); 806 806 … … 819 819 checkVRAMRequirements(); 820 820 821 /* Update Video Capturetab screen count: */821 /* Update recording tab screen count: */ 822 822 updateGuestScreenCount(); 823 823 … … 826 826 } 827 827 828 void UIMachineSettingsDisplay::sltHandle VideoCaptureCheckboxToggle()829 { 830 /* Video Captureoptions should be enabled only if:828 void UIMachineSettingsDisplay::sltHandleRecordingCheckboxToggle() 829 { 830 /* Recording options should be enabled only if: 831 831 * 1. Machine is in 'offline' or 'saved' state and check-box is checked, 832 832 * 2. Machine is in 'online' state, check-box is checked, and video recording is *disabled* currently. */ 833 const bool fIs VideoCaptureOptionsEnabled = ((isMachineOffline() || isMachineSaved()) && m_pCheckboxVideoCapture->isChecked()) ||834 (isMachineOnline() && !m_pCache->base().m_f VideoCaptureEnabled && m_pCheckboxVideoCapture->isChecked());835 836 m_pLabelCaptureMode->setEnabled(fIs VideoCaptureOptionsEnabled);837 m_pComboBoxCaptureMode->setEnabled(fIs VideoCaptureOptionsEnabled);838 839 m_pLabelVideoCapturePath->setEnabled(fIs VideoCaptureOptionsEnabled);840 m_pEditorVideoCapturePath->setEnabled(fIs VideoCaptureOptionsEnabled);841 842 enableDisable CaptureWidgets();843 } 844 845 void UIMachineSettingsDisplay::sltHandle VideoCaptureFrameSizeComboboxChange()833 const bool fIsRecordingOptionsEnabled = ((isMachineOffline() || isMachineSaved()) && m_pCheckboxVideoCapture->isChecked()) || 834 (isMachineOnline() && !m_pCache->base().m_fRecordingEnabled && m_pCheckboxVideoCapture->isChecked()); 835 836 m_pLabelCaptureMode->setEnabled(fIsRecordingOptionsEnabled); 837 m_pComboBoxCaptureMode->setEnabled(fIsRecordingOptionsEnabled); 838 839 m_pLabelVideoCapturePath->setEnabled(fIsRecordingOptionsEnabled); 840 m_pEditorVideoCapturePath->setEnabled(fIsRecordingOptionsEnabled); 841 842 enableDisableRecordingWidgets(); 843 } 844 845 void UIMachineSettingsDisplay::sltHandleRecordingVideoFrameSizeComboboxChange() 846 846 { 847 847 /* Get the proposed size: */ … … 858 858 } 859 859 860 void UIMachineSettingsDisplay::sltHandle VideoCaptureFrameWidthEditorChange()860 void UIMachineSettingsDisplay::sltHandleRecordingVideoFrameWidthEditorChange() 861 861 { 862 862 /* Look for preset: */ 863 863 lookForCorrespondingFrameSizePreset(); 864 864 /* Update quality and bit-rate: */ 865 sltHandle VideoCaptureQualitySliderChange();866 } 867 868 void UIMachineSettingsDisplay::sltHandle VideoCaptureFrameHeightEditorChange()865 sltHandleRecordingVideoQualitySliderChange(); 866 } 867 868 void UIMachineSettingsDisplay::sltHandleRecordingVideoFrameHeightEditorChange() 869 869 { 870 870 /* Look for preset: */ 871 871 lookForCorrespondingFrameSizePreset(); 872 872 /* Update quality and bit-rate: */ 873 sltHandle VideoCaptureQualitySliderChange();874 } 875 876 void UIMachineSettingsDisplay::sltHandle VideoCaptureFrameRateSliderChange()873 sltHandleRecordingVideoQualitySliderChange(); 874 } 875 876 void UIMachineSettingsDisplay::sltHandleRecordingVideoFrameRateSliderChange() 877 877 { 878 878 /* Apply proposed frame-rate: */ … … 881 881 m_pEditorVideoCaptureFrameRate->blockSignals(false); 882 882 /* Update quality and bit-rate: */ 883 sltHandle VideoCaptureQualitySliderChange();884 } 885 886 void UIMachineSettingsDisplay::sltHandle VideoCaptureFrameRateEditorChange()883 sltHandleRecordingVideoQualitySliderChange(); 884 } 885 886 void UIMachineSettingsDisplay::sltHandleRecordingVideoFrameRateEditorChange() 887 887 { 888 888 /* Apply proposed frame-rate: */ … … 891 891 m_pSliderVideoCaptureFrameRate->blockSignals(false); 892 892 /* Update quality and bit-rate: */ 893 sltHandle VideoCaptureQualitySliderChange();894 } 895 896 void UIMachineSettingsDisplay::sltHandle VideoCaptureQualitySliderChange()893 sltHandleRecordingVideoQualitySliderChange(); 894 } 895 896 void UIMachineSettingsDisplay::sltHandleRecordingVideoQualitySliderChange() 897 897 { 898 898 /* Calculate/apply proposed bit-rate: */ … … 903 903 m_pSliderVideoCaptureQuality->value())); 904 904 m_pEditorVideoCaptureBitRate->blockSignals(false); 905 update VideoCaptureFileSizeHint();906 } 907 908 void UIMachineSettingsDisplay::sltHandle VideoCaptureBitRateEditorChange()905 updateRecordingFileSizeHint(); 906 } 907 908 void UIMachineSettingsDisplay::sltHandleRecordingVideoBitRateEditorChange() 909 909 { 910 910 /* Calculate/apply proposed quality: */ … … 915 915 m_pEditorVideoCaptureBitRate->value())); 916 916 m_pSliderVideoCaptureQuality->blockSignals(false); 917 update VideoCaptureFileSizeHint();918 } 919 920 void UIMachineSettingsDisplay::sltHandle CaptureComboBoxChange()921 { 922 enableDisable CaptureWidgets();917 updateRecordingFileSizeHint(); 918 } 919 920 void UIMachineSettingsDisplay::sltHandleRecordingComboBoxChange() 921 { 922 enableDisableRecordingWidgets(); 923 923 } 924 924 … … 938 938 /* Prepare 'Remote Display' tab: */ 939 939 prepareTabRemoteDisplay(); 940 /* Prepare ' Video Capture' tab: */941 prepareTab VideoCapture();940 /* Prepare 'Recording' tab: */ 941 prepareTabRecording(); 942 942 /* Prepare connections: */ 943 943 prepareConnections(); … … 1045 1045 } 1046 1046 1047 void UIMachineSettingsDisplay::prepareTab VideoCapture()1047 void UIMachineSettingsDisplay::prepareTabRecording() 1048 1048 { 1049 1049 /* Tab and it's layout created in the .ui file. */ … … 1052 1052 AssertPtrReturnVoid(m_pComboBoxCaptureMode); 1053 1053 { 1054 m_pComboBoxCaptureMode->insertItem(UIDataSettingsMachineDisplay:: CaptureMode_VideoAudio, "Video/Audio");1055 m_pComboBoxCaptureMode->insertItem(UIDataSettingsMachineDisplay:: CaptureMode_VideoOnly, "Video Only");1056 m_pComboBoxCaptureMode->insertItem(UIDataSettingsMachineDisplay:: CaptureMode_AudioOnly, "Audio Only");1054 m_pComboBoxCaptureMode->insertItem(UIDataSettingsMachineDisplay::RecordingMode_VideoAudio, "Video/Audio"); 1055 m_pComboBoxCaptureMode->insertItem(UIDataSettingsMachineDisplay::RecordingMode_VideoOnly, "Video Only"); 1056 m_pComboBoxCaptureMode->insertItem(UIDataSettingsMachineDisplay::RecordingMode_AudioOnly, "Audio Only"); 1057 1057 } 1058 1058 … … 1195 1195 connect(m_pEditorRemoteDisplayTimeout, SIGNAL(textChanged(const QString &)), this, SLOT(revalidate())); 1196 1196 1197 /* Configure ' Video Capture' connections: */1198 connect(m_pCheckboxVideoCapture, SIGNAL(toggled(bool)), this, SLOT(sltHandle VideoCaptureCheckboxToggle()));1199 connect(m_pComboVideoCaptureSize, SIGNAL(currentIndexChanged(int)), this, SLOT(sltHandle VideoCaptureFrameSizeComboboxChange()));1200 connect(m_pEditorVideoCaptureWidth, SIGNAL(valueChanged(int)), this, SLOT(sltHandle VideoCaptureFrameWidthEditorChange()));1201 connect(m_pEditorVideoCaptureHeight, SIGNAL(valueChanged(int)), this, SLOT(sltHandle VideoCaptureFrameHeightEditorChange()));1202 connect(m_pSliderVideoCaptureFrameRate, SIGNAL(valueChanged(int)), this, SLOT(sltHandle VideoCaptureFrameRateSliderChange()));1203 connect(m_pEditorVideoCaptureFrameRate, SIGNAL(valueChanged(int)), this, SLOT(sltHandle VideoCaptureFrameRateEditorChange()));1204 connect(m_pSliderVideoCaptureQuality, SIGNAL(valueChanged(int)), this, SLOT(sltHandle VideoCaptureQualitySliderChange()));1205 connect(m_pEditorVideoCaptureBitRate, SIGNAL(valueChanged(int)), this, SLOT(sltHandle VideoCaptureBitRateEditorChange()));1197 /* Configure 'Recording' connections: */ 1198 connect(m_pCheckboxVideoCapture, SIGNAL(toggled(bool)), this, SLOT(sltHandleRecordingCheckboxToggle())); 1199 connect(m_pComboVideoCaptureSize, SIGNAL(currentIndexChanged(int)), this, SLOT(sltHandleRecordingVideoFrameSizeComboboxChange())); 1200 connect(m_pEditorVideoCaptureWidth, SIGNAL(valueChanged(int)), this, SLOT(sltHandleRecordingVideoFrameWidthEditorChange())); 1201 connect(m_pEditorVideoCaptureHeight, SIGNAL(valueChanged(int)), this, SLOT(sltHandleRecordingVideoFrameHeightEditorChange())); 1202 connect(m_pSliderVideoCaptureFrameRate, SIGNAL(valueChanged(int)), this, SLOT(sltHandleRecordingVideoFrameRateSliderChange())); 1203 connect(m_pEditorVideoCaptureFrameRate, SIGNAL(valueChanged(int)), this, SLOT(sltHandleRecordingVideoFrameRateEditorChange())); 1204 connect(m_pSliderVideoCaptureQuality, SIGNAL(valueChanged(int)), this, SLOT(sltHandleRecordingVideoQualitySliderChange())); 1205 connect(m_pEditorVideoCaptureBitRate, SIGNAL(valueChanged(int)), this, SLOT(sltHandleRecordingVideoBitRateEditorChange())); 1206 1206 1207 1207 connect(m_pComboBoxCaptureMode, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged), 1208 this, &UIMachineSettingsDisplay::sltHandle CaptureComboBoxChange);1208 this, &UIMachineSettingsDisplay::sltHandleRecordingComboBoxChange); 1209 1209 } 1210 1210 … … 1305 1305 { 1306 1306 /* Update copy of the cached item to get the desired result: */ 1307 QVector<BOOL> screens = m_pCache->base().m_ screens;1307 QVector<BOOL> screens = m_pCache->base().m_vecRecordingScreens; 1308 1308 screens.resize(m_pEditorVideoScreenCount->value()); 1309 1309 m_pScrollerVideoCaptureScreens->setValue(screens); … … 1311 1311 } 1312 1312 1313 void UIMachineSettingsDisplay::update VideoCaptureFileSizeHint()1313 void UIMachineSettingsDisplay::updateRecordingFileSizeHint() 1314 1314 { 1315 1315 m_pLabelVideoCaptureSizeHint->setText(tr("<i>About %1MB per 5 minute video</i>").arg(m_pEditorVideoCaptureBitRate->value() * 300 / 8 / 1024)); … … 1366 1366 /* Save 'Video Capture' data from the cache: */ 1367 1367 if (fSuccess) 1368 fSuccess = save VideoCaptureData();1368 fSuccess = saveRecordingData(); 1369 1369 } 1370 1370 /* Return result: */ … … 1496 1496 } 1497 1497 1498 bool UIMachineSettingsDisplay::save VideoCaptureData()1498 bool UIMachineSettingsDisplay::saveRecordingData() 1499 1499 { 1500 1500 /* Prepare result: */ 1501 1501 bool fSuccess = true; 1502 /* Save ' Video Capture' data from the cache: */1502 /* Save 'Recording' data from the cache: */ 1503 1503 if (fSuccess) 1504 1504 { … … 1508 1508 const UIDataSettingsMachineDisplay &newDisplayData = m_pCache->data(); 1509 1509 1510 CCaptureSettings captureSettings = m_machine.GetCaptureSettings();1511 1512 /* Save new ' Video Capture' data for online case: */1510 CCaptureSettings recordingSettings = m_machine.GetCaptureSettings(); 1511 1512 /* Save new 'Recording' data for online case: */ 1513 1513 if (isMachineOnline()) 1514 1514 { 1515 /* If ' Video Capture' was *enabled*: */1516 if (oldDisplayData.m_f VideoCaptureEnabled)1515 /* If 'Recording' was *enabled*: */ 1516 if (oldDisplayData.m_fRecordingEnabled) 1517 1517 { 1518 /* Save whether captureis enabled: */1519 if (fSuccess && newDisplayData.m_f VideoCaptureEnabled != oldDisplayData.m_fVideoCaptureEnabled)1518 /* Save whether recording is enabled: */ 1519 if (fSuccess && newDisplayData.m_fRecordingEnabled != oldDisplayData.m_fRecordingEnabled) 1520 1520 { 1521 captureSettings.SetEnabled(newDisplayData.m_fVideoCaptureEnabled);1522 fSuccess = captureSettings.isOk();1521 recordingSettings.SetEnabled(newDisplayData.m_fRecordingEnabled); 1522 fSuccess = recordingSettings.isOk(); 1523 1523 } 1524 1524 1525 1525 // We can still save the *screens* option. 1526 /* Save video capturescreens: */1527 if (fSuccess && newDisplayData.m_ screens != oldDisplayData.m_screens)1526 /* Save recording screens: */ 1527 if (fSuccess && newDisplayData.m_vecRecordingScreens != oldDisplayData.m_vecRecordingScreens) 1528 1528 { 1529 CCaptureScreenSettingsVector captureScreenSettingsVector = captureSettings.GetScreens();1529 CCaptureScreenSettingsVector captureScreenSettingsVector = recordingSettings.GetScreens(); 1530 1530 for (int iScreenIndex = 0; fSuccess && iScreenIndex < captureScreenSettingsVector.size(); ++iScreenIndex) 1531 1531 { 1532 CCaptureScreenSettings captureScreenSettings = captureScreenSettingsVector.at(iScreenIndex);1533 captureScreenSettings.SetEnabled(newDisplayData.m_screens[iScreenIndex]);1534 fSuccess = captureScreenSettings.isOk();1532 CCaptureScreenSettings recordingScreenSettings = captureScreenSettingsVector.at(iScreenIndex); 1533 recordingScreenSettings.SetEnabled(newDisplayData.m_vecRecordingScreens[iScreenIndex]); 1534 fSuccess = recordingScreenSettings.isOk(); 1535 1535 } 1536 1536 } 1537 1537 } 1538 /* If ' Video Capture' was *disabled*: */1538 /* If 'Recording' was *disabled*: */ 1539 1539 else 1540 1540 { 1541 /* Save whether captureis enabled: */1542 if (fSuccess && newDisplayData.m_f VideoCaptureEnabled != oldDisplayData.m_fVideoCaptureEnabled)1541 /* Save whether recording is enabled: */ 1542 if (fSuccess && newDisplayData.m_fRecordingEnabled != oldDisplayData.m_fRecordingEnabled) 1543 1543 { 1544 captureSettings.SetEnabled(newDisplayData.m_fVideoCaptureEnabled);1545 fSuccess = captureSettings.isOk();1544 recordingSettings.SetEnabled(newDisplayData.m_fRecordingEnabled); 1545 fSuccess = recordingSettings.isOk(); 1546 1546 } 1547 1547 1548 CCaptureScreenSettingsVector captureScreenSettingsVector = captureSettings.GetScreens();1549 for (int iScreenIndex = 0; fSuccess && iScreenIndex < captureScreenSettingsVector.size(); ++iScreenIndex)1548 CCaptureScreenSettingsVector recordingScreenSettingsVector = recordingSettings.GetScreens(); 1549 for (int iScreenIndex = 0; fSuccess && iScreenIndex < recordingScreenSettingsVector.size(); ++iScreenIndex) 1550 1550 { 1551 CCaptureScreenSettings captureScreenSettings = captureScreenSettingsVector.at(iScreenIndex);1552 1553 // We should save all the options *before* ' Video Capture' activation.1554 // And finally we should *enable* Video Captureif necessary.1555 /* Save video capturefile path: */1556 if (fSuccess && newDisplayData.m_str VideoCaptureFilePath != oldDisplayData.m_strVideoCaptureFilePath)1551 CCaptureScreenSettings recordingScreenSettings = recordingScreenSettingsVector.at(iScreenIndex); 1552 1553 // We should save all the options *before* 'Recording' activation. 1554 // And finally we should *enable* Recording if necessary. 1555 /* Save recording file path: */ 1556 if (fSuccess && newDisplayData.m_strRecordingFilePath != oldDisplayData.m_strRecordingFilePath) 1557 1557 { 1558 captureScreenSettings.SetFileName(newDisplayData.m_strVideoCaptureFilePath);1559 fSuccess = captureScreenSettings.isOk();1558 recordingScreenSettings.SetFileName(newDisplayData.m_strRecordingFilePath); 1559 fSuccess = recordingScreenSettings.isOk(); 1560 1560 } 1561 /* Save video captureframe width: */1562 if (fSuccess && newDisplayData.m_i VideoCaptureFrameWidth != oldDisplayData.m_iVideoCaptureFrameWidth)1561 /* Save recording frame width: */ 1562 if (fSuccess && newDisplayData.m_iRecordingVideoFrameWidth != oldDisplayData.m_iRecordingVideoFrameWidth) 1563 1563 { 1564 captureScreenSettings.SetVideoWidth(newDisplayData.m_iVideoCaptureFrameWidth);1565 fSuccess = captureScreenSettings.isOk();1564 recordingScreenSettings.SetVideoWidth(newDisplayData.m_iRecordingVideoFrameWidth); 1565 fSuccess = recordingScreenSettings.isOk(); 1566 1566 } 1567 /* Save video captureframe height: */1568 if (fSuccess && newDisplayData.m_i VideoCaptureFrameHeight != oldDisplayData.m_iVideoCaptureFrameHeight)1567 /* Save recording frame height: */ 1568 if (fSuccess && newDisplayData.m_iRecordingVideoFrameHeight != oldDisplayData.m_iRecordingVideoFrameHeight) 1569 1569 { 1570 captureScreenSettings.SetVideoHeight(newDisplayData.m_iVideoCaptureFrameHeight);1571 fSuccess = captureScreenSettings.isOk();1570 recordingScreenSettings.SetVideoHeight(newDisplayData.m_iRecordingVideoFrameHeight); 1571 fSuccess = recordingScreenSettings.isOk(); 1572 1572 } 1573 /* Save video captureframe rate: */1574 if (fSuccess && newDisplayData.m_i VideoCaptureFrameRate != oldDisplayData.m_iVideoCaptureFrameRate)1573 /* Save recording frame rate: */ 1574 if (fSuccess && newDisplayData.m_iRecordingVideoFrameRate != oldDisplayData.m_iRecordingVideoFrameRate) 1575 1575 { 1576 captureScreenSettings.SetVideoFPS(newDisplayData.m_iVideoCaptureFrameRate);1577 fSuccess = captureScreenSettings.isOk();1576 recordingScreenSettings.SetVideoFPS(newDisplayData.m_iRecordingVideoFrameRate); 1577 fSuccess = recordingScreenSettings.isOk(); 1578 1578 } 1579 /* Save video captureframe bit rate: */1580 if (fSuccess && newDisplayData.m_i VideoCaptureBitRate != oldDisplayData.m_iVideoCaptureBitRate)1579 /* Save recording frame bit rate: */ 1580 if (fSuccess && newDisplayData.m_iRecordingVideoBitRate != oldDisplayData.m_iRecordingVideoBitRate) 1581 1581 { 1582 captureScreenSettings.SetVideoRate(newDisplayData.m_iVideoCaptureBitRate);1583 fSuccess = captureScreenSettings.isOk();1582 recordingScreenSettings.SetVideoRate(newDisplayData.m_iRecordingVideoBitRate); 1583 fSuccess = recordingScreenSettings.isOk(); 1584 1584 } 1585 /* Save video capturescreens: */1586 if (fSuccess && newDisplayData.m_ screens != oldDisplayData.m_screens)1585 /* Save recording screens: */ 1586 if (fSuccess && newDisplayData.m_vecRecordingScreens != oldDisplayData.m_vecRecordingScreens) 1587 1587 { 1588 captureScreenSettings.SetEnabled(newDisplayData.m_screens[iScreenIndex]);1589 fSuccess = captureScreenSettings.isOk();1588 recordingScreenSettings.SetEnabled(newDisplayData.m_vecRecordingScreens[iScreenIndex]); 1589 fSuccess = recordingScreenSettings.isOk(); 1590 1590 } 1591 /* Save video captureoptions: */1592 if (fSuccess && newDisplayData.m_str VideoCaptureOptions != oldDisplayData.m_strVideoCaptureOptions)1591 /* Save recording options: */ 1592 if (fSuccess && newDisplayData.m_strRecordingVideoOptions != oldDisplayData.m_strRecordingVideoOptions) 1593 1593 { 1594 captureScreenSettings.SetOptions(newDisplayData.m_strVideoCaptureOptions);1595 fSuccess = captureScreenSettings.isOk();1594 recordingScreenSettings.SetOptions(newDisplayData.m_strRecordingVideoOptions); 1595 fSuccess = recordingScreenSettings.isOk(); 1596 1596 } 1597 1597 } 1598 1598 } 1599 1599 } 1600 /* Save new ' Video Capture' data for offline case: */1600 /* Save new 'Recording' data for offline case: */ 1601 1601 else 1602 1602 { 1603 1603 // For 'offline', 'powered off' and 'saved' states the order is irrelevant. 1604 /* Save whether video captureis enabled: */1605 if (fSuccess && newDisplayData.m_f VideoCaptureEnabled != oldDisplayData.m_fVideoCaptureEnabled)1604 /* Save whether recording is enabled: */ 1605 if (fSuccess && newDisplayData.m_fRecordingEnabled != oldDisplayData.m_fRecordingEnabled) 1606 1606 { 1607 captureSettings.SetEnabled(newDisplayData.m_fVideoCaptureEnabled);1608 fSuccess = captureSettings.isOk();1607 recordingSettings.SetEnabled(newDisplayData.m_fRecordingEnabled); 1608 fSuccess = recordingSettings.isOk(); 1609 1609 } 1610 1610 1611 CCaptureScreenSettingsVector captureScreenSettingsVector = captureSettings.GetScreens();1612 for (int iScreenIndex = 0; fSuccess && iScreenIndex < captureScreenSettingsVector.size(); ++iScreenIndex)1611 CCaptureScreenSettingsVector recordingScreenSettingsVector = recordingSettings.GetScreens(); 1612 for (int iScreenIndex = 0; fSuccess && iScreenIndex < recordingScreenSettingsVector.size(); ++iScreenIndex) 1613 1613 { 1614 CCaptureScreenSettings captureScreenSettings = captureScreenSettingsVector.at(iScreenIndex);1615 1616 /* Save video capturefile path: */1617 if (fSuccess && newDisplayData.m_str VideoCaptureFilePath != oldDisplayData.m_strVideoCaptureFilePath)1614 CCaptureScreenSettings recordingScreenSettings = recordingScreenSettingsVector.at(iScreenIndex); 1615 1616 /* Save recording file path: */ 1617 if (fSuccess && newDisplayData.m_strRecordingFilePath != oldDisplayData.m_strRecordingFilePath) 1618 1618 { 1619 captureScreenSettings.SetFileName(newDisplayData.m_strVideoCaptureFilePath);1620 fSuccess = captureScreenSettings.isOk();1619 recordingScreenSettings.SetFileName(newDisplayData.m_strRecordingFilePath); 1620 fSuccess = recordingScreenSettings.isOk(); 1621 1621 } 1622 /* Save video captureframe width: */1623 if (fSuccess && newDisplayData.m_i VideoCaptureFrameWidth != oldDisplayData.m_iVideoCaptureFrameWidth)1622 /* Save recording frame width: */ 1623 if (fSuccess && newDisplayData.m_iRecordingVideoFrameWidth != oldDisplayData.m_iRecordingVideoFrameWidth) 1624 1624 { 1625 captureScreenSettings.SetVideoWidth(newDisplayData.m_iVideoCaptureFrameWidth);1626 fSuccess = captureScreenSettings.isOk();1625 recordingScreenSettings.SetVideoWidth(newDisplayData.m_iRecordingVideoFrameWidth); 1626 fSuccess = recordingScreenSettings.isOk(); 1627 1627 } 1628 /* Save video captureframe height: */1629 if (fSuccess && newDisplayData.m_i VideoCaptureFrameHeight != oldDisplayData.m_iVideoCaptureFrameHeight)1628 /* Save recording frame height: */ 1629 if (fSuccess && newDisplayData.m_iRecordingVideoFrameHeight != oldDisplayData.m_iRecordingVideoFrameHeight) 1630 1630 { 1631 captureScreenSettings.SetVideoHeight(newDisplayData.m_iVideoCaptureFrameHeight);1632 fSuccess = captureScreenSettings.isOk();1631 recordingScreenSettings.SetVideoHeight(newDisplayData.m_iRecordingVideoFrameHeight); 1632 fSuccess = recordingScreenSettings.isOk(); 1633 1633 } 1634 /* Save video captureframe rate: */1635 if (fSuccess && newDisplayData.m_i VideoCaptureFrameRate != oldDisplayData.m_iVideoCaptureFrameRate)1634 /* Save recording frame rate: */ 1635 if (fSuccess && newDisplayData.m_iRecordingVideoFrameRate != oldDisplayData.m_iRecordingVideoFrameRate) 1636 1636 { 1637 captureScreenSettings.SetVideoFPS(newDisplayData.m_iVideoCaptureFrameRate);1638 fSuccess = captureScreenSettings.isOk();1637 recordingScreenSettings.SetVideoFPS(newDisplayData.m_iRecordingVideoFrameRate); 1638 fSuccess = recordingScreenSettings.isOk(); 1639 1639 } 1640 /* Save video captureframe bit rate: */1641 if (fSuccess && newDisplayData.m_i VideoCaptureBitRate != oldDisplayData.m_iVideoCaptureBitRate)1640 /* Save recording frame bit rate: */ 1641 if (fSuccess && newDisplayData.m_iRecordingVideoBitRate != oldDisplayData.m_iRecordingVideoBitRate) 1642 1642 { 1643 captureScreenSettings.SetVideoRate(newDisplayData.m_iVideoCaptureBitRate);1644 fSuccess = captureScreenSettings.isOk();1643 recordingScreenSettings.SetVideoRate(newDisplayData.m_iRecordingVideoBitRate); 1644 fSuccess = recordingScreenSettings.isOk(); 1645 1645 } 1646 1646 /* Save capture options: */ 1647 if (fSuccess && newDisplayData.m_str VideoCaptureOptions != oldDisplayData.m_strVideoCaptureOptions)1647 if (fSuccess && newDisplayData.m_strRecordingVideoOptions != oldDisplayData.m_strRecordingVideoOptions) 1648 1648 { 1649 captureScreenSettings.SetOptions(newDisplayData.m_strVideoCaptureOptions);1650 fSuccess = captureScreenSettings.isOk();1649 recordingScreenSettings.SetOptions(newDisplayData.m_strRecordingVideoOptions); 1650 fSuccess = recordingScreenSettings.isOk(); 1651 1651 } 1652 1652 /* Save screen enabled state: */ 1653 if (fSuccess && newDisplayData.m_ screens != oldDisplayData.m_screens)1653 if (fSuccess && newDisplayData.m_vecRecordingScreens != oldDisplayData.m_vecRecordingScreens) 1654 1654 { 1655 captureScreenSettings.SetEnabled(newDisplayData.m_screens[iScreenIndex]);1656 fSuccess = captureScreenSettings.isOk();1655 recordingScreenSettings.SetEnabled(newDisplayData.m_vecRecordingScreens[iScreenIndex]); 1656 fSuccess = recordingScreenSettings.isOk(); 1657 1657 } 1658 1658 } … … 1667 1667 } 1668 1668 1669 void UIMachineSettingsDisplay::enableDisable CaptureWidgets()1670 { 1671 /* Video Captureoptions should be enabled only if:1669 void UIMachineSettingsDisplay::enableDisableRecordingWidgets() 1670 { 1671 /* Recording options should be enabled only if: 1672 1672 * 1. Machine is in 'offline' or 'saved' state and check-box is checked, 1673 1673 * 2. Machine is in 'online' state, check-box is checked, and video recording is *disabled* currently. */ 1674 const bool fIs VideoCaptureOptionsEnabled = ((isMachineOffline() || isMachineSaved()) && m_pCheckboxVideoCapture->isChecked()) ||1675 (isMachineOnline() && !m_pCache->base().m_fVideoCaptureEnabled && m_pCheckboxVideoCapture->isChecked());1676 1677 const UIDataSettingsMachineDisplay:: CaptureMode enmCaptureMode =1678 static_cast<UIDataSettingsMachineDisplay:: CaptureMode>(m_pComboBoxCaptureMode->currentIndex());1674 const bool fIsRecordingOptionsEnabled = ((isMachineOffline() || isMachineSaved()) && m_pCheckboxVideoCapture->isChecked()) || 1675 (isMachineOnline() && !m_pCache->base().m_fRecordingEnabled && m_pCheckboxVideoCapture->isChecked()); 1676 1677 const UIDataSettingsMachineDisplay::RecordingMode enmRecordingMode = 1678 static_cast<UIDataSettingsMachineDisplay::RecordingMode>(m_pComboBoxCaptureMode->currentIndex()); 1679 1679 1680 1680 /* Video Capture Screens option should be enabled only if: … … 1682 1682 const bool fIsVideoCaptureScreenOptionEnabled = isMachineInValidMode() && m_pCheckboxVideoCapture->isChecked(); 1683 1683 1684 bool f VideoCapture = enmCaptureMode == UIDataSettingsMachineDisplay::CaptureMode_VideoOnly ||1685 enm CaptureMode == UIDataSettingsMachineDisplay::CaptureMode_VideoAudio;1686 bool f AudioCapture = enmCaptureMode == UIDataSettingsMachineDisplay::CaptureMode_AudioOnly ||1687 enm CaptureMode == UIDataSettingsMachineDisplay::CaptureMode_VideoAudio;1688 1689 m_pLabelVideoCaptureSize->setEnabled(fIs VideoCaptureOptionsEnabled && fVideoCapture);1690 m_pComboVideoCaptureSize->setEnabled(fIs VideoCaptureOptionsEnabled && fVideoCapture);1691 m_pEditorVideoCaptureWidth->setEnabled(fIs VideoCaptureOptionsEnabled && fVideoCapture);1692 m_pEditorVideoCaptureHeight->setEnabled(fIs VideoCaptureOptionsEnabled && fVideoCapture);1693 1694 m_pLabelVideoCaptureFrameRate->setEnabled(fIs VideoCaptureOptionsEnabled && fVideoCapture);1695 m_pContainerSliderVideoCaptureFrameRate->setEnabled(fIs VideoCaptureOptionsEnabled && fVideoCapture);1696 m_pEditorVideoCaptureFrameRate->setEnabled(fIs VideoCaptureOptionsEnabled && fVideoCapture);1697 1698 m_pLabelVideoCaptureRate->setEnabled(fIs VideoCaptureOptionsEnabled && fVideoCapture);1699 m_pContainerSliderVideoCaptureQuality->setEnabled(fIs VideoCaptureOptionsEnabled && fVideoCapture);1700 m_pEditorVideoCaptureBitRate->setEnabled(fIs VideoCaptureOptionsEnabled && fVideoCapture);1701 m_pScrollerVideoCaptureScreens->setEnabled(fIsVideoCaptureScreenOptionEnabled && f VideoCapture);1702 1703 m_pAudioCaptureQualityLabel->setEnabled(fIs VideoCaptureOptionsEnabled && fAudioCapture);1704 m_pContainerSliderAudioCaptureQuality->setEnabled(fIs VideoCaptureOptionsEnabled && fAudioCapture);1705 1706 m_pLabelVideoCaptureScreens->setEnabled(fIsVideoCaptureScreenOptionEnabled && f VideoCapture);1707 m_pLabelVideoCaptureSizeHint->setEnabled(fIsVideoCaptureScreenOptionEnabled && f VideoCapture);1708 } 1684 bool fRecordVideo = enmRecordingMode == UIDataSettingsMachineDisplay::RecordingMode_VideoOnly || 1685 enmRecordingMode == UIDataSettingsMachineDisplay::RecordingMode_VideoAudio; 1686 bool fRecordAudio = enmRecordingMode == UIDataSettingsMachineDisplay::RecordingMode_AudioOnly || 1687 enmRecordingMode == UIDataSettingsMachineDisplay::RecordingMode_VideoAudio; 1688 1689 m_pLabelVideoCaptureSize->setEnabled(fIsRecordingOptionsEnabled && fRecordVideo); 1690 m_pComboVideoCaptureSize->setEnabled(fIsRecordingOptionsEnabled && fRecordVideo); 1691 m_pEditorVideoCaptureWidth->setEnabled(fIsRecordingOptionsEnabled && fRecordVideo); 1692 m_pEditorVideoCaptureHeight->setEnabled(fIsRecordingOptionsEnabled && fRecordVideo); 1693 1694 m_pLabelVideoCaptureFrameRate->setEnabled(fIsRecordingOptionsEnabled && fRecordVideo); 1695 m_pContainerSliderVideoCaptureFrameRate->setEnabled(fIsRecordingOptionsEnabled && fRecordVideo); 1696 m_pEditorVideoCaptureFrameRate->setEnabled(fIsRecordingOptionsEnabled && fRecordVideo); 1697 1698 m_pLabelVideoCaptureRate->setEnabled(fIsRecordingOptionsEnabled && fRecordVideo); 1699 m_pContainerSliderVideoCaptureQuality->setEnabled(fIsRecordingOptionsEnabled && fRecordVideo); 1700 m_pEditorVideoCaptureBitRate->setEnabled(fIsRecordingOptionsEnabled && fRecordVideo); 1701 m_pScrollerVideoCaptureScreens->setEnabled(fIsVideoCaptureScreenOptionEnabled && fRecordVideo); 1702 1703 m_pAudioCaptureQualityLabel->setEnabled(fIsRecordingOptionsEnabled && fRecordAudio); 1704 m_pContainerSliderAudioCaptureQuality->setEnabled(fIsRecordingOptionsEnabled && fRecordAudio); 1705 1706 m_pLabelVideoCaptureScreens->setEnabled(fIsVideoCaptureScreenOptionEnabled && fRecordVideo); 1707 m_pLabelVideoCaptureSizeHint->setEnabled(fIsVideoCaptureScreenOptionEnabled && fRecordVideo); 1708 } -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.h
r74722 r75291 94 94 void sltHandleGuestScreenCountEditorChange(); 95 95 96 /** Handles Video Capturetoggle. */97 void sltHandle VideoCaptureCheckboxToggle();98 /** Handles Video Captureframe size change. */99 void sltHandle VideoCaptureFrameSizeComboboxChange();100 /** Handles Video Captureframe width change. */101 void sltHandle VideoCaptureFrameWidthEditorChange();102 /** Handles Video Captureframe height change. */103 void sltHandle VideoCaptureFrameHeightEditorChange();104 /** Handles Video Captureframe rate slider change. */105 void sltHandle VideoCaptureFrameRateSliderChange();106 /** Handles Video Captureframe rate editor change. */107 void sltHandle VideoCaptureFrameRateEditorChange();108 /** Handles Video Capturequality slider change. */109 void sltHandle VideoCaptureQualitySliderChange();110 /** Handles Video Capturebit-rate editor change. */111 void sltHandle VideoCaptureBitRateEditorChange();112 void sltHandle CaptureComboBoxChange();96 /** Handles recording toggle. */ 97 void sltHandleRecordingCheckboxToggle(); 98 /** Handles recording frame size change. */ 99 void sltHandleRecordingVideoFrameSizeComboboxChange(); 100 /** Handles recording frame width change. */ 101 void sltHandleRecordingVideoFrameWidthEditorChange(); 102 /** Handles recording frame height change. */ 103 void sltHandleRecordingVideoFrameHeightEditorChange(); 104 /** Handles recording frame rate slider change. */ 105 void sltHandleRecordingVideoFrameRateSliderChange(); 106 /** Handles recording frame rate editor change. */ 107 void sltHandleRecordingVideoFrameRateEditorChange(); 108 /** Handles recording quality slider change. */ 109 void sltHandleRecordingVideoQualitySliderChange(); 110 /** Handles recording bit-rate editor change. */ 111 void sltHandleRecordingVideoBitRateEditorChange(); 112 void sltHandleRecordingComboBoxChange(); 113 113 114 114 private: … … 120 120 /** Prepares 'Remote Display' tab. */ 121 121 void prepareTabRemoteDisplay(); 122 /** Prepares ' Video Capture' tab. */123 void prepareTab VideoCapture();122 /** Prepares 'Recording' tab. */ 123 void prepareTabRecording(); 124 124 /** Prepares connections. */ 125 125 void prepareConnections(); … … 138 138 /** Updates guest-screen count. */ 139 139 void updateGuestScreenCount(); 140 /** Updates video capturefile size hint. */141 void update VideoCaptureFileSizeHint();140 /** Updates recording file size hint. */ 141 void updateRecordingFileSizeHint(); 142 142 /** Searches for the @a data field in corresponding @a pComboBox. */ 143 143 static void lookForCorrespondingPreset(QComboBox *pComboBox, const QVariant &data); 144 /** Calculates Video Capturebit-rate for passed @a iFrameWidth, @a iFrameHeight, @a iFrameRate and @a iQuality. */144 /** Calculates recording video bit-rate for passed @a iFrameWidth, @a iFrameHeight, @a iFrameRate and @a iQuality. */ 145 145 static int calculateBitRate(int iFrameWidth, int iFrameHeight, int iFrameRate, int iQuality); 146 /** Calculates Video Capturequality for passed @a iFrameWidth, @a iFrameHeight, @a iFrameRate and @a iBitRate. */146 /** Calculates recording video quality for passed @a iFrameWidth, @a iFrameHeight, @a iFrameRate and @a iBitRate. */ 147 147 static int calculateQuality(int iFrameWidth, int iFrameHeight, int iFrameRate, int iBitRate); 148 148 /** Saves existing display data from the cache. */ … … 152 152 /** Saves existing 'Remote Display' data from the cache. */ 153 153 bool saveRemoteDisplayData(); 154 /** Saves existing ' Video Capture' data from the cache. */155 bool save VideoCaptureData();156 /** Decide which of the capturerelated widgets are to be disabled/enabled. */157 void enableDisable CaptureWidgets();154 /** Saves existing 'Recording' data from the cache. */ 155 bool saveRecordingData(); 156 /** Decide which of the recording related widgets are to be disabled/enabled. */ 157 void enableDisableRecordingWidgets(); 158 158 159 159 /** Holds the guest OS type ID. */ -
trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.cpp
r75251 r75291 1371 1371 } 1372 1372 1373 /* Video Capture: */1374 QStringList a VideoCaptureReport = videoCaptureReport(comMachine);1375 QStringList a VideoCaptureReportOld = videoCaptureReport(comMachineOld);1376 if (!a VideoCaptureReport.isEmpty())1377 { 1378 ++iRowCount; 1379 strItem += QString(sSectionItemTpl2).arg(QApplication::translate("UIGDetails", " Video CaptureFile", "details (display/video capture)"),1380 empReport(a VideoCaptureReport.value(0), aVideoCaptureReportOld.value(0)));1381 ++iRowCount; 1382 strItem += QString(sSectionItemTpl2).arg(QApplication::translate("UIGDetails", " Video CaptureAttributes", "details (display/video capture)"),1383 empReport(a VideoCaptureReport.value(1), aVideoCaptureReportOld.value(1)));1373 /* Recording: */ 1374 QStringList aRecordingReport = recordingReport(comMachine); 1375 QStringList aRecordingReportOld = recordingReport(comMachineOld); 1376 if (!aRecordingReport.isEmpty()) 1377 { 1378 ++iRowCount; 1379 strItem += QString(sSectionItemTpl2).arg(QApplication::translate("UIGDetails", "Recording File", "details (display/video capture)"), 1380 empReport(aRecordingReport.value(0), aRecordingReportOld.value(0))); 1381 ++iRowCount; 1382 strItem += QString(sSectionItemTpl2).arg(QApplication::translate("UIGDetails", "Recording Attributes", "details (display/video capture)"), 1383 empReport(aRecordingReport.value(1), aRecordingReportOld.value(1))); 1384 1384 } 1385 1385 else 1386 1386 { 1387 1387 ++iRowCount; 1388 strItem += QString(sSectionItemTpl2).arg(QApplication::translate("UIGDetails", " Video Capture", "details (display/video capture)"),1389 empReport(QApplication::translate("UIGDetails", "Disabled", "details (display/video capture)"), a VideoCaptureReportOld.isEmpty()));1388 strItem += QString(sSectionItemTpl2).arg(QApplication::translate("UIGDetails", "Recording", "details (display/video capture)"), 1389 empReport(QApplication::translate("UIGDetails", "Disabled", "details (display/video capture)"), aRecordingReportOld.isEmpty())); 1390 1390 } 1391 1391 … … 1743 1743 1744 1744 /* static */ 1745 QStringList UISnapshotDetailsWidget:: videoCaptureReport(CMachine comMachine)1745 QStringList UISnapshotDetailsWidget::recordingReport(CMachine comMachine) 1746 1746 { 1747 1747 /* Prepare report: */ 1748 1748 QStringList aReport; 1749 /* Acquire capturestatus: */1750 CCaptureSettings captureSettings = comMachine.GetCaptureSettings();1749 /* Acquire recording status: */ 1750 CCaptureSettings recordingSettings = comMachine.GetCaptureSettings(); 1751 1751 /* For now all screens have the same config: */ 1752 CCaptureScreenSettings captureScreen0Settings = captureSettings.GetScreenSettings(0);1753 if ( captureScreen0Settings.GetEnabled())1754 { 1755 /* Video Capture File: */1756 aReport << captureScreen0Settings.GetFileName();1757 /* Video Capture Attributes: */1752 CCaptureScreenSettings recordingScreen0Settings = recordingSettings.GetScreenSettings(0); 1753 if (recordingScreen0Settings.GetEnabled()) 1754 { 1755 /* Recording ile: */ 1756 aReport << recordingScreen0Settings.GetFileName(); 1757 /* Recording attributes: */ 1758 1758 aReport << QApplication::translate("UIGDetails", "Frame Size: %1x%2, Frame Rate: %3fps, Bit Rate: %4kbps") 1759 .arg( captureScreen0Settings.GetVideoWidth())1760 .arg( captureScreen0Settings.GetVideoHeight())1761 .arg( captureScreen0Settings.GetVideoFPS())1762 .arg( captureScreen0Settings.GetVideoRate());1759 .arg(recordingScreen0Settings.GetVideoWidth()) 1760 .arg(recordingScreen0Settings.GetVideoHeight()) 1761 .arg(recordingScreen0Settings.GetVideoFPS()) 1762 .arg(recordingScreen0Settings.GetVideoRate()); 1763 1763 } 1764 1764 /* Return report: */ -
trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.h
r71104 r75291 162 162 /** Acquires @a comMachine VRDE server report. */ 163 163 static QStringList vrdeServerReport(CMachine comMachine); 164 /** Acquires @a comMachine video capturereport. */165 static QStringList videoCaptureReport(CMachine comMachine);164 /** Acquires @a comMachine recording report. */ 165 static QStringList recordingReport(CMachine comMachine); 166 166 /** Acquires @a comMachine storage report. */ 167 167 static QPair<QStringList, QList<QMap<QString, QString> > > storageReport(CMachine comMachine); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuBarEditorWindow.cpp
r75251 r75291 1304 1304 pMenu->addSeparator(); 1305 1305 prepareCopiedAction(pMenu, actionPool()->action(UIActionIndexRT_M_View_S_TakeScreenshot)); 1306 prepareCopiedAction(pMenu, actionPool()->action(UIActionIndexRT_M_View_M_ Capture_T_Start));1306 prepareCopiedAction(pMenu, actionPool()->action(UIActionIndexRT_M_View_M_Recording_T_Start)); 1307 1307 prepareCopiedAction(pMenu, actionPool()->action(UIActionIndexRT_M_View_T_VRDEServer)); 1308 1308 pMenu->addSeparator();
Note:
See TracChangeset
for help on using the changeset viewer.