VirtualBox

Changeset 75291 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 6, 2018 3:03:21 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: VideoCapture -> Recording renaming.

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  
    609609        case UIExtraDataMetaDefs::RuntimeMenuViewActionType_GuestAutoresize:      strResult = "GuestAutoresize"; break;
    610610        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_StartVideoCapture:    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;
    614614        case UIExtraDataMetaDefs::RuntimeMenuViewActionType_VRDEServer:           strResult = "VRDEServer"; break;
    615615        case UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBar:              strResult = "MenuBar"; break;
     
    649649    keys << "GuestAutoresize";      values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_GuestAutoresize;
    650650    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_StartVideoCapture;
     651    keys << "VideoCapture";         values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_Recording;
     652    keys << "VideoCaptureSettings"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_RecordingSettings;
     653    keys << "StartVideoCapture";    values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_StartRecording;
    654654    keys << "VRDEServer";           values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_VRDEServer;
    655655    keys << "MenuBar";              values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_MenuBar;
     
    14031403        case IndicatorType_SharedFolders: strResult = "SharedFolders"; break;
    14041404        case IndicatorType_Display:       strResult = "Display"; break;
    1405         case IndicatorType_Capture:       strResult = "VideoCapture"; break;
     1405        case IndicatorType_Recording:     strResult = "VideoCapture"; break;
    14061406        case IndicatorType_Features:      strResult = "Features"; break;
    14071407        case IndicatorType_Mouse:         strResult = "Mouse"; break;
     
    14301430    keys << "SharedFolders"; values << IndicatorType_SharedFolders;
    14311431    keys << "Display";       values << IndicatorType_Display;
    1432     keys << "VideoCapture";  values << IndicatorType_Capture;
     1432    keys << "VideoCapture";  values << IndicatorType_Recording;
    14331433    keys << "Features";      values << IndicatorType_Features;
    14341434    keys << "Mouse";         values << IndicatorType_Mouse;
     
    14551455        case IndicatorType_SharedFolders: strResult = QApplication::translate("VBoxGlobal", "Shared Folders", "IndicatorType"); break;
    14561456        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;
    14581458        case IndicatorType_Features:      strResult = QApplication::translate("VBoxGlobal", "Features", "IndicatorType"); break;
    14591459        case IndicatorType_Mouse:         strResult = QApplication::translate("VBoxGlobal", "Mouse", "IndicatorType"); break;
     
    14811481        case IndicatorType_SharedFolders: return UIIconPool::iconSet(":/sf_16px.png");
    14821482        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");
    14841484        case IndicatorType_Features:      return UIIconPool::iconSet(":/vtx_amdv_16px.png");
    14851485        case IndicatorType_Mouse:         return UIIconPool::iconSet(":/mouse_16px.png");
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h

    r75251 r75291  
    500500        RuntimeMenuViewActionType_GuestAutoresize      = RT_BIT(5),
    501501        RuntimeMenuViewActionType_TakeScreenshot       = RT_BIT(6),
    502         RuntimeMenuViewActionType_VideoCapture         = RT_BIT(7),
    503         RuntimeMenuViewActionType_VideoCaptureSettings = RT_BIT(8),
    504         RuntimeMenuViewActionType_StartVideoCapture    = RT_BIT(9),
     502        RuntimeMenuViewActionType_Recording            = RT_BIT(7),
     503        RuntimeMenuViewActionType_RecordingSettings    = RT_BIT(8),
     504        RuntimeMenuViewActionType_StartRecording       = RT_BIT(9),
    505505        RuntimeMenuViewActionType_VRDEServer           = RT_BIT(10),
    506506        RuntimeMenuViewActionType_MenuBar              = RT_BIT(11),
     
    765765    IndicatorType_SharedFolders,
    766766    IndicatorType_Display,
    767     IndicatorType_Capture,
     767    IndicatorType_Recording,
    768768    IndicatorType_Features,
    769769    IndicatorType_Mouse,
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.cpp

    r75251 r75291  
    10511051
    10521052/** Menu action extension, used as 'View' menu class. */
    1053 class UIActionMenuRuntimeVideoCapture : public UIActionMenu
    1054 {
    1055     Q_OBJECT;
    1056 
    1057 public:
    1058 
    1059     /** Constructs action passing @a pParent to the base-class. */
    1060     UIActionMenuRuntimeVideoCapture(UIActionPool *pParent)
     1053class UIActionMenuRuntimeRecording : public UIActionMenu
     1054{
     1055    Q_OBJECT;
     1056
     1057public:
     1058
     1059    /** Constructs action passing @a pParent to the base-class. */
     1060    UIActionMenuRuntimeRecording(UIActionPool *pParent)
    10611061        : UIActionMenu(pParent)
    10621062    {}
     
    10671067    virtual int extraDataID() const /* override */
    10681068    {
    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);
    10801080    }
    10811081
     
    10871087};
    10881088
    1089 /** Simple action extension, used as 'Show Video Capture Settings' action class. */
    1090 class UIActionSimpleRuntimeShowVideoCaptureSettings : public UIActionSimple
    1091 {
    1092     Q_OBJECT;
    1093 
    1094 public:
    1095 
    1096     /** Constructs action passing @a pParent to the base-class. */
    1097     UIActionSimpleRuntimeShowVideoCaptureSettings(UIActionPool *pParent)
     1089/** Simple action extension, used as 'Show Recording Settings' action class. */
     1090class UIActionSimpleRuntimeShowRecordingSettings : public UIActionSimple
     1091{
     1092    Q_OBJECT;
     1093
     1094public:
     1095
     1096    /** Constructs action passing @a pParent to the base-class. */
     1097    UIActionSimpleRuntimeShowRecordingSettings(UIActionPool *pParent)
    10981098        : UIActionSimple(pParent, ":/video_capture_settings_16px.png", ":/video_capture_settings_16px.png", true)
    10991099    {}
     
    11041104    virtual int extraDataID() const /* override */
    11051105    {
    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);
    11171117    }
    11181118
     
    11311131};
    11321132
    1133 /** Toggle action extension, used as 'Video Capture' action class. */
    1134 class UIActionToggleRuntimeVideoCapture : public UIActionToggle
    1135 {
    1136     Q_OBJECT;
    1137 
    1138 public:
    1139 
    1140     /** Constructs action passing @a pParent to the base-class. */
    1141     UIActionToggleRuntimeVideoCapture(UIActionPool *pParent)
     1133/** Toggle action extension, used as 'Recording' action class. */
     1134class UIActionToggleRuntimeRecording : public UIActionToggle
     1135{
     1136    Q_OBJECT;
     1137
     1138public:
     1139
     1140    /** Constructs action passing @a pParent to the base-class. */
     1141    UIActionToggleRuntimeRecording(UIActionPool *pParent)
    11421142        : UIActionToggle(pParent,
    11431143                         ":/video_capture_on_16px.png", ":/video_capture_16px.png",
     
    11511151    virtual int extraDataID() const /* override */
    11521152    {
    1153         return UIExtraDataMetaDefs::RuntimeMenuViewActionType_StartVideoCapture;
    1154     }
    1155     /** Returns action extra-data key. */
    1156     virtual QString extraDataKey() const /* override */
    1157     {
    1158         return gpConverter->toInternalString(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StartVideoCapture);
    1159     }
    1160     /** Returns whether action is allowed. */
    1161     virtual bool isAllowed() const /* override */
    1162     {
    1163         return actionPool()->toRuntime()->isAllowedInMenuView(UIExtraDataMetaDefs::RuntimeMenuViewActionType_StartVideoCapture);
     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);
    11641164    }
    11651165
     
    33063306    m_pool[UIActionIndexRT_M_View_T_GuestAutoresize] = new UIActionToggleRuntimeGuestAutoresize(this);
    33073307    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);
    33113311    m_pool[UIActionIndexRT_M_View_T_VRDEServer] = new UIActionToggleRuntimeVRDEServer(this);
    33123312    m_pool[UIActionIndexRT_M_View_M_MenuBar] = new UIActionMenuRuntimeMenuBar(this);
     
    33773377    m_menuUpdateHandlers[UIActionIndexRT_M_View].ptfr =                    &UIActionPoolRuntime::updateMenuView;
    33783378    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;
    33803380    m_menuUpdateHandlers[UIActionIndexRT_M_View_M_MenuBar].ptfr =          &UIActionPoolRuntime::updateMenuViewMenuBar;
    33813381    m_menuUpdateHandlers[UIActionIndexRT_M_View_M_StatusBar].ptfr =        &UIActionPoolRuntime::updateMenuViewStatusBar;
     
    34523452            (m_restrictedActionsMenuMachine[UIActionRestrictionLevel_Base] | UIExtraDataMetaDefs::RuntimeMenuMachineActionType_SettingsDialog);
    34533453        m_restrictedActionsMenuView[UIActionRestrictionLevel_Base] = (UIExtraDataMetaDefs::RuntimeMenuViewActionType)
    3454             (m_restrictedActionsMenuView[UIActionRestrictionLevel_Base] | UIExtraDataMetaDefs::RuntimeMenuViewActionType_VideoCaptureSettings);
     3454            (m_restrictedActionsMenuView[UIActionRestrictionLevel_Base] | UIExtraDataMetaDefs::RuntimeMenuViewActionType_RecordingSettings);
    34553455        m_restrictedActionsMenuInput[UIActionRestrictionLevel_Base] = (UIExtraDataMetaDefs::RuntimeMenuInputActionType)
    34563456            (m_restrictedActionsMenuInput[UIActionRestrictionLevel_Base] | UIExtraDataMetaDefs::RuntimeMenuInputActionType_KeyboardSettings);
     
    36583658    /* 'Take Screenshot' action: */
    36593659    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     updateMenuViewVideoCapture();
    3663     /* 'Video Capture Start' 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;
    36653665    /* 'VRDE Server' action: */
    36663666    fSeparator = addAction(pMenu, action(UIActionIndexRT_M_View_T_VRDEServer)) || fSeparator;
     
    37653765}
    37663766
    3767 void UIActionPoolRuntime::updateMenuViewVideoCapture()
     3767void UIActionPoolRuntime::updateMenuViewRecording()
    37683768{
    37693769    /* Get corresponding menu: */
    3770     UIMenu *pMenu = action(UIActionIndexRT_M_View_M_VideoCapture)->menu();
     3770    UIMenu *pMenu = action(UIActionIndexRT_M_View_M_Recording)->menu();
    37713771    AssertPtrReturnVoid(pMenu);
    37723772    /* Clear contents: */
     
    37763776    bool fSeparator = false;
    37773777
    3778     /* 'Video Capture Settings' 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;
    37803780
    37813781    /* Separator: */
     
    37863786    }
    37873787
    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;
    37903790
    37913791    /* Mark menu as valid: */
    3792     m_invalidations.remove(UIActionIndexRT_M_View_M_VideoCapture);
     3792    m_invalidations.remove(UIActionIndexRT_M_View_M_Recording);
    37933793}
    37943794
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.h

    r75251 r75291  
    6464    UIActionIndexRT_M_View_T_GuestAutoresize,
    6565    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,
    6969    UIActionIndexRT_M_View_T_VRDEServer,
    7070    UIActionIndexRT_M_View_M_MenuBar,
     
    242242    /** Updates 'View' : 'Popup' menu. */
    243243    void updateMenuViewPopup();
    244     /** Updates 'View' : 'Video Capture' menu. */
    245     void updateMenuViewVideoCapture();
     244    /** Updates 'View' : 'Recording' menu. */
     245    void updateMenuViewRecording();
    246246    /** Updates 'View' : 'Menu Bar' menu. */
    247247    void updateMenuViewMenuBar();
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp

    r75251 r75291  
    377377        case KVBoxEventType_OnCaptureChanged:
    378378        {
    379             emit sigCaptureChange();
     379            emit sigRecordingChange();
    380380            break;
    381381        }
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h

    r75251 r75291  
    125125        void sigVRDEChange();
    126126        /** Notifies about capture state change. */
    127         void sigCaptureChange();
     127        void sigRecordingChange();
    128128        /** Notifies about USB controller state change. */
    129129        void sigUSBControllerChange();
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp

    r75251 r75291  
    570570}
    571571
    572 void UIPopupCenter::cannotToggleCapture(QWidget *pParent, const CMachine &comMachine, bool fEnable)
     572void UIPopupCenter::cannotToggleRecording(QWidget *pParent, const CMachine &comMachine, bool fEnable)
    573573{
    574574    /* Get machine-name preserving error-info: */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.h

    r75251 r75291  
    162162    void cannotDetachWebCam(QWidget *pParent, const CEmulatedUSB &comDispatcher,
    163163                            const QString &strWebCamName, const QString &strMachineName);
    164     void cannotToggleCapture(QWidget *pParent, const CMachine &comMachine, bool fEnable);
     164    void cannotToggleRecording(QWidget *pParent, const CMachine &comMachine, bool fEnable);
    165165    void cannotToggleVRDEServer(QWidget *pParent,  const CVRDEServer &comServer,
    166166                                const QString &strMachineName, bool fEnable);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElements.cpp

    r75251 r75291  
    449449        }
    450450
    451         /* Capture info: */
     451        /* Recording info: */
    452452        CCaptureSettings captureSettings = machine.GetCaptureSettings();
    453453        if (captureSettings.GetEnabled())
     
    457457
    458458            /** @todo r=andy Refine these texts (wrt audio and/or video). */
    459             table << UITextTableLine(QApplication::translate("UIDetails", "Video Capture File", "details (display/video capture)"),
     459            table << UITextTableLine(QApplication::translate("UIDetails", "Recording File", "details (display/video capture)"),
    460460                                     captureScreen0Settings.GetFileName());
    461             table << UITextTableLine(QApplication::translate("UIDetails", "Video Capture Attributes", "details (display/video capture)"),
     461            table << UITextTableLine(QApplication::translate("UIDetails", "Recording Attributes", "details (display/video capture)"),
    462462                                     QApplication::translate("UIDetails", "Frame Size: %1x%2, Frame Rate: %3fps, Bit Rate: %4kbps")
    463463                                         .arg(captureScreen0Settings.GetVideoWidth()).arg(captureScreen0Settings.GetVideoHeight())
     
    467467        {
    468468            /** @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)"),
    470470                                     QApplication::translate("UIDetails", "Disabled", "details (display/video capture)"));
    471471        }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.cpp

    r75251 r75291  
    6464    /** Notifies about VRDE device state change. */
    6565    void sigVRDEChange();
    66     /** Notifies about Video Capture device state change. */
    67     void sigVideoCaptureChange();
     66    /** Notifies about recording state change. */
     67    void sigRecordingChange();
    6868    /** Notifies about USB controller state change. */
    6969    void sigUSBControllerChange();
     
    243243            this, SIGNAL(sigVRDEChange()),
    244244            Qt::DirectConnection);
    245     connect(m_pQtListener->getWrapped(), SIGNAL(sigVideoCaptureChange()),
    246             this, SIGNAL(sigVideoCaptureChange()),
     245    connect(m_pQtListener->getWrapped(), SIGNAL(sigRecordingChange()),
     246            this, SIGNAL(sigRecordingChange()),
    247247            Qt::DirectConnection);
    248248    connect(m_pQtListener->getWrapped(), SIGNAL(sigUSBControllerChange()),
     
    402402            this, SIGNAL(sigVRDEChange()),
    403403            Qt::QueuedConnection);
    404     connect(m_pProxy, SIGNAL(sigVideoCaptureChange()),
    405             this, SIGNAL(sigVideoCaptureChange()),
     404    connect(m_pProxy, SIGNAL(sigRecordingChange()),
     405            this, SIGNAL(sigRecordingChange()),
    406406            Qt::QueuedConnection);
    407407    connect(m_pProxy, SIGNAL(sigUSBControllerChange()),
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.h

    r69500 r75291  
    6060    /** Notifies about VRDE device state change. */
    6161    void sigVRDEChange();
    62     /** Notifies about Video Capture device state change. */
    63     void sigVideoCaptureChange();
     62    /** Notifies about recording state change. */
     63    void sigRecordingChange();
    6464    /** Notifies about USB controller state change. */
    6565    void sigUSBControllerChange();
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp

    r75251 r75291  
    782782
    783783
    784 /** UISessionStateStatusBarIndicator extension for Runtime UI: Video-capture indicator. */
    785 class UIIndicatorCapture : public UISessionStateStatusBarIndicator
     784/** UISessionStateStatusBarIndicator extension for Runtime UI: Recording indicator. */
     785class UIIndicatorRecording : public UISessionStateStatusBarIndicator
    786786{
    787787    Q_OBJECT;
     
    790790    Q_PROPERTY(double rotationAngle READ rotationAngle WRITE setRotationAngle);
    791791
    792     /** Capture states. */
    793     enum UIIndicatorStateCapture
    794     {
    795         UIIndicatorStateCapture_Disabled = 0,
    796         UIIndicatorStateCapture_Enabled  = 1,
    797         UIIndicatorStateCapture_Paused   = 2
     792    /** Recording states. */
     793    enum UIIndicatorStateRecording
     794    {
     795        UIIndicatorStateRecording_Disabled = 0,
     796        UIIndicatorStateRecording_Enabled  = 1,
     797        UIIndicatorStateRecording_Paused   = 2
    798798    };
    799799
    800     /** Capture modes. */
    801     enum UIIndicatorStateCaptureMode
    802     {
    803         UIIndicatorStateCaptureMode_None   = RT_BIT(0),
    804         UIIndicatorStateCaptureMode_Video = RT_BIT(1),
    805         UIIndicatorStateCaptureMode_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)
    806806    };
    807807
     
    809809
    810810    /** Constructor, passes @a pSession to the UISessionStateStatusBarIndicator constructor. */
    811     UIIndicatorCapture(UISession *pSession)
    812         : UISessionStateStatusBarIndicator(IndicatorType_Capture, pSession)
     811    UIIndicatorRecording(UISession *pSession)
     812        : UISessionStateStatusBarIndicator(IndicatorType_Recording, pSession)
    813813        , m_pAnimation(0)
    814814        , m_dRotationAngle(0)
    815         , m_eCaptureMode(UIIndicatorStateCaptureMode_None)
     815        , m_eRecordingMode(UIIndicatorStateRecordingMode_None)
    816816    {
    817817        /* Assign state-icons: */
    818         setStateIcon(UIIndicatorStateCapture_Disabled, UIIconPool::iconSet(":/video_capture_16px.png"));
    819         setStateIcon(UIIndicatorStateCapture_Enabled,  UIIconPool::iconSet(":/movie_reel_16px.png"));
    820         setStateIcon(UIIndicatorStateCapture_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"));
    821821        /* Create *enabled* state animation: */
    822822        m_pAnimation = UIAnimationLoop::installAnimationLoop(this, "rotationAngle",
     
    835835        switch (iState)
    836836        {
    837             case UIIndicatorStateCapture_Disabled:
     837            case UIIndicatorStateRecording_Disabled:
    838838                m_pAnimation->stop();
    839839                m_dRotationAngle = 0;
    840840                break;
    841             case UIIndicatorStateCapture_Enabled:
     841            case UIIndicatorStateRecording_Enabled:
    842842                m_pAnimation->start();
    843843                break;
    844             case UIIndicatorStateCapture_Paused:
     844            case UIIndicatorStateRecording_Paused:
    845845                m_pAnimation->stop();
    846846                break;
     
    860860        QPainter painter(this);
    861861        /* Configure painter for *enabled* state: */
    862         if (state() == UIIndicatorStateCapture_Enabled)
     862        if (state() == UIIndicatorStateRecording_Enabled)
    863863        {
    864864            /* Configure painter for smooth animation: */
     
    885885        /* Update indicator state early: */
    886886        CCaptureSettings captureSettings = machine.GetCaptureSettings();
     887        Assert(captureSettings.isOk());
    887888        /* For now all screens have the same config: */
    888889        CCaptureScreenSettings captureScreen0Settings = captureSettings.GetScreenSettings(0);
     890        Assert(captureScreen0Settings.isOk());
    889891        if (!captureScreen0Settings.GetEnabled())
    890             setState(UIIndicatorStateCapture_Disabled);
     892            setState(UIIndicatorStateRecording_Disabled);
    891893        else if (!fMachinePaused)
    892             setState(UIIndicatorStateCapture_Enabled);
     894            setState(UIIndicatorStateRecording_Enabled);
    893895        else
    894             setState(UIIndicatorStateCapture_Paused);
    895 
    896         updateCaptureMode();
     896            setState(UIIndicatorStateRecording_Paused);
     897
     898        updateRecordingMode();
    897899
    898900        /* Prepare tool-tip: */
     
    900902        switch (state())
    901903        {
    902             case UIIndicatorStateCapture_Disabled:
     904            case UIIndicatorStateRecording_Disabled:
    903905            {
    904906                strFullData += s_strTableRow1 /** @todo r=andy Refine this tooltip (audio and/or video). */
     
    906908                break;
    907909            }
    908             case UIIndicatorStateCapture_Enabled:
    909             case UIIndicatorStateCapture_Paused:
     910            case UIIndicatorStateRecording_Enabled:
     911            case UIIndicatorStateRecording_Paused:
    910912            {
    911913                QString strToolTip;
    912                 if ( m_eCaptureMode & UIIndicatorStateCaptureMode_Audio &&
    913                     m_eCaptureMode & UIIndicatorStateCaptureMode_Video)
     914                if ( m_eRecordingMode & UIIndicatorStateRecordingMode_Audio &&
     915                    m_eRecordingMode & UIIndicatorStateRecordingMode_Video)
    914916                    strToolTip = "Video/audio capture file";
    915                 else if (m_eCaptureMode & UIIndicatorStateCaptureMode_Audio)
     917                else if (m_eRecordingMode & UIIndicatorStateRecordingMode_Audio)
    916918                    strToolTip = "Audio capture file";
    917                 else if (m_eCaptureMode & UIIndicatorStateCaptureMode_Video)
     919                else if (m_eRecordingMode & UIIndicatorStateRecordingMode_Video)
    918920                    strToolTip = "Video capture file";
    919921
     
    940942    void setRotationAngle(double dRotationAngle) { m_dRotationAngle = dRotationAngle; update(); }
    941943
    942     /* Parses CaptureScreenSettings::Options and updates m_eCaptureMode accordingly. */
    943     void updateCaptureMode()
    944     {
    945         m_eCaptureMode = UIIndicatorStateCaptureMode_None;
     944    /* Parses CaptureScreenSettings::Options and updates m_eRecordingMode accordingly. */
     945    void updateRecordingMode()
     946    {
     947        m_eRecordingMode = UIIndicatorStateRecordingMode_None;
    946948
    947949        /* Get machine: */
     
    952954            return;
    953955
    954         CCaptureSettings captureSettings = machine.GetCaptureSettings();
     956        CCaptureSettings recordingSettings = machine.GetCaptureSettings();
    955957        /* 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);
    959961
    960962        for (int i = 0; i < strOptionsPairList.size(); ++i)
     
    962964            if (strOptionsPairList.at(i).contains("vc_enabled", Qt::CaseInsensitive) &&
    963965                strOptionsPairList.at(i).contains("true", Qt::CaseInsensitive))
    964                 m_eCaptureMode = (UIIndicatorStateCaptureMode)((int)m_eCaptureMode | (int)UIIndicatorStateCaptureMode_Video);
     966                m_eRecordingMode = (UIIndicatorStateRecordingMode)((int)m_eRecordingMode | (int)UIIndicatorStateRecordingMode_Video);
    965967
    966968            if (strOptionsPairList.at(i).contains("ac_enabled", Qt::CaseInsensitive) &&
    967969                strOptionsPairList.at(i).contains("true", Qt::CaseInsensitive))
    968                 m_eCaptureMode = (UIIndicatorStateCaptureMode)((int)m_eCaptureMode | (int)UIIndicatorStateCaptureMode_Audio);
     970                m_eRecordingMode = (UIIndicatorStateRecordingMode)((int)m_eRecordingMode | (int)UIIndicatorStateRecordingMode_Audio);
    969971        }
    970972    }
     
    975977    double m_dRotationAngle;
    976978
    977     UIIndicatorStateCaptureMode m_eCaptureMode;
     979    UIIndicatorStateRecordingMode m_eRecordingMode;
    978980};
    979981
     
    14741476                case IndicatorType_SharedFolders:     m_pool[indicatorType] = new UIIndicatorSharedFolders(m_pSession); break;
    14751477                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;
    14771479                case IndicatorType_Features:          m_pool[indicatorType] = new UIIndicatorFeatures(m_pSession);      break;
    14781480                case IndicatorType_Mouse:             m_pool[indicatorType] = new UIIndicatorMouse(m_pSession);         break;
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineDefs.h

    r73924 r75291  
    3636    UIVisualElement_SharedFolderStuff     = RT_BIT(9),
    3737    UIVisualElement_Display               = RT_BIT(10),
    38     UIVisualElement_VideoCapture          = RT_BIT(11),
     38    UIVisualElement_Recording             = RT_BIT(11),
    3939    UIVisualElement_FeaturesStuff         = RT_BIT(12),
    4040#ifndef VBOX_WS_MAC
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r75251 r75291  
    10521052    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_S_AdjustWindow));
    10531053    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));
    10571057    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_T_VRDEServer));
    10581058    m_pRunningOrPausedActions->addAction(actionPool()->action(UIActionIndexRT_M_View_M_MenuBar));
     
    11371137    connect(actionPool()->action(UIActionIndexRT_M_View_S_TakeScreenshot), SIGNAL(triggered()),
    11381138            this, SLOT(sltTakeScreenshot()));
    1139     connect(actionPool()->action(UIActionIndexRT_M_View_M_Capture_S_Settings), SIGNAL(triggered()),
    1140             this, SLOT(sltOpenCaptureOptions()));
    1141     connect(actionPool()->action(UIActionIndexRT_M_View_M_Capture_T_Start), SIGNAL(toggled(bool)),
    1142             this, SLOT(sltToggleCapture(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)));
    11431143    connect(actionPool()->action(UIActionIndexRT_M_View_T_VRDEServer), SIGNAL(toggled(bool)),
    11441144            this, SLOT(sltToggleVRDE(bool)));
     
    20912091}
    20922092
    2093 void UIMachineLogic::sltOpenCaptureOptions()
    2094 {
    2095     /* Open VM settings : Display page : Video Capture tab: */
     2093void UIMachineLogic::sltOpenRecordingOptions()
     2094{
     2095    /* Open VM settings : Display page : Recording tab: */
    20962096    sltOpenVMSettingsDialog("#display", "m_pCheckboxVideoCapture");
    20972097}
    20982098
    2099 void UIMachineLogic::sltToggleCapture(bool fEnabled)
     2099void UIMachineLogic::sltToggleRecording(bool fEnabled)
    21002100{
    21012101    /* Do not process if window(s) missed! */
     
    21042104
    21052105    /* Make sure something had changed: */
    2106     CCaptureSettings captureSettings = machine().GetCaptureSettings();
    2107     if (captureSettings.GetEnabled() == static_cast<BOOL>(fEnabled))
    2108         return;
    2109 
    2110     /* Update Video Capture state: */
    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())
    21132113    {
    21142114        /* Make sure action is updated: */
    2115         uisession()->updateStatusCapture();
     2115        uisession()->updateStatusRecording();
    21162116        /* Notify about the error: */
    2117         return popupCenter().cannotToggleCapture(activeMachineWindow(), machine(), fEnabled);
     2117        return popupCenter().cannotToggleRecording(activeMachineWindow(), machine(), fEnabled);
    21182118    }
    21192119
     
    21232123    {
    21242124        /* Make sure action is updated: */
    2125         uisession()->updateStatusCapture();
     2125        uisession()->updateStatusRecording();
    21262126        /* Notify about the error: */
    21272127        return msgCenter().cannotSaveMachineSettings(machine());
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.h

    r75251 r75291  
    291291    void sltToggleGuestAutoresize(bool fEnabled);
    292292    void sltTakeScreenshot();
    293     void sltOpenCaptureOptions();
    294     void sltToggleCapture(bool fEnabled);
     293    void sltOpenRecordingOptions();
     294    void sltToggleRecording(bool fEnabled);
    295295    void sltToggleVRDE(bool fEnabled);
    296296
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r75251 r75291  
    722722}
    723723
    724 void UISession::sltCaptureChange()
     724void UISession::sltRecordingChange()
    725725{
    726726    CCaptureSettings captureSettings = machine().GetCaptureSettings();
    727727
    728728    /* 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);
    732732
    733733    /* Notify listeners about Capture change: */
    734     emit sigCaptureChange();
     734    emit sigRecordingChange();
    735735}
    736736
     
    11331133            this, SLOT(sltVRDEChange()));
    11341134
    1135     connect(gConsoleEvents, SIGNAL(sigVideoCaptureChange()),
    1136             this, SLOT(sltCaptureChange()));
     1135    connect(gConsoleEvents, SIGNAL(sigRecordingChange()),
     1136            this, SLOT(sltRecordingChange()));
    11371137
    11381138    connect(gConsoleEvents, SIGNAL(sigNetworkAdapterChange(CNetworkAdapter)),
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r75251 r75291  
    259259    void updateStatusVRDE() { sltVRDEChange(); }
    260260    /** Updates Video Capture action state. */
    261     void updateStatusCapture() { sltCaptureChange(); }
     261    void updateStatusRecording() { sltRecordingChange(); }
    262262    /** Updates Audio output action state. */
    263263    void updateAudioOutput() { sltAudioAdapterChange(); }
     
    305305    void sigMediumChange(const CMediumAttachment &mediumAttachment);
    306306    void sigVRDEChange();
    307     void sigCaptureChange();
     307    void sigRecordingChange();
    308308    void sigUSBControllerChange();
    309309    void sigUSBDeviceStateChange(const CUSBDevice &device, bool bIsAttached, const CVirtualBoxErrorInfo &error);
     
    357357    void sltAdditionsChange();
    358358    void sltVRDEChange();
    359     void sltCaptureChange();
     359    void sltRecordingChange();
    360360    void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo);
    361361    /** 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  
    7171
    7272    /* Update indicator-pool and virtualization stuff: */
    73     updateAppearanceOf(UIVisualElement_IndicatorPoolStuff | UIVisualElement_VideoCapture | UIVisualElement_FeaturesStuff);
     73    updateAppearanceOf(UIVisualElement_IndicatorPoolStuff | UIVisualElement_Recording | UIVisualElement_FeaturesStuff);
    7474}
    7575
     
    116116}
    117117
    118 void UIMachineWindowNormal::sltVideoCaptureChange()
     118void UIMachineWindowNormal::sltRecordingChange()
    119119{
    120120    /* Update video-capture stuff: */
    121     updateAppearanceOf(UIVisualElement_VideoCapture);
     121    updateAppearanceOf(UIVisualElement_Recording);
    122122}
    123123
     
    219219        case IndicatorType_SharedFolders: pAction = actionPool()->action(UIActionIndexRT_M_Devices_M_SharedFolders);  break;
    220220        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;
    222222        case IndicatorType_Mouse:         pAction = actionPool()->action(UIActionIndexRT_M_Input_M_Mouse);            break;
    223223        case IndicatorType_Keyboard:      pAction = actionPool()->action(UIActionIndexRT_M_Input_M_Keyboard);         break;
     
    255255    connect(machineLogic()->uisession(), SIGNAL(sigSharedFolderChange()),
    256256            this, SLOT(sltSharedFolderChange()));
    257     connect(machineLogic()->uisession(), SIGNAL(sigVideoCaptureChange()),
    258             this, SLOT(sltVideoCaptureChange()));
     257    connect(machineLogic()->uisession(), SIGNAL(sigRecordingChange()),
     258            this, SLOT(sltRecordingChange()));
    259259    connect(machineLogic()->uisession(), SIGNAL(sigCPUExecutionCapChange()),
    260260            this, SLOT(sltCPUExecutionCapChange()));
     
    464464    disconnect(machineLogic()->uisession(), SIGNAL(sigSharedFolderChange()),
    465465               this, SLOT(sltSharedFolderChange()));
    466     disconnect(machineLogic()->uisession(), SIGNAL(sigVideoCaptureChange()),
    467                this, SLOT(sltVideoCaptureChange()));
     466    disconnect(machineLogic()->uisession(), SIGNAL(sigRecordingChange()),
     467               this, SLOT(sltRecordingChange()));
    468468    disconnect(machineLogic()->uisession(), SIGNAL(sigCPUExecutionCapChange()),
    469469               this, SLOT(sltCPUExecutionCapChange()));
     
    639639        if (uisession()->isRunning() || uisession()->isPaused())
    640640        {
    641             if (iElement & UIVisualElement_VideoCapture)
    642                 m_pIndicatorsPool->updateAppearance(IndicatorType_Capture);
     641            if (iElement & UIVisualElement_Recording)
     642                m_pIndicatorsPool->updateAppearance(IndicatorType_Recording);
    643643        }
    644644    }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h

    r74942 r75291  
    5959    /** Handles shared folder change event. */
    6060    void sltSharedFolderChange();
    61     /** Handles video capture change event. */
    62     void sltVideoCaptureChange();
     61    /** Handles recording change event. */
     62    void sltRecordingChange();
    6363    /** Handles CPU execution cap change event. */
    6464    void sltCPUExecutionCapChange();
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r75251 r75291  
    5959        , m_uRemoteDisplayTimeout(0)
    6060        , m_fRemoteDisplayMultiConnAllowed(false)
    61         , m_fVideoCaptureEnabled(false)
    62         , m_strVideoCaptureFolder(QString())
    63         , m_strVideoCaptureFilePath(QString())
    64         , m_iVideoCaptureFrameWidth(0)
    65         , m_iVideoCaptureFrameHeight(0)
    66         , m_iVideoCaptureFrameRate(0)
    67         , m_iVideoCaptureBitRate(0)
    68         , m_strVideoCaptureOptions(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())
    6969    {}
    7070
     
    8686               && (m_uRemoteDisplayTimeout == other.m_uRemoteDisplayTimeout)
    8787               && (m_fRemoteDisplayMultiConnAllowed == other.m_fRemoteDisplayMultiConnAllowed)
    88                && (m_fVideoCaptureEnabled == other.m_fVideoCaptureEnabled)
    89                && (m_strVideoCaptureFilePath == other.m_strVideoCaptureFilePath)
    90                && (m_iVideoCaptureFrameWidth == other.m_iVideoCaptureFrameWidth)
    91                && (m_iVideoCaptureFrameHeight == other.m_iVideoCaptureFrameHeight)
    92                && (m_iVideoCaptureFrameRate == other.m_iVideoCaptureFrameRate)
    93                && (m_iVideoCaptureBitRate == other.m_iVideoCaptureBitRate)
    94                && (m_screens == other.m_screens)
    95                && (m_strVideoCaptureOptions == 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)
    9696               ;
    9797    }
     
    102102    bool operator!=(const UIDataSettingsMachineDisplay &other) const { return !equal(other); }
    103103
    104     /** Video Capture Options. */
    105     enum VideoCaptureOption
    106     {
    107         VideoCaptureOption_Unknown,
    108         VideoCaptureOption_AC,
    109         VideoCaptureOption_VC,
    110         VideoCaptureOption_AC_Profile
     104    /** Recording options. */
     105    enum RecordingOption
     106    {
     107        RecordingOption_Unknown,
     108        RecordingOption_AC,
     109        RecordingOption_VC,
     110        RecordingOption_AC_Profile
    111111    };
    112112
    113     enum CaptureMode
    114     {
    115         CaptureMode_VideoAudio,
    116         CaptureMode_VideoOnly,
    117         CaptureMode_AudioOnly
     113    enum RecordingMode
     114    {
     115        RecordingMode_VideoAudio,
     116        RecordingMode_VideoOnly,
     117        RecordingMode_AudioOnly
    118118    };
    119119
    120120    /** Returns enum value corresponding to passed @a strKey. */
    121     static VideoCaptureOption toVideoCaptureOptionKey(const QString &strKey)
     121    static RecordingOption toRecordingOptionKey(const QString &strKey)
    122122    {
    123123        /* 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);
    130130    }
    131131
    132132    /** Returns string representation for passed enum @a enmKey. */
    133     static QString fromVideoCaptureOptionKey(VideoCaptureOption enmKey)
     133    static QString fromRecordingOptionKey(RecordingOption enmKey)
    134134    {
    135135        /* 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";
    140140        /* Return known value or QString() otherwise: */
    141141        return values.value(enmKey);
    142142    }
    143143
    144     /** Parses Video Capture Options. */
    145     static void parseVideoCaptureOptions(const QString &strOptions,
    146                                          QList<VideoCaptureOption> &outKeys,
    147                                          QStringList &outValues)
     144    /** Parses recording options. */
     145    static void parseRecordingOptions(const QString &strOptions,
     146                                      QList<RecordingOption> &outKeys,
     147                                      QStringList &outValues)
    148148    {
    149149        outKeys.clear();
     
    155155            if (aPair.size() != 2)
    156156                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)
    159159                continue;
    160160            outKeys << enmKey;
     
    163163    }
    164164
    165     /** Serializes Video Capture Options. */
    166     static void serializeVideoCaptureOptions(const QList<VideoCaptureOption> &inKeys,
    167                                              const QStringList &inValues,
    168                                              QString &strOptions)
     165    /** Serializes recording options. */
     166    static void serializeRecordingOptions(const QList<RecordingOption> &inKeys,
     167                                          const QStringList &inValues,
     168                                          QString &strOptions)
    169169    {
    170170        QStringList aPairs;
     
    172172        {
    173173            QStringList aPair;
    174             aPair << fromVideoCaptureOptionKey(inKeys.value(i));
     174            aPair << fromRecordingOptionKey(inKeys.value(i));
    175175            aPair << inValues.value(i);
    176176            aPairs << aPair.join('=');
     
    179179    }
    180180
    181     /** Returns whether passed Video Capture @a enmOption is enabled. */
    182     static bool isVideoCaptureOptionEnabled(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;
    186186        QStringList aValues;
    187         parseVideoCaptureOptions(strOptions, aKeys, aValues);
     187        parseRecordingOptions(strOptions, aKeys, aValues);
    188188        int iIndex = aKeys.indexOf(enmOption);
    189189        if (iIndex == -1)
     
    198198    static int getAudioQualityFromOptions(const QString &strOptions)
    199199    {
    200         QList<VideoCaptureOption> aKeys;
     200        QList<RecordingOption> aKeys;
    201201        QStringList aValues;
    202         parseVideoCaptureOptions(strOptions, aKeys, aValues);
    203         int iIndex = aKeys.indexOf(VideoCaptureOption_AC_Profile);
     202        parseRecordingOptions(strOptions, aKeys, aValues);
     203        int iIndex = aKeys.indexOf(RecordingOption_AC_Profile);
    204204        if (iIndex == -1)
    205205            return 2;
     
    211211    }
    212212
    213     /** Sets the video capture options for @a enmOptions to @a values. */
    214     static QString setVideoCaptureOptions(const QString &strOptions,
    215                                                 const QVector<VideoCaptureOption> &enmOptions,
    216                                                 const QStringList &values)
     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)
    217217    {
    218218        if (enmOptions.size() != values.size())
    219219            return QString();
    220         QList<VideoCaptureOption> aKeys;
     220        QList<RecordingOption> aKeys;
    221221        QStringList aValues;
    222         parseVideoCaptureOptions(strOptions, aKeys, aValues);
     222        parseRecordingOptions(strOptions, aKeys, aValues);
    223223        for(int i = 0; i < values.size(); ++i)
    224224        {
     
    236236        }
    237237        QString strResult;
    238         serializeVideoCaptureOptions(aKeys, aValues, strResult);
     238        serializeRecordingOptions(aKeys, aValues, strResult);
    239239        return strResult;
    240240    }
     
    266266    bool       m_fRemoteDisplayMultiConnAllowed;
    267267
    268     /** Holds whether the video capture is enabled. */
    269     bool m_fVideoCaptureEnabled;
    270     /** Holds the video capture folder. */
    271     QString m_strVideoCaptureFolder;
    272     /** Holds the video capture file path. */
    273     QString m_strVideoCaptureFilePath;
    274     /** Holds the video capture frame width. */
    275     int m_iVideoCaptureFrameWidth;
    276     /** Holds the video capture frame height. */
    277     int m_iVideoCaptureFrameHeight;
    278     /** Holds the video capture frame rate. */
    279     int m_iVideoCaptureFrameRate;
    280     /** Holds the video capture bit rate. */
    281     int m_iVideoCaptureBitRate;
    282     /** Holds which of the guest screens should be captured. */
    283     QVector<BOOL> m_screens;
    284     /** Holds the video capture options. */
    285     QString m_strVideoCaptureOptions;
     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;
    286286};
    287287
     
    382382    }
    383383
    384     /* Gather old 'Capture' data: */
    385     CCaptureSettings captureSettings = m_machine.GetCaptureSettings();
    386     oldDisplayData.m_fVideoCaptureEnabled = captureSettings.GetEnabled();
     384    /* Gather old 'Recording' data: */
     385    CCaptureSettings recordingSettings = m_machine.GetCaptureSettings();
     386    oldDisplayData.m_fRecordingEnabled = recordingSettings.GetEnabled();
    387387
    388388    /* 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_strVideoCaptureFolder = QFileInfo(m_machine.GetSettingsFilePath()).absolutePath();
    393         oldDisplayData.m_strVideoCaptureFilePath = captureScreen0Settings.GetFileName();
    394         oldDisplayData.m_iVideoCaptureFrameWidth = captureScreen0Settings.GetVideoWidth();
    395         oldDisplayData.m_iVideoCaptureFrameHeight = captureScreen0Settings.GetVideoHeight();
    396         oldDisplayData.m_iVideoCaptureFrameRate = captureScreen0Settings.GetVideoFPS();
    397         oldDisplayData.m_iVideoCaptureBitRate = captureScreen0Settings.GetVideoRate();
    398         oldDisplayData.m_strVideoCaptureOptions = 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();
    406406    }
    407407
     
    443443    }
    444444
    445     /* Load old 'Video Capture' data from the cache: */
    446     m_pCheckboxVideoCapture->setChecked(oldDisplayData.m_fVideoCaptureEnabled);
    447     m_pEditorVideoCapturePath->setHomeDir(oldDisplayData.m_strVideoCaptureFolder);
    448     m_pEditorVideoCapturePath->setPath(oldDisplayData.m_strVideoCaptureFilePath);
    449     m_pEditorVideoCaptureWidth->setValue(oldDisplayData.m_iVideoCaptureFrameWidth);
    450     m_pEditorVideoCaptureHeight->setValue(oldDisplayData.m_iVideoCaptureFrameHeight);
    451     m_pEditorVideoCaptureFrameRate->setValue(oldDisplayData.m_iVideoCaptureFrameRate);
    452     m_pEditorVideoCaptureBitRate->setValue(oldDisplayData.m_iVideoCaptureBitRate);
    453     m_pScrollerVideoCaptureScreens->setValue(oldDisplayData.m_screens);
    454 
    455     /* Load data from old 'Video Capture Option': */
    456     bool fAudioCapture = UIDataSettingsMachineDisplay::isVideoCaptureOptionEnabled(oldDisplayData.m_strVideoCaptureOptions,
    457                                                                                    UIDataSettingsMachineDisplay::VideoCaptureOption_AC);
    458     bool fVideoCapture = UIDataSettingsMachineDisplay::isVideoCaptureOptionEnabled(oldDisplayData.m_strVideoCaptureOptions,
    459                                                                                    UIDataSettingsMachineDisplay::VideoCaptureOption_VC);
    460     if (fAudioCapture && fVideoCapture)
    461         m_pComboBoxCaptureMode->setCurrentIndex(static_cast<int>(UIDataSettingsMachineDisplay::CaptureMode_VideoAudio));
    462     else if (fAudioCapture && !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));
    464464    else
    465         m_pComboBoxCaptureMode->setCurrentIndex(static_cast<int>(UIDataSettingsMachineDisplay::CaptureMode_VideoOnly));
    466 
    467     m_pSliderAudioCaptureQuality->setValue(UIDataSettingsMachineDisplay::getAudioQualityFromOptions(oldDisplayData.m_strVideoCaptureOptions));
     465        m_pComboBoxCaptureMode->setCurrentIndex(static_cast<int>(UIDataSettingsMachineDisplay::RecordingMode_VideoOnly));
     466
     467    m_pSliderAudioCaptureQuality->setValue(UIDataSettingsMachineDisplay::getAudioQualityFromOptions(oldDisplayData.m_strRecordingVideoOptions));
    468468
    469469    /* Polish page finally: */
     
    500500    }
    501501
    502     /* Gather new 'Video Capture' data: */
    503     newDisplayData.m_fVideoCaptureEnabled = m_pCheckboxVideoCapture->isChecked();
    504     newDisplayData.m_strVideoCaptureFolder = m_pCache->base().m_strVideoCaptureFolder;
    505     newDisplayData.m_strVideoCaptureFilePath = m_pEditorVideoCapturePath->path();
    506     newDisplayData.m_iVideoCaptureFrameWidth = m_pEditorVideoCaptureWidth->value();
    507     newDisplayData.m_iVideoCaptureFrameHeight = m_pEditorVideoCaptureHeight->value();
    508     newDisplayData.m_iVideoCaptureFrameRate = m_pEditorVideoCaptureFrameRate->value();
    509     newDisplayData.m_iVideoCaptureBitRate = m_pEditorVideoCaptureBitRate->value();
    510     newDisplayData.m_screens = m_pScrollerVideoCaptureScreens->value();
    511 
    512     /* Update  video capture options */
     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 */
    513513    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");
    518518    if (m_pSliderAudioCaptureQuality->value() == 1)
    519519        optionValues.push_back("low");
     
    523523        optionValues.push_back("high");
    524524
    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_strVideoCaptureOptions = 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,
    532532                                                                                                   optionValues);
    533533
     
    688688    setTabOrder(m_pEditorRemoteDisplayTimeout, m_pCheckboxMultipleConn);
    689689
    690     /* Video Capture tab-order: */
     690    /* Recording tab-order: */
    691691    setTabOrder(m_pCheckboxMultipleConn, m_pCheckboxVideoCapture);
    692692    setTabOrder(m_pCheckboxVideoCapture, m_pEditorVideoCapturePath);
     
    718718    m_pComboRemoteDisplayAuthMethod->setItemText(2, gpConverter->toString(KAuthType_Guest));
    719719
    720     /* Video Capture stuff: */
     720    /* Recording stuff: */
    721721    m_pEditorVideoCaptureFrameRate->setSuffix(QString(" %1").arg(tr("fps")));
    722722    m_pEditorVideoCaptureBitRate->setSuffix(QString(" %1").arg(tr("kbps")));
     
    730730    m_pLabelAudioCaptureQualityMed->setText(tr("medium", "quality"));
    731731    m_pLabelAudioCaptureQualityMax->setText(tr("high", "quality"));
    732     updateVideoCaptureFileSizeHint();
     732    updateRecordingFileSizeHint();
    733733}
    734734
     
    765765    m_pCheckboxMultipleConn->setEnabled(isMachineOffline() || isMachineSaved());
    766766
    767     /* Polish 'Video Capture' availability: */
     767    /* Polish 'Recording' availability: */
    768768    m_pContainerVideoCapture->setEnabled(isMachineInValidMode());
    769     sltHandleVideoCaptureCheckboxToggle();
     769    sltHandleRecordingCheckboxToggle();
    770770}
    771771
     
    802802    checkVRAMRequirements();
    803803
    804     /* Update Video Capture tab screen count: */
     804    /* Update recording tab screen count: */
    805805    updateGuestScreenCount();
    806806
     
    819819    checkVRAMRequirements();
    820820
    821     /* Update Video Capture tab screen count: */
     821    /* Update recording tab screen count: */
    822822    updateGuestScreenCount();
    823823
     
    826826}
    827827
    828 void UIMachineSettingsDisplay::sltHandleVideoCaptureCheckboxToggle()
    829 {
    830     /* Video Capture options should be enabled only if:
     828void UIMachineSettingsDisplay::sltHandleRecordingCheckboxToggle()
     829{
     830    /* Recording options should be enabled only if:
    831831     * 1. Machine is in 'offline' or 'saved' state and check-box is checked,
    832832     * 2. Machine is in 'online' state, check-box is checked, and video recording is *disabled* currently. */
    833     const bool fIsVideoCaptureOptionsEnabled = ((isMachineOffline() || isMachineSaved()) && m_pCheckboxVideoCapture->isChecked()) ||
    834                                                (isMachineOnline() && !m_pCache->base().m_fVideoCaptureEnabled && m_pCheckboxVideoCapture->isChecked());
    835 
    836     m_pLabelCaptureMode->setEnabled(fIsVideoCaptureOptionsEnabled);
    837     m_pComboBoxCaptureMode->setEnabled(fIsVideoCaptureOptionsEnabled);
    838 
    839     m_pLabelVideoCapturePath->setEnabled(fIsVideoCaptureOptionsEnabled);
    840     m_pEditorVideoCapturePath->setEnabled(fIsVideoCaptureOptionsEnabled);
    841 
    842     enableDisableCaptureWidgets();
    843 }
    844 
    845 void UIMachineSettingsDisplay::sltHandleVideoCaptureFrameSizeComboboxChange()
     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
     845void UIMachineSettingsDisplay::sltHandleRecordingVideoFrameSizeComboboxChange()
    846846{
    847847    /* Get the proposed size: */
     
    858858}
    859859
    860 void UIMachineSettingsDisplay::sltHandleVideoCaptureFrameWidthEditorChange()
     860void UIMachineSettingsDisplay::sltHandleRecordingVideoFrameWidthEditorChange()
    861861{
    862862    /* Look for preset: */
    863863    lookForCorrespondingFrameSizePreset();
    864864    /* Update quality and bit-rate: */
    865     sltHandleVideoCaptureQualitySliderChange();
    866 }
    867 
    868 void UIMachineSettingsDisplay::sltHandleVideoCaptureFrameHeightEditorChange()
     865    sltHandleRecordingVideoQualitySliderChange();
     866}
     867
     868void UIMachineSettingsDisplay::sltHandleRecordingVideoFrameHeightEditorChange()
    869869{
    870870    /* Look for preset: */
    871871    lookForCorrespondingFrameSizePreset();
    872872    /* Update quality and bit-rate: */
    873     sltHandleVideoCaptureQualitySliderChange();
    874 }
    875 
    876 void UIMachineSettingsDisplay::sltHandleVideoCaptureFrameRateSliderChange()
     873    sltHandleRecordingVideoQualitySliderChange();
     874}
     875
     876void UIMachineSettingsDisplay::sltHandleRecordingVideoFrameRateSliderChange()
    877877{
    878878    /* Apply proposed frame-rate: */
     
    881881    m_pEditorVideoCaptureFrameRate->blockSignals(false);
    882882    /* Update quality and bit-rate: */
    883     sltHandleVideoCaptureQualitySliderChange();
    884 }
    885 
    886 void UIMachineSettingsDisplay::sltHandleVideoCaptureFrameRateEditorChange()
     883    sltHandleRecordingVideoQualitySliderChange();
     884}
     885
     886void UIMachineSettingsDisplay::sltHandleRecordingVideoFrameRateEditorChange()
    887887{
    888888    /* Apply proposed frame-rate: */
     
    891891    m_pSliderVideoCaptureFrameRate->blockSignals(false);
    892892    /* Update quality and bit-rate: */
    893     sltHandleVideoCaptureQualitySliderChange();
    894 }
    895 
    896 void UIMachineSettingsDisplay::sltHandleVideoCaptureQualitySliderChange()
     893    sltHandleRecordingVideoQualitySliderChange();
     894}
     895
     896void UIMachineSettingsDisplay::sltHandleRecordingVideoQualitySliderChange()
    897897{
    898898    /* Calculate/apply proposed bit-rate: */
     
    903903                                                            m_pSliderVideoCaptureQuality->value()));
    904904    m_pEditorVideoCaptureBitRate->blockSignals(false);
    905     updateVideoCaptureFileSizeHint();
    906 }
    907 
    908 void UIMachineSettingsDisplay::sltHandleVideoCaptureBitRateEditorChange()
     905    updateRecordingFileSizeHint();
     906}
     907
     908void UIMachineSettingsDisplay::sltHandleRecordingVideoBitRateEditorChange()
    909909{
    910910    /* Calculate/apply proposed quality: */
     
    915915                                                            m_pEditorVideoCaptureBitRate->value()));
    916916    m_pSliderVideoCaptureQuality->blockSignals(false);
    917     updateVideoCaptureFileSizeHint();
    918 }
    919 
    920 void UIMachineSettingsDisplay::sltHandleCaptureComboBoxChange()
    921 {
    922     enableDisableCaptureWidgets();
     917    updateRecordingFileSizeHint();
     918}
     919
     920void UIMachineSettingsDisplay::sltHandleRecordingComboBoxChange()
     921{
     922    enableDisableRecordingWidgets();
    923923}
    924924
     
    938938        /* Prepare 'Remote Display' tab: */
    939939        prepareTabRemoteDisplay();
    940         /* Prepare 'Video Capture' tab: */
    941         prepareTabVideoCapture();
     940        /* Prepare 'Recording' tab: */
     941        prepareTabRecording();
    942942        /* Prepare connections: */
    943943        prepareConnections();
     
    10451045}
    10461046
    1047 void UIMachineSettingsDisplay::prepareTabVideoCapture()
     1047void UIMachineSettingsDisplay::prepareTabRecording()
    10481048{
    10491049    /* Tab and it's layout created in the .ui file. */
     
    10521052        AssertPtrReturnVoid(m_pComboBoxCaptureMode);
    10531053        {
    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");
    10571057        }
    10581058
     
    11951195    connect(m_pEditorRemoteDisplayTimeout, SIGNAL(textChanged(const QString &)), this, SLOT(revalidate()));
    11961196
    1197     /* Configure 'Video Capture' connections: */
    1198     connect(m_pCheckboxVideoCapture, SIGNAL(toggled(bool)), this, SLOT(sltHandleVideoCaptureCheckboxToggle()));
    1199     connect(m_pComboVideoCaptureSize, SIGNAL(currentIndexChanged(int)), this, SLOT(sltHandleVideoCaptureFrameSizeComboboxChange()));
    1200     connect(m_pEditorVideoCaptureWidth, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoCaptureFrameWidthEditorChange()));
    1201     connect(m_pEditorVideoCaptureHeight, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoCaptureFrameHeightEditorChange()));
    1202     connect(m_pSliderVideoCaptureFrameRate, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoCaptureFrameRateSliderChange()));
    1203     connect(m_pEditorVideoCaptureFrameRate, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoCaptureFrameRateEditorChange()));
    1204     connect(m_pSliderVideoCaptureQuality, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoCaptureQualitySliderChange()));
    1205     connect(m_pEditorVideoCaptureBitRate, SIGNAL(valueChanged(int)), this, SLOT(sltHandleVideoCaptureBitRateEditorChange()));
     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()));
    12061206
    12071207    connect(m_pComboBoxCaptureMode, static_cast<void(QComboBox::*)(int)>(&QComboBox::currentIndexChanged),
    1208                 this, &UIMachineSettingsDisplay::sltHandleCaptureComboBoxChange);
     1208                this, &UIMachineSettingsDisplay::sltHandleRecordingComboBoxChange);
    12091209}
    12101210
     
    13051305{
    13061306    /* 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;
    13081308    screens.resize(m_pEditorVideoScreenCount->value());
    13091309    m_pScrollerVideoCaptureScreens->setValue(screens);
     
    13111311}
    13121312
    1313 void UIMachineSettingsDisplay::updateVideoCaptureFileSizeHint()
     1313void UIMachineSettingsDisplay::updateRecordingFileSizeHint()
    13141314{
    13151315    m_pLabelVideoCaptureSizeHint->setText(tr("<i>About %1MB per 5 minute video</i>").arg(m_pEditorVideoCaptureBitRate->value() * 300 / 8 / 1024));
     
    13661366        /* Save 'Video Capture' data from the cache: */
    13671367        if (fSuccess)
    1368             fSuccess = saveVideoCaptureData();
     1368            fSuccess = saveRecordingData();
    13691369    }
    13701370    /* Return result: */
     
    14961496}
    14971497
    1498 bool UIMachineSettingsDisplay::saveVideoCaptureData()
     1498bool UIMachineSettingsDisplay::saveRecordingData()
    14991499{
    15001500    /* Prepare result: */
    15011501    bool fSuccess = true;
    1502     /* Save 'Video Capture' data from the cache: */
     1502    /* Save 'Recording' data from the cache: */
    15031503    if (fSuccess)
    15041504    {
     
    15081508        const UIDataSettingsMachineDisplay &newDisplayData = m_pCache->data();
    15091509
    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: */
    15131513        if (isMachineOnline())
    15141514        {
    1515             /* If 'Video Capture' was *enabled*: */
    1516             if (oldDisplayData.m_fVideoCaptureEnabled)
     1515            /* If 'Recording' was *enabled*: */
     1516            if (oldDisplayData.m_fRecordingEnabled)
    15171517            {
    1518                 /* Save whether capture is enabled: */
    1519                 if (fSuccess && newDisplayData.m_fVideoCaptureEnabled != oldDisplayData.m_fVideoCaptureEnabled)
     1518                /* Save whether recording is enabled: */
     1519                if (fSuccess && newDisplayData.m_fRecordingEnabled != oldDisplayData.m_fRecordingEnabled)
    15201520                {
    1521                     captureSettings.SetEnabled(newDisplayData.m_fVideoCaptureEnabled);
    1522                     fSuccess = captureSettings.isOk();
     1521                    recordingSettings.SetEnabled(newDisplayData.m_fRecordingEnabled);
     1522                    fSuccess = recordingSettings.isOk();
    15231523                }
    15241524
    15251525                // We can still save the *screens* option.
    1526                 /* Save video capture screens: */
    1527                 if (fSuccess && newDisplayData.m_screens != oldDisplayData.m_screens)
     1526                /* Save recording screens: */
     1527                if (fSuccess && newDisplayData.m_vecRecordingScreens != oldDisplayData.m_vecRecordingScreens)
    15281528                {
    1529                     CCaptureScreenSettingsVector captureScreenSettingsVector = captureSettings.GetScreens();
     1529                    CCaptureScreenSettingsVector captureScreenSettingsVector = recordingSettings.GetScreens();
    15301530                    for (int iScreenIndex = 0; fSuccess && iScreenIndex < captureScreenSettingsVector.size(); ++iScreenIndex)
    15311531                    {
    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();
    15351535                    }
    15361536                }
    15371537            }
    1538             /* If 'Video Capture' was *disabled*: */
     1538            /* If 'Recording' was *disabled*: */
    15391539            else
    15401540            {
    1541                 /* Save whether capture is enabled: */
    1542                 if (fSuccess && newDisplayData.m_fVideoCaptureEnabled != oldDisplayData.m_fVideoCaptureEnabled)
     1541                /* Save whether recording is enabled: */
     1542                if (fSuccess && newDisplayData.m_fRecordingEnabled != oldDisplayData.m_fRecordingEnabled)
    15431543                {
    1544                     captureSettings.SetEnabled(newDisplayData.m_fVideoCaptureEnabled);
    1545                     fSuccess = captureSettings.isOk();
     1544                    recordingSettings.SetEnabled(newDisplayData.m_fRecordingEnabled);
     1545                    fSuccess = recordingSettings.isOk();
    15461546                }
    15471547
    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)
    15501550                {
    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 Capture if necessary.
    1555                     /* Save video capture file path: */
    1556                     if (fSuccess && newDisplayData.m_strVideoCaptureFilePath != 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)
    15571557                    {
    1558                         captureScreenSettings.SetFileName(newDisplayData.m_strVideoCaptureFilePath);
    1559                         fSuccess = captureScreenSettings.isOk();
     1558                        recordingScreenSettings.SetFileName(newDisplayData.m_strRecordingFilePath);
     1559                        fSuccess = recordingScreenSettings.isOk();
    15601560                    }
    1561                     /* Save video capture frame width: */
    1562                     if (fSuccess && newDisplayData.m_iVideoCaptureFrameWidth != oldDisplayData.m_iVideoCaptureFrameWidth)
     1561                    /* Save recording frame width: */
     1562                    if (fSuccess && newDisplayData.m_iRecordingVideoFrameWidth != oldDisplayData.m_iRecordingVideoFrameWidth)
    15631563                    {
    1564                         captureScreenSettings.SetVideoWidth(newDisplayData.m_iVideoCaptureFrameWidth);
    1565                         fSuccess = captureScreenSettings.isOk();
     1564                        recordingScreenSettings.SetVideoWidth(newDisplayData.m_iRecordingVideoFrameWidth);
     1565                        fSuccess = recordingScreenSettings.isOk();
    15661566                    }
    1567                     /* Save video capture frame height: */
    1568                     if (fSuccess && newDisplayData.m_iVideoCaptureFrameHeight != oldDisplayData.m_iVideoCaptureFrameHeight)
     1567                    /* Save recording frame height: */
     1568                    if (fSuccess && newDisplayData.m_iRecordingVideoFrameHeight != oldDisplayData.m_iRecordingVideoFrameHeight)
    15691569                    {
    1570                         captureScreenSettings.SetVideoHeight(newDisplayData.m_iVideoCaptureFrameHeight);
    1571                         fSuccess = captureScreenSettings.isOk();
     1570                        recordingScreenSettings.SetVideoHeight(newDisplayData.m_iRecordingVideoFrameHeight);
     1571                        fSuccess = recordingScreenSettings.isOk();
    15721572                    }
    1573                     /* Save video capture frame rate: */
    1574                     if (fSuccess && newDisplayData.m_iVideoCaptureFrameRate != oldDisplayData.m_iVideoCaptureFrameRate)
     1573                    /* Save recording frame rate: */
     1574                    if (fSuccess && newDisplayData.m_iRecordingVideoFrameRate != oldDisplayData.m_iRecordingVideoFrameRate)
    15751575                    {
    1576                         captureScreenSettings.SetVideoFPS(newDisplayData.m_iVideoCaptureFrameRate);
    1577                         fSuccess = captureScreenSettings.isOk();
     1576                        recordingScreenSettings.SetVideoFPS(newDisplayData.m_iRecordingVideoFrameRate);
     1577                        fSuccess = recordingScreenSettings.isOk();
    15781578                    }
    1579                     /* Save video capture frame bit rate: */
    1580                     if (fSuccess && newDisplayData.m_iVideoCaptureBitRate != oldDisplayData.m_iVideoCaptureBitRate)
     1579                    /* Save recording frame bit rate: */
     1580                    if (fSuccess && newDisplayData.m_iRecordingVideoBitRate != oldDisplayData.m_iRecordingVideoBitRate)
    15811581                    {
    1582                         captureScreenSettings.SetVideoRate(newDisplayData.m_iVideoCaptureBitRate);
    1583                         fSuccess = captureScreenSettings.isOk();
     1582                        recordingScreenSettings.SetVideoRate(newDisplayData.m_iRecordingVideoBitRate);
     1583                        fSuccess = recordingScreenSettings.isOk();
    15841584                    }
    1585                     /* Save video capture screens: */
    1586                     if (fSuccess && newDisplayData.m_screens != oldDisplayData.m_screens)
     1585                    /* Save recording screens: */
     1586                    if (fSuccess && newDisplayData.m_vecRecordingScreens != oldDisplayData.m_vecRecordingScreens)
    15871587                    {
    1588                         captureScreenSettings.SetEnabled(newDisplayData.m_screens[iScreenIndex]);
    1589                         fSuccess = captureScreenSettings.isOk();
     1588                        recordingScreenSettings.SetEnabled(newDisplayData.m_vecRecordingScreens[iScreenIndex]);
     1589                        fSuccess = recordingScreenSettings.isOk();
    15901590                    }
    1591                     /* Save video capture options: */
    1592                     if (fSuccess && newDisplayData.m_strVideoCaptureOptions != oldDisplayData.m_strVideoCaptureOptions)
     1591                    /* Save recording options: */
     1592                    if (fSuccess && newDisplayData.m_strRecordingVideoOptions != oldDisplayData.m_strRecordingVideoOptions)
    15931593                    {
    1594                         captureScreenSettings.SetOptions(newDisplayData.m_strVideoCaptureOptions);
    1595                         fSuccess = captureScreenSettings.isOk();
     1594                        recordingScreenSettings.SetOptions(newDisplayData.m_strRecordingVideoOptions);
     1595                        fSuccess = recordingScreenSettings.isOk();
    15961596                    }
    15971597                }
    15981598            }
    15991599        }
    1600         /* Save new 'Video Capture' data for offline case: */
     1600        /* Save new 'Recording' data for offline case: */
    16011601        else
    16021602        {
    16031603            // For 'offline', 'powered off' and 'saved' states the order is irrelevant.
    1604             /* Save whether video capture is enabled: */
    1605             if (fSuccess && newDisplayData.m_fVideoCaptureEnabled != oldDisplayData.m_fVideoCaptureEnabled)
     1604            /* Save whether recording is enabled: */
     1605            if (fSuccess && newDisplayData.m_fRecordingEnabled != oldDisplayData.m_fRecordingEnabled)
    16061606            {
    1607                 captureSettings.SetEnabled(newDisplayData.m_fVideoCaptureEnabled);
    1608                 fSuccess = captureSettings.isOk();
     1607                recordingSettings.SetEnabled(newDisplayData.m_fRecordingEnabled);
     1608                fSuccess = recordingSettings.isOk();
    16091609            }
    16101610
    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)
    16131613            {
    1614                 CCaptureScreenSettings captureScreenSettings = captureScreenSettingsVector.at(iScreenIndex);
    1615 
    1616                 /* Save video capture file path: */
    1617                 if (fSuccess && newDisplayData.m_strVideoCaptureFilePath != oldDisplayData.m_strVideoCaptureFilePath)
     1614                CCaptureScreenSettings recordingScreenSettings = recordingScreenSettingsVector.at(iScreenIndex);
     1615
     1616                /* Save recording file path: */
     1617                if (fSuccess && newDisplayData.m_strRecordingFilePath != oldDisplayData.m_strRecordingFilePath)
    16181618                {
    1619                     captureScreenSettings.SetFileName(newDisplayData.m_strVideoCaptureFilePath);
    1620                     fSuccess = captureScreenSettings.isOk();
     1619                    recordingScreenSettings.SetFileName(newDisplayData.m_strRecordingFilePath);
     1620                    fSuccess = recordingScreenSettings.isOk();
    16211621                }
    1622                 /* Save video capture frame width: */
    1623                 if (fSuccess && newDisplayData.m_iVideoCaptureFrameWidth != oldDisplayData.m_iVideoCaptureFrameWidth)
     1622                /* Save recording frame width: */
     1623                if (fSuccess && newDisplayData.m_iRecordingVideoFrameWidth != oldDisplayData.m_iRecordingVideoFrameWidth)
    16241624                {
    1625                     captureScreenSettings.SetVideoWidth(newDisplayData.m_iVideoCaptureFrameWidth);
    1626                     fSuccess = captureScreenSettings.isOk();
     1625                    recordingScreenSettings.SetVideoWidth(newDisplayData.m_iRecordingVideoFrameWidth);
     1626                    fSuccess = recordingScreenSettings.isOk();
    16271627                }
    1628                 /* Save video capture frame height: */
    1629                 if (fSuccess && newDisplayData.m_iVideoCaptureFrameHeight != oldDisplayData.m_iVideoCaptureFrameHeight)
     1628                /* Save recording frame height: */
     1629                if (fSuccess && newDisplayData.m_iRecordingVideoFrameHeight != oldDisplayData.m_iRecordingVideoFrameHeight)
    16301630                {
    1631                     captureScreenSettings.SetVideoHeight(newDisplayData.m_iVideoCaptureFrameHeight);
    1632                     fSuccess = captureScreenSettings.isOk();
     1631                    recordingScreenSettings.SetVideoHeight(newDisplayData.m_iRecordingVideoFrameHeight);
     1632                    fSuccess = recordingScreenSettings.isOk();
    16331633                }
    1634                 /* Save video capture frame rate: */
    1635                 if (fSuccess && newDisplayData.m_iVideoCaptureFrameRate != oldDisplayData.m_iVideoCaptureFrameRate)
     1634                /* Save recording frame rate: */
     1635                if (fSuccess && newDisplayData.m_iRecordingVideoFrameRate != oldDisplayData.m_iRecordingVideoFrameRate)
    16361636                {
    1637                     captureScreenSettings.SetVideoFPS(newDisplayData.m_iVideoCaptureFrameRate);
    1638                     fSuccess = captureScreenSettings.isOk();
     1637                    recordingScreenSettings.SetVideoFPS(newDisplayData.m_iRecordingVideoFrameRate);
     1638                    fSuccess = recordingScreenSettings.isOk();
    16391639                }
    1640                 /* Save video capture frame bit rate: */
    1641                 if (fSuccess && newDisplayData.m_iVideoCaptureBitRate != oldDisplayData.m_iVideoCaptureBitRate)
     1640                /* Save recording frame bit rate: */
     1641                if (fSuccess && newDisplayData.m_iRecordingVideoBitRate != oldDisplayData.m_iRecordingVideoBitRate)
    16421642                {
    1643                     captureScreenSettings.SetVideoRate(newDisplayData.m_iVideoCaptureBitRate);
    1644                     fSuccess = captureScreenSettings.isOk();
     1643                    recordingScreenSettings.SetVideoRate(newDisplayData.m_iRecordingVideoBitRate);
     1644                    fSuccess = recordingScreenSettings.isOk();
    16451645                }
    16461646                /* Save capture options: */
    1647                 if (fSuccess && newDisplayData.m_strVideoCaptureOptions != oldDisplayData.m_strVideoCaptureOptions)
     1647                if (fSuccess && newDisplayData.m_strRecordingVideoOptions != oldDisplayData.m_strRecordingVideoOptions)
    16481648                {
    1649                     captureScreenSettings.SetOptions(newDisplayData.m_strVideoCaptureOptions);
    1650                     fSuccess = captureScreenSettings.isOk();
     1649                    recordingScreenSettings.SetOptions(newDisplayData.m_strRecordingVideoOptions);
     1650                    fSuccess = recordingScreenSettings.isOk();
    16511651                }
    16521652                /* Save screen enabled state: */
    1653                 if (fSuccess && newDisplayData.m_screens != oldDisplayData.m_screens)
     1653                if (fSuccess && newDisplayData.m_vecRecordingScreens != oldDisplayData.m_vecRecordingScreens)
    16541654                {
    1655                     captureScreenSettings.SetEnabled(newDisplayData.m_screens[iScreenIndex]);
    1656                     fSuccess = captureScreenSettings.isOk();
     1655                    recordingScreenSettings.SetEnabled(newDisplayData.m_vecRecordingScreens[iScreenIndex]);
     1656                    fSuccess = recordingScreenSettings.isOk();
    16571657                }
    16581658            }
     
    16671667}
    16681668
    1669 void UIMachineSettingsDisplay::enableDisableCaptureWidgets()
    1670 {
    1671     /* Video Capture options should be enabled only if:
     1669void UIMachineSettingsDisplay::enableDisableRecordingWidgets()
     1670{
     1671    /* Recording options should be enabled only if:
    16721672     * 1. Machine is in 'offline' or 'saved' state and check-box is checked,
    16731673     * 2. Machine is in 'online' state, check-box is checked, and video recording is *disabled* currently. */
    1674     const bool fIsVideoCaptureOptionsEnabled = ((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());
    16791679
    16801680    /* Video Capture Screens option should be enabled only if:
     
    16821682    const bool fIsVideoCaptureScreenOptionEnabled = isMachineInValidMode() && m_pCheckboxVideoCapture->isChecked();
    16831683
    1684     bool fVideoCapture = enmCaptureMode == UIDataSettingsMachineDisplay::CaptureMode_VideoOnly ||
    1685         enmCaptureMode == UIDataSettingsMachineDisplay::CaptureMode_VideoAudio;
    1686     bool fAudioCapture = enmCaptureMode == UIDataSettingsMachineDisplay::CaptureMode_AudioOnly ||
    1687         enmCaptureMode == UIDataSettingsMachineDisplay::CaptureMode_VideoAudio;
    1688 
    1689     m_pLabelVideoCaptureSize->setEnabled(fIsVideoCaptureOptionsEnabled && fVideoCapture);
    1690     m_pComboVideoCaptureSize->setEnabled(fIsVideoCaptureOptionsEnabled && fVideoCapture);
    1691     m_pEditorVideoCaptureWidth->setEnabled(fIsVideoCaptureOptionsEnabled && fVideoCapture);
    1692     m_pEditorVideoCaptureHeight->setEnabled(fIsVideoCaptureOptionsEnabled && fVideoCapture);
    1693 
    1694     m_pLabelVideoCaptureFrameRate->setEnabled(fIsVideoCaptureOptionsEnabled && fVideoCapture);
    1695     m_pContainerSliderVideoCaptureFrameRate->setEnabled(fIsVideoCaptureOptionsEnabled && fVideoCapture);
    1696     m_pEditorVideoCaptureFrameRate->setEnabled(fIsVideoCaptureOptionsEnabled && fVideoCapture);
    1697 
    1698     m_pLabelVideoCaptureRate->setEnabled(fIsVideoCaptureOptionsEnabled && fVideoCapture);
    1699     m_pContainerSliderVideoCaptureQuality->setEnabled(fIsVideoCaptureOptionsEnabled && fVideoCapture);
    1700     m_pEditorVideoCaptureBitRate->setEnabled(fIsVideoCaptureOptionsEnabled && fVideoCapture);
    1701     m_pScrollerVideoCaptureScreens->setEnabled(fIsVideoCaptureScreenOptionEnabled && fVideoCapture);
    1702 
    1703     m_pAudioCaptureQualityLabel->setEnabled(fIsVideoCaptureOptionsEnabled && fAudioCapture);
    1704     m_pContainerSliderAudioCaptureQuality->setEnabled(fIsVideoCaptureOptionsEnabled && fAudioCapture);
    1705 
    1706     m_pLabelVideoCaptureScreens->setEnabled(fIsVideoCaptureScreenOptionEnabled && fVideoCapture);
    1707     m_pLabelVideoCaptureSizeHint->setEnabled(fIsVideoCaptureScreenOptionEnabled && fVideoCapture);
    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  
    9494    void sltHandleGuestScreenCountEditorChange();
    9595
    96     /** Handles Video Capture toggle. */
    97     void sltHandleVideoCaptureCheckboxToggle();
    98     /** Handles Video Capture frame size change. */
    99     void sltHandleVideoCaptureFrameSizeComboboxChange();
    100     /** Handles Video Capture frame width change. */
    101     void sltHandleVideoCaptureFrameWidthEditorChange();
    102     /** Handles Video Capture frame height change. */
    103     void sltHandleVideoCaptureFrameHeightEditorChange();
    104     /** Handles Video Capture frame rate slider change. */
    105     void sltHandleVideoCaptureFrameRateSliderChange();
    106     /** Handles Video Capture frame rate editor change. */
    107     void sltHandleVideoCaptureFrameRateEditorChange();
    108     /** Handles Video Capture quality slider change. */
    109     void sltHandleVideoCaptureQualitySliderChange();
    110     /** Handles Video Capture bit-rate editor change. */
    111     void sltHandleVideoCaptureBitRateEditorChange();
    112     void sltHandleCaptureComboBoxChange();
     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();
    113113
    114114private:
     
    120120    /** Prepares 'Remote Display' tab. */
    121121    void prepareTabRemoteDisplay();
    122     /** Prepares 'Video Capture' tab. */
    123     void prepareTabVideoCapture();
     122    /** Prepares 'Recording' tab. */
     123    void prepareTabRecording();
    124124    /** Prepares connections. */
    125125    void prepareConnections();
     
    138138    /** Updates guest-screen count. */
    139139    void updateGuestScreenCount();
    140     /** Updates video capture file size hint. */
    141     void updateVideoCaptureFileSizeHint();
     140    /** Updates recording file size hint. */
     141    void updateRecordingFileSizeHint();
    142142    /** Searches for the @a data field in corresponding @a pComboBox. */
    143143    static void lookForCorrespondingPreset(QComboBox *pComboBox, const QVariant &data);
    144     /** Calculates Video Capture bit-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. */
    145145    static int calculateBitRate(int iFrameWidth, int iFrameHeight, int iFrameRate, int iQuality);
    146     /** Calculates Video Capture quality 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. */
    147147    static int calculateQuality(int iFrameWidth, int iFrameHeight, int iFrameRate, int iBitRate);
    148148    /** Saves existing display data from the cache. */
     
    152152    /** Saves existing 'Remote Display' data from the cache. */
    153153    bool saveRemoteDisplayData();
    154     /** Saves existing 'Video Capture' data from the cache. */
    155     bool saveVideoCaptureData();
    156     /** Decide which of the capture related widgets are to be disabled/enabled. */
    157     void enableDisableCaptureWidgets();
     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();
    158158
    159159    /** Holds the guest OS type ID. */
  • trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.cpp

    r75251 r75291  
    13711371            }
    13721372
    1373             /* Video Capture: */
    1374             QStringList aVideoCaptureReport = videoCaptureReport(comMachine);
    1375             QStringList aVideoCaptureReportOld = videoCaptureReport(comMachineOld);
    1376             if (!aVideoCaptureReport.isEmpty())
    1377             {
    1378                 ++iRowCount;
    1379                 strItem += QString(sSectionItemTpl2).arg(QApplication::translate("UIGDetails", "Video Capture File", "details (display/video capture)"),
    1380                                                          empReport(aVideoCaptureReport.value(0), aVideoCaptureReportOld.value(0)));
    1381                 ++iRowCount;
    1382                 strItem += QString(sSectionItemTpl2).arg(QApplication::translate("UIGDetails", "Video Capture Attributes", "details (display/video capture)"),
    1383                                                          empReport(aVideoCaptureReport.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)));
    13841384            }
    13851385            else
    13861386            {
    13871387                ++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)"), aVideoCaptureReportOld.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()));
    13901390            }
    13911391
     
    17431743
    17441744/* static */
    1745 QStringList UISnapshotDetailsWidget::videoCaptureReport(CMachine comMachine)
     1745QStringList UISnapshotDetailsWidget::recordingReport(CMachine comMachine)
    17461746{
    17471747    /* Prepare report: */
    17481748    QStringList aReport;
    1749     /* Acquire capture status: */
    1750     CCaptureSettings captureSettings = comMachine.GetCaptureSettings();
     1749    /* Acquire recording status: */
     1750    CCaptureSettings recordingSettings = comMachine.GetCaptureSettings();
    17511751    /* 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: */
    17581758        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());
    17631763    }
    17641764    /* Return report: */
  • trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.h

    r71104 r75291  
    162162    /** Acquires @a comMachine VRDE server report. */
    163163    static QStringList vrdeServerReport(CMachine comMachine);
    164     /** Acquires @a comMachine video capture report. */
    165     static QStringList videoCaptureReport(CMachine comMachine);
     164    /** Acquires @a comMachine recording report. */
     165    static QStringList recordingReport(CMachine comMachine);
    166166    /** Acquires @a comMachine storage report. */
    167167    static QPair<QStringList, QList<QMap<QString, QString> > > storageReport(CMachine comMachine);
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMenuBarEditorWindow.cpp

    r75251 r75291  
    13041304        pMenu->addSeparator();
    13051305        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));
    13071307        prepareCopiedAction(pMenu, actionPool()->action(UIActionIndexRT_M_View_T_VRDEServer));
    13081308        pMenu->addSeparator();
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette