VirtualBox

Changeset 75319 in vbox


Ignore:
Timestamp:
Nov 8, 2018 10:56:06 AM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
126435
Message:

FE/Qt: A bit of fixes for video/audio capture => recording refactoring.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp

    r75291 r75319  
    609609        case UIExtraDataMetaDefs::RuntimeMenuViewActionType_GuestAutoresize:      strResult = "GuestAutoresize"; break;
    610610        case UIExtraDataMetaDefs::RuntimeMenuViewActionType_TakeScreenshot:       strResult = "TakeScreenshot"; 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;
     611        case UIExtraDataMetaDefs::RuntimeMenuViewActionType_Recording:            strResult = "Recording"; break;
     612        case UIExtraDataMetaDefs::RuntimeMenuViewActionType_RecordingSettings:    strResult = "RecordingSettings"; break;
     613        case UIExtraDataMetaDefs::RuntimeMenuViewActionType_StartRecording:       strResult = "StartRecording"; 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_Recording;
    652     keys << "VideoCaptureSettings"; values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_RecordingSettings;
    653     keys << "StartVideoCapture";    values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_StartRecording;
     651    keys << "Recording";            values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_Recording;
     652    keys << "RecordingSettings";    values << UIExtraDataMetaDefs::RuntimeMenuViewActionType_RecordingSettings;
     653    keys << "StartRecording";       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_Recording:     strResult = "VideoCapture"; break;
     1405        case IndicatorType_Recording:     strResult = "Recording"; 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_Recording;
     1432    keys << "Recording";     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_Recording:     strResult = QApplication::translate("VBoxGlobal", "Video Capture", "IndicatorType"); break;
     1457        case IndicatorType_Recording:     strResult = QApplication::translate("VBoxGlobal", "Recording", "IndicatorType"); break;
    14581458        case IndicatorType_Features:      strResult = QApplication::translate("VBoxGlobal", "Features", "IndicatorType"); break;
    14591459        case IndicatorType_Mouse:         strResult = QApplication::translate("VBoxGlobal", "Mouse", "IndicatorType"); break;
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.cpp

    r75291 r75319  
    10831083    virtual void retranslateUi() /* override */
    10841084    {
    1085         setName(QApplication::translate("UIActionPool", "Audio/&Video Capture"));
     1085        setName(QApplication::translate("UIActionPool", "&Recording"));
    10861086    }
    10871087};
     
    11201120    virtual QString shortcutExtraDataID() const /* override */
    11211121    {
    1122         return QString("VideoCaptureSettingsDialog");
    1123     }
    1124 
    1125     /** Handles translation event. */
    1126     virtual void retranslateUi() /* override */
    1127     {
    1128         setName(QApplication::translate("UIActionPool", "&Video Capture Settings..."));
    1129         setStatusTip(QApplication::translate("UIActionPool", "Display virtual machine settings window to configure video capture"));
     1122        return QString("RecordingSettingsDialog");
     1123    }
     1124
     1125    /** Handles translation event. */
     1126    virtual void retranslateUi() /* override */
     1127    {
     1128        setName(QApplication::translate("UIActionPool", "&Recording Settings..."));
     1129        setStatusTip(QApplication::translate("UIActionPool", "Display virtual machine settings window to configure video/audio recording"));
    11301130    }
    11311131};
     
    11671167    virtual QString shortcutExtraDataID() const /* override */
    11681168    {
    1169         return QString("VideoCapture");
    1170     }
    1171 
    1172     /** Handles translation event. */
    1173     virtual void retranslateUi() /* override */
    1174     {
    1175         setName(QApplication::translate("UIActionPool", "Audio/&Video Capture"));
    1176         setStatusTip(QApplication::translate("UIActionPool", "Enable guest display video capture"));
     1169        return QString("Recording");
     1170    }
     1171
     1172    /** Handles translation event. */
     1173    virtual void retranslateUi() /* override */
     1174    {
     1175        setName(QApplication::translate("UIActionPool", "&Recording"));
     1176        setStatusTip(QApplication::translate("UIActionPool", "Enable guest video/audio recording"));
    11771177    }
    11781178};
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h

    r75291 r75319  
    124124        /** Notifies about VRDE device state change. */
    125125        void sigVRDEChange();
    126         /** Notifies about capture state change. */
     126        /** Notifies about recording state change. */
    127127        void sigRecordingChange();
    128128        /** Notifies about USB controller state change. */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp

    r75291 r75319  
    574574    /* Get machine-name preserving error-info: */
    575575    QString strMachineName(CMachine(comMachine).GetName());
    576     alertWithDetails(pParent, "cannotToggleVideoCapture",
     576    alertWithDetails(pParent, "cannotToggleRecording",
    577577                     fEnable ?
    578                      QApplication::translate("UIMessageCenter", "Failed to enable video capturing for the virtual machine <b>%1</b>.").arg(strMachineName) :
    579                      QApplication::translate("UIMessageCenter", "Failed to disable video capturing for the virtual machine <b>%1</b>.").arg(strMachineName),
     578                     QApplication::translate("UIMessageCenter", "Failed to enable recording for the virtual machine <b>%1</b>.").arg(strMachineName) :
     579                     QApplication::translate("UIMessageCenter", "Failed to disable recording for the virtual machine <b>%1</b>.").arg(strMachineName),
    580580                     UIErrorString::formatErrorInfo(comMachine));
    581581}
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElements.cpp

    r75291 r75319  
    450450
    451451        /* Recording info: */
    452         CCaptureSettings captureSettings = machine.GetCaptureSettings();
    453         if (captureSettings.GetEnabled())
     452        CCaptureSettings comRecordingSettings = machine.GetCaptureSettings();
     453        if (comRecordingSettings.GetEnabled())
    454454        {
    455455            /* For now all screens have the same config: */
    456             CCaptureScreenSettings captureScreen0Settings = captureSettings.GetScreenSettings(0);
     456            CCaptureScreenSettings comRecordingScreen0Settings = comRecordingSettings.GetScreenSettings(0);
    457457
    458458            /** @todo r=andy Refine these texts (wrt audio and/or video). */
    459             table << UITextTableLine(QApplication::translate("UIDetails", "Recording File", "details (display/video capture)"),
    460                                      captureScreen0Settings.GetFileName());
    461             table << UITextTableLine(QApplication::translate("UIDetails", "Recording Attributes", "details (display/video capture)"),
     459            table << UITextTableLine(QApplication::translate("UIDetails", "Recording File", "details (display/recording)"),
     460                                     comRecordingScreen0Settings.GetFileName());
     461            table << UITextTableLine(QApplication::translate("UIDetails", "Recording Attributes", "details (display/recording)"),
    462462                                     QApplication::translate("UIDetails", "Frame Size: %1x%2, Frame Rate: %3fps, Bit Rate: %4kbps")
    463                                          .arg(captureScreen0Settings.GetVideoWidth()).arg(captureScreen0Settings.GetVideoHeight())
    464                                          .arg(captureScreen0Settings.GetVideoFPS()).arg(captureScreen0Settings.GetVideoRate()));
     463                                         .arg(comRecordingScreen0Settings.GetVideoWidth()).arg(comRecordingScreen0Settings.GetVideoHeight())
     464                                         .arg(comRecordingScreen0Settings.GetVideoFPS()).arg(comRecordingScreen0Settings.GetVideoRate()));
    465465        }
    466466        else
    467467        {
    468468            /** @todo r=andy Refine these texts (wrt audio and/or video). */
    469             table << UITextTableLine(QApplication::translate("UIDetails", "Recording", "details (display/video capture)"),
    470                                      QApplication::translate("UIDetails", "Disabled", "details (display/video capture)"));
     469            table << UITextTableLine(QApplication::translate("UIDetails", "Recording", "details (display/recording)"),
     470                                     QApplication::translate("UIDetails", "Disabled", "details (display/recording)"));
    471471        }
    472472    }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp

    r75313 r75319  
    813813        , m_pAnimation(0)
    814814        , m_dRotationAngle(0)
    815         , m_eRecordingMode(UIIndicatorStateRecordingMode_None)
     815        , m_enmRecordingMode(UIIndicatorStateRecordingMode_None)
    816816    {
    817817        /* Assign state-icons: */
     
    880880    {
    881881        /* Get machine: */
    882         const CMachine machine = m_pSession->machine();
     882        const CMachine comMachine = m_pSession->machine();
    883883        const bool fMachinePaused = m_pSession->isPaused();
    884884
    885885        /* Update indicator state early: */
    886         CCaptureSettings captureSettings = machine.GetCaptureSettings();
    887         Assert(captureSettings.isOk());
    888         if (!captureSettings.GetEnabled())
     886        CCaptureSettings comRecordingSettings = comMachine.GetCaptureSettings();
     887        Assert(comRecordingSettings.isOk());
     888        if (!comRecordingSettings.GetEnabled())
    889889            setState(UIIndicatorStateRecording_Disabled);
    890890        else if (!fMachinePaused)
     
    901901            case UIIndicatorStateRecording_Disabled:
    902902            {
    903                 strFullData += s_strTableRow1 /** @todo r=andy Refine this tooltip (audio and/or video). */
    904                     .arg(QApplication::translate("UIIndicatorsPool", "Video capture disabled", "Video capture tooltip"));
     903                strFullData += s_strTableRow1
     904                    .arg(QApplication::translate("UIIndicatorsPool", "Recording disabled", "Recording tooltip"));
    905905                break;
    906906            }
     
    909909            {
    910910                QString strToolTip;
    911                 if ( m_eRecordingMode & UIIndicatorStateRecordingMode_Audio &&
    912                     m_eRecordingMode & UIIndicatorStateRecordingMode_Video)
    913                     strToolTip = "Video/audio capture file";
    914                 else if (m_eRecordingMode & UIIndicatorStateRecordingMode_Audio)
    915                     strToolTip = "Audio capture file";
    916                 else if (m_eRecordingMode & UIIndicatorStateRecordingMode_Video)
    917                     strToolTip = "Video capture file";
     911                if (   m_enmRecordingMode & UIIndicatorStateRecordingMode_Audio
     912                    && m_enmRecordingMode & UIIndicatorStateRecordingMode_Video)
     913                    strToolTip = QApplication::translate("UIIndicatorsPool", "Video/audio recording file", "Recording tooltip");
     914                else if (m_enmRecordingMode & UIIndicatorStateRecordingMode_Audio)
     915                    strToolTip = QApplication::translate("UIIndicatorsPool", "Audio recording file", "Recording tooltip");
     916                else if (m_enmRecordingMode & UIIndicatorStateRecordingMode_Video)
     917                    strToolTip = QApplication::translate("UIIndicatorsPool", "Video recording file", "Recording tooltip");
    918918
    919919                /* For now all screens have the same config: */
    920                 CCaptureScreenSettings captureScreen0Settings = captureSettings.GetScreenSettings(0);
    921                 Assert(captureScreen0Settings.isOk());
    922 
    923                 strFullData += s_strTableRow2 /** @todo r=andy Refine this tooltip (audio and/or video). */
    924                     .arg(QApplication::translate("UIIndicatorsPool", strToolTip.toLatin1().constData(), "Video capture tooltip"))
    925                     .arg(captureScreen0Settings.GetFileName());
     920                CCaptureScreenSettings comRecordingScreen0Settings = comRecordingSettings.GetScreenSettings(0);
     921                Assert(comRecordingScreen0Settings.isOk());
     922
     923                strFullData += s_strTableRow2
     924                    .arg(strToolTip)
     925                    .arg(comRecordingScreen0Settings.GetFileName());
    926926                break;
    927927            }
     
    943943    void setRotationAngle(double dRotationAngle) { m_dRotationAngle = dRotationAngle; update(); }
    944944
    945     /* Parses CaptureScreenSettings::Options and updates m_eRecordingMode accordingly. */
     945    /* Parses CaptureScreenSettings::Options and updates m_enmRecordingMode accordingly. */
    946946    void updateRecordingMode()
    947947    {
    948         m_eRecordingMode = UIIndicatorStateRecordingMode_None;
     948        m_enmRecordingMode = UIIndicatorStateRecordingMode_None;
    949949
    950950        /* Get machine: */
    951951        if (!m_pSession)
    952952            return;
    953         const CMachine machine = m_pSession->machine();
    954         if (machine.isNull())
     953        const CMachine comMachine = m_pSession->machine();
     954        if (comMachine.isNull())
    955955            return;
    956956
    957         CCaptureSettings recordingSettings = machine.GetCaptureSettings();
     957        CCaptureSettings comRecordingSettings = comMachine.GetCaptureSettings();
    958958        /* For now all screens have the same config: */
    959         CCaptureScreenSettings recordingScreen0Settings = recordingSettings.GetScreenSettings(0);
     959        CCaptureScreenSettings recordingScreen0Settings = comRecordingSettings.GetScreenSettings(0);
    960960        if (recordingScreen0Settings.IsFeatureEnabled(KCaptureFeature_Video))
    961             m_eRecordingMode = (UIIndicatorStateRecordingMode)((int)m_eRecordingMode | (int)UIIndicatorStateRecordingMode_Video);
     961            m_enmRecordingMode = (UIIndicatorStateRecordingMode)((int)m_enmRecordingMode | (int)UIIndicatorStateRecordingMode_Video);
    962962
    963963        if (recordingScreen0Settings.IsFeatureEnabled(KCaptureFeature_Audio))
    964             m_eRecordingMode = (UIIndicatorStateRecordingMode)((int)m_eRecordingMode | (int)UIIndicatorStateRecordingMode_Audio);
     964            m_enmRecordingMode = (UIIndicatorStateRecordingMode)((int)m_enmRecordingMode | (int)UIIndicatorStateRecordingMode_Audio);
    965965    }
    966966
     
    970970    double m_dRotationAngle;
    971971
    972     UIIndicatorStateRecordingMode m_eRecordingMode;
     972    /** Holds the recording mode. */
     973    UIIndicatorStateRecordingMode m_enmRecordingMode;
    973974};
    974975
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r75291 r75319  
    21042104
    21052105    /* Make sure something had changed: */
    2106     CCaptureSettings recordingSettings = machine().GetCaptureSettings();
    2107     if (recordingSettings.GetEnabled() == static_cast<BOOL>(fEnabled))
     2106    CCaptureSettings comRecordingSettings = machine().GetCaptureSettings();
     2107    if (comRecordingSettings.GetEnabled() == static_cast<BOOL>(fEnabled))
    21082108        return;
    21092109
    21102110    /* Update recording state: */
    2111     recordingSettings.SetEnabled(fEnabled);
    2112     if (!recordingSettings.isOk())
     2111    comRecordingSettings.SetEnabled(fEnabled);
     2112    if (!comRecordingSettings.isOk())
    21132113    {
    21142114        /* Make sure action is updated: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r75291 r75319  
    724724void UISession::sltRecordingChange()
    725725{
    726     CCaptureSettings captureSettings = machine().GetCaptureSettings();
     726    CCaptureSettings comRecordingSettings = machine().GetCaptureSettings();
    727727
    728728    /* Check/Uncheck Capture action depending on feature status: */
    729729    actionPool()->action(UIActionIndexRT_M_View_M_Recording_T_Start)->blockSignals(true);
    730     actionPool()->action(UIActionIndexRT_M_View_M_Recording_T_Start)->setChecked(captureSettings.GetEnabled());
     730    actionPool()->action(UIActionIndexRT_M_View_M_Recording_T_Start)->setChecked(comRecordingSettings.GetEnabled());
    731731    actionPool()->action(UIActionIndexRT_M_View_M_Recording_T_Start)->blockSignals(false);
    732732
    733     /* Notify listeners about Capture change: */
     733    /* Notify listeners about Recording change: */
    734734    emit sigRecordingChange();
    735735}
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h

    r75291 r75319  
    258258    /** Updates VRDE Server action state. */
    259259    void updateStatusVRDE() { sltVRDEChange(); }
    260     /** Updates Video Capture action state. */
     260    /** Updates Recording action state. */
    261261    void updateStatusRecording() { sltRecordingChange(); }
    262262    /** Updates Audio output action state. */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp

    r75291 r75319  
    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_Recording:  pAction = actionPool()->action(UIActionIndexRT_M_View_M_Recording);      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;
  • trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.cpp

    r75291 r75319  
    13771377            {
    13781378                ++iRowCount;
    1379                 strItem += QString(sSectionItemTpl2).arg(QApplication::translate("UIGDetails", "Recording File", "details (display/video capture)"),
     1379                strItem += QString(sSectionItemTpl2).arg(QApplication::translate("UIGDetails", "Recording File", "details (display/recording)"),
    13801380                                                         empReport(aRecordingReport.value(0), aRecordingReportOld.value(0)));
    13811381                ++iRowCount;
    1382                 strItem += QString(sSectionItemTpl2).arg(QApplication::translate("UIGDetails", "Recording Attributes", "details (display/video capture)"),
     1382                strItem += QString(sSectionItemTpl2).arg(QApplication::translate("UIGDetails", "Recording Attributes", "details (display/recording)"),
    13831383                                                         empReport(aRecordingReport.value(1), aRecordingReportOld.value(1)));
    13841384            }
     
    13861386            {
    13871387                ++iRowCount;
    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()));
     1388                strItem += QString(sSectionItemTpl2).arg(QApplication::translate("UIGDetails", "Recording", "details (display/recording)"),
     1389                                                         empReport(QApplication::translate("UIGDetails", "Disabled", "details (display/recording)"), aRecordingReportOld.isEmpty()));
    13901390            }
    13911391
     
    17481748    QStringList aReport;
    17491749    /* Acquire recording status: */
    1750     CCaptureSettings recordingSettings = comMachine.GetCaptureSettings();
     1750    CCaptureSettings comRecordingSettings = comMachine.GetCaptureSettings();
    17511751    /* For now all screens have the same config: */
    1752     CCaptureScreenSettings recordingScreen0Settings = recordingSettings.GetScreenSettings(0);
    1753     if (recordingScreen0Settings.GetEnabled())
    1754     {
    1755         /* Recording ile: */
    1756         aReport << recordingScreen0Settings.GetFileName();
     1752    CCaptureScreenSettings comRecordingScreen0Settings = comRecordingSettings.GetScreenSettings(0);
     1753    if (comRecordingScreen0Settings.GetEnabled())
     1754    {
     1755        /* Recording file: */
     1756        aReport << comRecordingScreen0Settings.GetFileName();
    17571757        /* Recording attributes: */
    17581758        aReport << QApplication::translate("UIGDetails", "Frame Size: %1x%2, Frame Rate: %3fps, Bit Rate: %4kbps")
    1759                                            .arg(recordingScreen0Settings.GetVideoWidth())
    1760                                            .arg(recordingScreen0Settings.GetVideoHeight())
    1761                                            .arg(recordingScreen0Settings.GetVideoFPS())
    1762                                            .arg(recordingScreen0Settings.GetVideoRate());
     1759                                           .arg(comRecordingScreen0Settings.GetVideoWidth())
     1760                                           .arg(comRecordingScreen0Settings.GetVideoHeight())
     1761                                           .arg(comRecordingScreen0Settings.GetVideoFPS())
     1762                                           .arg(comRecordingScreen0Settings.GetVideoRate());
    17631763    }
    17641764    /* Return report: */
Note: See TracChangeset for help on using the changeset viewer.

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