Changeset 54421 in vbox
- Timestamp:
- Feb 24, 2015 8:37:27 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManageControlVM.cpp
r54400 r54421 1370 1370 } 1371 1371 #ifdef VBOX_WITH_VPX 1372 else if (!strcmp(a->argv[1], "videocap")) 1372 /* 1373 * Note: Commands starting with "vcp" are the deprecated versions and are 1374 * kept to ensure backwards compatibility. 1375 */ 1376 else if ( !strcmp(a->argv[1], "videocap") 1377 || !strcmp(a->argv[1], "vcpenabled")) 1373 1378 { 1374 1379 if (a->argc != 3) … … 1393 1398 } 1394 1399 } 1395 else if ( !strcmp(a->argv[1], "videocapscreens")) 1400 else if ( !strcmp(a->argv[1], "videocapscreens") 1401 || !strcmp(a->argv[1], "vcpscreens")) 1396 1402 { 1397 1403 ULONG cMonitors = 64; … … 1441 1447 CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureScreens)(ComSafeArrayAsInParam(saScreens))); 1442 1448 } 1443 else if (!strcmp(a->argv[1], "videocapfile")) 1449 else if ( !strcmp(a->argv[1], "videocapfile") 1450 || !strcmp(a->argv[1], "vcpfile")) 1444 1451 { 1445 1452 if (a->argc != 3) … … 1480 1487 CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureHeight)(uVal)); 1481 1488 } 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 1489 else if (!strcmp(a->argv[1], "vcpwidth")) /* Deprecated; keeping for compatibility. */ 1490 { 1491 1491 uint32_t uVal; 1492 1492 int vrc = RTStrToUInt32Ex(a->argv[2], NULL, 0, &uVal); 1493 1493 if (RT_FAILURE(vrc)) 1494 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 1495 errorArgument("Error parsing width '%s'", a->argv[2]); 1496 rc = E_FAIL; 1497 break; 1498 } 1499 CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureWidth)(uVal)); 1500 } 1501 else if (!strcmp(a->argv[1], "vcpheight")) /* Deprecated; keeping for compatibility. */ 1502 { 1510 1503 uint32_t uVal; 1511 1504 int vrc = RTStrToUInt32Ex(a->argv[2], NULL, 0, &uVal); 1512 1505 if (RT_FAILURE(vrc)) 1513 1506 { 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")) 1507 errorArgument("Error parsing height '%s'", a->argv[2]); 1508 rc = E_FAIL; 1509 break; 1510 } 1511 CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureHeight)(uVal)); 1512 } 1513 else if ( !strcmp(a->argv[1], "videocaprate") 1514 || !strcmp(a->argv[1], "vcprate")) 1521 1515 { 1522 1516 if (a->argc != 3) … … 1525 1519 rc = E_FAIL; 1526 1520 break; 1527 } 1521 } 1528 1522 1529 1523 uint32_t uVal; … … 1531 1525 if (RT_FAILURE(vrc)) 1532 1526 { 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")) 1527 errorArgument("Error parsing rate '%s'", a->argv[2]); 1528 rc = E_FAIL; 1529 break; 1530 } 1531 CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureRate)(uVal)); 1532 } 1533 else if ( !strcmp(a->argv[1], "videocapfps") 1534 || !strcmp(a->argv[1], "vcpfps")) 1540 1535 { 1541 1536 if (a->argc != 3) … … 1550 1545 if (RT_FAILURE(vrc)) 1551 1546 { 1547 errorArgument("Error parsing FPS '%s'", a->argv[2]); 1548 rc = E_FAIL; 1549 break; 1550 } 1551 CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureFPS)(uVal)); 1552 } 1553 else if ( !strcmp(a->argv[1], "videocapmaxtime") 1554 || !strcmp(a->argv[1], "vcpmaxtime")) 1555 { 1556 if (a->argc != 3) 1557 { 1558 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters"); 1559 rc = E_FAIL; 1560 break; 1561 } 1562 1563 uint32_t uVal; 1564 int vrc = RTStrToUInt32Ex(a->argv[2], NULL, 0, &uVal); 1565 if (RT_FAILURE(vrc)) 1566 { 1567 errorArgument("Error parsing maximum time '%s'", a->argv[2]); 1568 rc = E_FAIL; 1569 break; 1570 } 1571 CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureMaxTime)(uVal)); 1572 } 1573 else if ( !strcmp(a->argv[1], "videocapmaxsize") 1574 || !strcmp(a->argv[1], "vcpmaxsize")) 1575 { 1576 if (a->argc != 3) 1577 { 1578 errorSyntax(USAGE_CONTROLVM, "Incorrect number of parameters"); 1579 rc = E_FAIL; 1580 break; 1581 } 1582 1583 uint32_t uVal; 1584 int vrc = RTStrToUInt32Ex(a->argv[2], NULL, 0, &uVal); 1585 if (RT_FAILURE(vrc)) 1586 { 1552 1587 errorArgument("Error parsing maximum file size '%s'", a->argv[2]); 1553 1588 rc = E_FAIL; … … 1556 1591 CHECK_ERROR_BREAK(sessionMachine, COMSETTER(VideoCaptureMaxFileSize)(uVal)); 1557 1592 } 1558 else if (!strcmp(a->argv[1], "videocapopts")) 1593 else if ( !strcmp(a->argv[1], "videocapopts") 1594 || !strcmp(a->argv[1], "vcpoptions")) 1559 1595 { 1560 1596 if (a->argc != 3)
Note:
See TracChangeset
for help on using the changeset viewer.