Changeset 54400 in vbox
- Timestamp:
- Feb 23, 2015 7:39:05 PM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 98500
- Location:
- trunk/src/VBox/Frontends/VBoxManage
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r54378 r54400 5 5 6 6 /* 7 * Copyright (C) 2006-201 4Oracle Corporation7 * Copyright (C) 2006-2015 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 1357 1357 if (RT_FAILURE(vrc)) 1358 1358 { 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); 1360 1360 rc = E_FAIL; 1361 1361 break; … … 1364 1364 if (RT_FAILURE(vrc)) 1365 1365 { 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); 1367 1367 rc = E_FAIL; 1368 1368 } 1369 1369 RTFileClose(pngFile); 1370 1370 } 1371 else if ( !strcmp(a->argv[1], "vcpenabled")) 1371 #ifdef VBOX_WITH_VPX 1372 else if (!strcmp(a->argv[1], "videocap")) 1372 1373 { 1373 1374 if (a->argc != 3) 1374 1375 { 1375 error Argument("Missing argument to '%s'", a->argv[1]);1376 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters"); 1376 1377 rc = E_FAIL; 1377 1378 break; … … 1392 1393 } 1393 1394 } 1394 else if ( !strcmp(a->argv[1], "videocap turescreens"))1395 else if ( !strcmp(a->argv[1], "videocapscreens")) 1395 1396 { 1396 1397 ULONG cMonitors = 64; … … 1410 1411 for (unsigned i = 0; i < cMonitors; i++) 1411 1412 saScreens[i] = false; 1413 1414 /** @todo r=andy What if this is specified? */ 1412 1415 } 1413 1416 else … … 1438 1441 CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureScreens)(ComSafeArrayAsInParam(saScreens))); 1439 1442 } 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 */ 1440 1570 else if (!strcmp(a->argv[1], "webcam")) 1441 1571 { -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageHelp.cpp
r53062 r54400 5 5 6 6 /* 7 * Copyright (C) 2006-201 4Oracle Corporation7 * Copyright (C) 2006-2015 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 377 377 #endif 378 378 #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" 389 388 #endif 390 389 " [--defaultfrontend default|<name>]\n"
Note:
See TracChangeset
for help on using the changeset viewer.