VirtualBox

Changeset 54400 in vbox


Ignore:
Timestamp:
Feb 23, 2015 7:39:05 PM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
98500
Message:

FE/VBoxManage: Unified/renamed video recording options, implemented missing functionality.

Location:
trunk/src/VBox/Frontends/VBoxManage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp

    r54378 r54400  
    55
    66/*
    7  * Copyright (C) 2006-2014 Oracle Corporation
     7 * Copyright (C) 2006-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    13571357            if (RT_FAILURE(vrc))
    13581358            {
    1359                 RTMsgError("Failed to create file '%s'. rc=%Rrc", a->argv[2], vrc);
     1359                RTMsgError("Failed to create file '%s' (%Rrc)", a->argv[2], vrc);
    13601360                rc = E_FAIL;
    13611361                break;
     
    13641364            if (RT_FAILURE(vrc))
    13651365            {
    1366                 RTMsgError("Failed to write screenshot to file '%s'. rc=%Rrc", a->argv[2], vrc);
     1366                RTMsgError("Failed to write screenshot to file '%s' (%Rrc)", a->argv[2], vrc);
    13671367                rc = E_FAIL;
    13681368            }
    13691369            RTFileClose(pngFile);
    13701370        }
    1371         else if (   !strcmp(a->argv[1], "vcpenabled"))
     1371#ifdef VBOX_WITH_VPX
     1372        else if (!strcmp(a->argv[1], "videocap"))
    13721373        {
    13731374            if (a->argc != 3)
    13741375            {
    1375                 errorArgument("Missing argument to '%s'", a->argv[1]);
     1376                errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");
    13761377                rc = E_FAIL;
    13771378                break;
     
    13921393            }
    13931394        }
    1394         else if (   !strcmp(a->argv[1], "videocapturescreens"))
     1395        else if (   !strcmp(a->argv[1], "videocapscreens"))
    13951396        {
    13961397            ULONG cMonitors = 64;
     
    14101411                for (unsigned i = 0; i < cMonitors; i++)
    14111412                    saScreens[i] = false;
     1413
     1414                /** @todo r=andy What if this is specified? */
    14121415            }
    14131416            else
     
    14381441            CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureScreens)(ComSafeArrayAsInParam(saScreens)));
    14391442        }
     1443        else if (!strcmp(a->argv[1], "videocapfile"))
     1444        {
     1445            if (a->argc != 3)
     1446            {
     1447                errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");
     1448                rc = E_FAIL;
     1449                break;
     1450            }
     1451
     1452            CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureFile)(Bstr(a->argv[3]).raw()));
     1453        }
     1454        else if (!strcmp(a->argv[1], "videocapres"))
     1455        {
     1456            if (a->argc != 4)
     1457            {
     1458                errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");
     1459                rc = E_FAIL;
     1460                break;
     1461            }
     1462
     1463            uint32_t uVal;
     1464            int vrc = RTStrToUInt32Ex(a->argv[2], NULL, 0, &uVal);
     1465            if (RT_FAILURE(vrc))
     1466            {
     1467                errorArgument("Error parsing width '%s'", a->argv[2]);
     1468                rc = E_FAIL;
     1469                break;
     1470            }
     1471            CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureWidth)(uVal));
     1472
     1473            vrc = RTStrToUInt32Ex(a->argv[3], NULL, 0, &uVal);
     1474            if (RT_FAILURE(vrc))
     1475            {
     1476                errorArgument("Error parsing height '%s'", a->argv[3]);
     1477                rc = E_FAIL;
     1478                break;
     1479            }
     1480            CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureHeight)(uVal));
     1481        }
     1482        else if (!strcmp(a->argv[1], "videocaprate"))
     1483        {
     1484            if (a->argc != 3)
     1485            {
     1486                errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");
     1487                rc = E_FAIL;
     1488                break;
     1489            }
     1490
     1491            uint32_t uVal;
     1492            int vrc = RTStrToUInt32Ex(a->argv[2], NULL, 0, &uVal);
     1493            if (RT_FAILURE(vrc))
     1494            {
     1495                errorArgument("Error parsing rate '%s'", a->argv[2]);
     1496                rc = E_FAIL;
     1497                break;
     1498            }
     1499            CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureRate)(uVal));
     1500        }
     1501        else if (!strcmp(a->argv[1], "videocapfps"))
     1502        {
     1503            if (a->argc != 3)
     1504            {
     1505                errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");
     1506                rc = E_FAIL;
     1507                break;
     1508            }   
     1509
     1510            uint32_t uVal;
     1511            int vrc = RTStrToUInt32Ex(a->argv[2], NULL, 0, &uVal);
     1512            if (RT_FAILURE(vrc))
     1513            {
     1514                errorArgument("Error parsing FPS '%s'", a->argv[2]);
     1515                rc = E_FAIL;
     1516                break;
     1517            }
     1518            CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureFPS)(uVal));
     1519        }
     1520        else if (!strcmp(a->argv[1], "videocapmaxtime"))
     1521        {
     1522            if (a->argc != 3)
     1523            {
     1524                errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");
     1525                rc = E_FAIL;
     1526                break;
     1527            }
     1528
     1529            uint32_t uVal;
     1530            int vrc = RTStrToUInt32Ex(a->argv[2], NULL, 0, &uVal);
     1531            if (RT_FAILURE(vrc))
     1532            {
     1533                errorArgument("Error parsing maximum time '%s'", a->argv[2]);
     1534                rc = E_FAIL;
     1535                break;
     1536            }
     1537            CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureMaxTime)(uVal));
     1538        }
     1539        else if (!strcmp(a->argv[1], "videocapmaxsize"))
     1540        {
     1541            if (a->argc != 3)
     1542            {
     1543                errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");
     1544                rc = E_FAIL;
     1545                break;
     1546            }   
     1547
     1548            uint32_t uVal;
     1549            int vrc = RTStrToUInt32Ex(a->argv[2], NULL, 0, &uVal);
     1550            if (RT_FAILURE(vrc))
     1551            {
     1552                errorArgument("Error parsing maximum file size '%s'", a->argv[2]);
     1553                rc = E_FAIL;
     1554                break;
     1555            }
     1556            CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureMaxFileSize)(uVal));
     1557        }
     1558        else if (!strcmp(a->argv[1], "videocapopts"))
     1559        {
     1560            if (a->argc != 3)
     1561            {
     1562                errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters");
     1563                rc = E_FAIL;
     1564                break;
     1565            }   
     1566
     1567            CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureOptions)(Bstr(a->argv[3]).raw()));
     1568        }
     1569#endif /* VBOX_WITH_VPX */
    14401570        else if (!strcmp(a->argv[1], "webcam"))
    14411571        {
  • trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp

    r53062 r54400  
    55
    66/*
    7  * Copyright (C) 2006-2014 Oracle Corporation
     7 * Copyright (C) 2006-2015 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    377377#endif
    378378#ifdef VBOX_WITH_VPX
    379                      "                            [--vcpenabled on|off]\n"
    380                      "                            [--vcpscreens [<display>],...\n"
    381                      "                            [--vcpfile <filename>]\n"
    382                      "                            [--vcpwidth <width>]\n"
    383                      "                            [--vcpheight <height>]\n"
    384                      "                            [--vcprate <rate>]\n"
    385                      "                            [--vcpfps <fps>]\n"
    386                      "                            [--vcpmaxtime <time>]\n"
    387                      "                            [--vcpmaxsize <size>]\n"
    388                      "                            [--vcpoptions <options>]\n"
     379                     "                            [--videocap on|off]\n"
     380                     "                            [--videocapscreens all|<screen ID> [<screen ID> ...]]\n"
     381                     "                            [--videocapfile <filename>]\n"
     382                     "                            [--videocapres <width> <height>]\n"
     383                     "                            [--videocaprate <rate>]\n"
     384                     "                            [--videocapfps <fps>]\n"
     385                     "                            [--videocapmaxtime <time>]\n"
     386                     "                            [--videocapmaxsize <MB>]\n"
     387                     "                            [--videocapopts <key=value> [<key=value> ...]]\n"
    389388#endif
    390389                     "                            [--defaultfrontend default|<name>]\n"
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