- Timestamp:
- Aug 16, 2012 9:21:09 AM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 80095
- Location:
- trunk/src/VBox
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/Makefile.kmk
r41477 r42838 76 76 $(if $(VBOX_WITH_VIRTIO),VBOX_WITH_VIRTIO) \ 77 77 $(if $(VBOX_WITH_USB_CARDREADER),VBOX_WITH_USB_CARDREADER) \ 78 $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH) 78 $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH) \ 79 $(if $(VBOX_WITH_VPX),VBOX_WITH_VPX) 79 80 80 81 ifneq ($(KBUILD_TARGET),win) -
trunk/src/VBox/Frontends/VBoxManage/VBoxManageModifyVM.cpp
r42551 r42838 38 38 #include <iprt/getopt.h> 39 39 #include <VBox/log.h> 40 40 #include <iprt/log.h> 41 41 #include "VBoxManage.h" 42 42 43 43 #ifndef VBOX_ONLY_DOCS 44 44 using namespace com; 45 46 45 #define LOG_GROUP LOG_GROUP_MAIN 47 46 /** @todo refine this after HDD changes; MSC 8.0/64 has trouble with handleModifyVM. */ 48 47 #if defined(_MSC_VER) … … 192 191 MODIFYVM_USBCARDREADER, 193 192 #endif 194 MODIFYVM_CHIPSET 193 MODIFYVM_CHIPSET, 194 #ifdef VBOX_WITH_VPX 195 MODIFYVM_VCP, 196 MODIFYVM_VCP_FILENAME, 197 MODIFYVM_VCP_WIDTH, 198 MODIFYVM_VCP_HEIGHT 199 #endif 195 200 }; 196 201 … … 329 334 { "--faulttolerancesyncinterval", MODIFYVM_FAULT_TOLERANCE_SYNC_INTERVAL, RTGETOPT_REQ_UINT32 }, 330 335 { "--chipset", MODIFYVM_CHIPSET, RTGETOPT_REQ_STRING }, 336 #ifdef VBOX_WITH_VPX 337 { "--videocapture", MODIFYVM_VCP , RTGETOPT_REQ_BOOL_ONOFF }, 338 { "--vcpfilename", MODIFYVM_VCP_FILENAME, RTGETOPT_REQ_STRING }, 339 { "--vcpwidth", MODIFYVM_VCP_WIDTH, RTGETOPT_REQ_UINT32 }, 340 { "--vcpheight", MODIFYVM_VCP_HEIGHT, RTGETOPT_REQ_UINT32 }, 341 #endif 331 342 { "--autostart-enabled", MODIFYVM_AUTOSTART_ENABLED, RTGETOPT_REQ_BOOL_ONOFF }, 332 343 { "--autostart-delay", MODIFYVM_AUTOSTART_DELAY, RTGETOPT_REQ_UINT32 }, … … 467 478 case MODIFYVM_VRAM: 468 479 { 480 LogFlow(("Modify VRANM\n")); 469 481 CHECK_ERROR(machine, COMSETTER(VRAMSize)(ValueUnion.u32)); 470 482 break; … … 2395 2407 break; 2396 2408 } 2409 #ifdef VBOX_WITH_VPX 2410 case MODIFYVM_VCP: 2411 { 2412 CHECK_ERROR(machine, COMSETTER(VideoCaptureEnabled)(ValueUnion.f)); 2413 break; 2414 } 2415 case MODIFYVM_VCP_FILENAME: 2416 { 2417 //CHECK_ERROR(machine, COMSETTER(VideoRecFilename)(ValueUnion.psz)); 2418 break; 2419 } 2420 case MODIFYVM_VCP_WIDTH: 2421 { 2422 CHECK_ERROR(machine, COMSETTER(VideoCaptureWidth)(ValueUnion.u32)); 2423 break; 2424 } 2425 case MODIFYVM_VCP_HEIGHT: 2426 { 2427 CHECK_ERROR(machine, COMSETTER(VideoCaptureHeight)(ValueUnion.u32)); 2428 break; 2429 } 2430 #endif 2397 2431 case MODIFYVM_AUTOSTART_ENABLED: 2398 2432 { -
trunk/src/VBox/Main/Makefile.kmk
r42810 r42838 67 67 $(if $(VBOX_WITH_USB_CARDREADER),VBOX_WITH_USB_CARDREADER,) \ 68 68 $(if $(VBOX_WITH_USB_CARDREADER_TEST),VBOX_WITH_USB_CARDREADER_TEST,) \ 69 $(if $(VBOX_WITH_HOSTNETIF_API),VBOX_WITH_HOSTNETIF_API,) 69 $(if $(VBOX_WITH_HOSTNETIF_API),VBOX_WITH_HOSTNETIF_API,) \ 70 70 71 71 # Unconditionally enable the new semaphore key generation code … … 518 518 DLLS += VBoxC 519 519 VBoxC_TEMPLATE = VBOXMAINCOMP 520 VBoxC_SDKS = VBOX_LIBPNG VBOX_ZLIB521 520 VBoxC_DEFS = \ 522 521 IN_RING3 \ … … 542 541 $(if-expr defined(VBOX_WITH_EHCI) && defined(VBOX_WITH_USB),VBOX_WITH_EHCI,) \ 543 542 $(if $(VBOX_WITH_EXTPACK),VBOX_WITH_EXTPACK,) \ 544 $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH,) 543 $(if $(VBOX_WITH_PCI_PASSTHROUGH),VBOX_WITH_PCI_PASSTHROUGH,) \ 544 $(if $(VBOX_WITH_VPX),VBOX_WITH_VPX,) 545 545 546 546 VBoxC_DEFS.darwin.x86 = VBOX_WITH_2X_4GB_ADDR_SPACE 547 547 VBoxC_DEFS.win.x86 += _WIN32_WINNT=0x0500 548 548 VBoxC_DEFS.win.amd64 += _WIN32_WINNT=0x0510 549 550 ifdef VBOX_WITH_VPX 551 VBoxC_SDKS = VBOX_LIBPNG VBOX_ZLIB VBOX_VPX 552 else 553 VBoxC_SDKS = VBOX_LIBPNG VBOX_ZLIB 554 endif 549 555 550 556 VBoxC_INCS = \ … … 671 677 endif 672 678 679 ifdef VBOX_WITH_VPX 680 VBoxC_SOURCES += \ 681 src-client/EbmlWriter.cpp \ 682 src-client/VideoRec.cpp 683 endif 684 673 685 ifdef VBOX_WITH_NETSHAPER 674 686 VBoxC_DEFS += VBOX_WITH_NETSHAPER -
trunk/src/VBox/Main/idl/VirtualBox.xidl
r42819 r42838 4038 4038 </attribute> 4039 4039 4040 <attribute name="VideoCaptureEnabled" type="boolean" default="false"> 4041 <desc> 4042 This setting determines whether VirtualBox uses video recording to 4043 record VM session.</desc> 4044 </attribute> 4045 4046 <attribute name="VideoCaptureFile" type="wstring" default="Test.webm"> 4047 <desc> 4048 This setting determines what filename VirtualBox uses to save 4049 the recorded content.</desc> 4050 </attribute> 4051 4052 <attribute name="VideoCaptureWidth" type="unsigned long" default="640"> 4053 <desc> 4054 This setting determines what should be the horizontal resolution of 4055 recorded video.</desc> 4056 </attribute> 4057 4058 <attribute name="VideoCaptureHeight" type="unsigned long" default="480"> 4059 <desc> 4060 This setting determines what should be the vertical resolution 4061 of recorded video.</desc> 4062 </attribute> 4063 4040 4064 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes"> 4041 4065 <desc>Object containing all BIOS settings.</desc> -
trunk/src/VBox/Main/include/MachineImpl.h
r42569 r42838 258 258 BOOL mPageFusionEnabled; 259 259 ULONG mVRAMSize; 260 ULONG mVideoCaptureWidth; 261 ULONG mVideoCaptureHeight; 262 Bstr mVideoCaptureFile; 263 BOOL mVideoCaptureEnabled; 260 264 ULONG mMonitorCount; 261 265 BOOL mHWVirtExEnabled; … … 414 418 STDMETHOD(COMGETTER(VRAMSize))(ULONG *memorySize); 415 419 STDMETHOD(COMSETTER(VRAMSize))(ULONG memorySize); 420 STDMETHOD(COMGETTER(VideoCaptureEnabled))(BOOL *u8VideoRecEnabled); 421 STDMETHOD(COMSETTER(VideoCaptureEnabled))(BOOL u8VideoRecEnabled); 422 STDMETHOD(COMGETTER(VideoCaptureFile))(BSTR * ppChVideoRecFilename); 423 STDMETHOD(COMSETTER(VideoCaptureFile))(IN_BSTR pChVideoRecFilename); 424 STDMETHOD(COMGETTER(VideoCaptureWidth))(ULONG *u32VideoRecHorzRes); 425 STDMETHOD(COMSETTER(VideoCaptureWidth))(ULONG u32VideoRecHorzRes); 426 STDMETHOD(COMGETTER(VideoCaptureHeight))(uint32_t *u32VideoRecVertRes); 427 STDMETHOD(COMSETTER(VideoCaptureHeight))(uint32_t u32VideoRecVertRes); 416 428 STDMETHOD(COMGETTER(MonitorCount))(ULONG *monitorCount); 417 429 STDMETHOD(COMSETTER(MonitorCount))(ULONG monitorCount); -
trunk/src/VBox/Main/src-client/DisplayImpl.cpp
r42646 r42838 48 48 #include <VBox/com/array.h> 49 49 50 #ifdef VBOX_WITH_VPX _MAIN51 # include " EncodeAndWrite.h"50 #ifdef VBOX_WITH_VPX 51 # include "VideoRec.h" 52 52 PVIDEORECCONTEXT pVideoRecContext; 53 53 #endif 54 54 #define DEBUG_sunlover 55 55 /** 56 56 * Display driver instance data. … … 447 447 ULONG ul; 448 448 mParent->machine()->COMGETTER(MonitorCount)(&ul); 449 #ifdef VBOX_WITH_VPX 450 ULONG ulVideoCaptureHorzRes; 451 ULONG ulVideoCaptureVertRes; 452 char *pchVideoCaptureFile; 453 BSTR strVideoCaptureFile; 454 bool Enabled; 455 LogFlow(("Init And Create\n")); 456 int res = VideoRecContextCreate(&pVideoRecContext); 457 res = RTCritSectInit(&pVideoRecContext->CritSect); 458 AssertReturn(res == VINF_SUCCESS, E_UNEXPECTED); 459 mParent->machine()->COMGETTER(VideoCaptureWidth)(&ulVideoCaptureHorzRes); 460 mParent->machine()->COMGETTER(VideoCaptureHeight)(&ulVideoCaptureVertRes); 461 mParent->machine()->COMGETTER(VideoCaptureFile)(&strVideoCaptureFile); 462 if(res == VINF_SUCCESS) 463 res = VideoRecContextInit(pVideoRecContext,strVideoCaptureFile, ulVideoCaptureHorzRes, ulVideoCaptureVertRes); 464 #endif 449 465 mcMonitors = ul; 450 466 … … 3174 3190 unsigned uScreenId; 3175 3191 3192 LogFlow(("DisplayRefreshCallback \n")); 3176 3193 for (uScreenId = 0; uScreenId < pDisplay->mcMonitors; uScreenId++) 3177 3194 { … … 3211 3228 { 3212 3229 int rc = pDisplay->videoAccelRefreshProcess(); 3213 3214 3230 if (rc != VINF_TRY_AGAIN) /* Means 'do nothing' here. */ 3215 3231 { … … 3245 3261 } 3246 3262 } 3247 #ifdef VBOX_WITH_VPX_MAIN 3248 ULONG u32PixelFormat; 3249 uint8_t *u8TmpBuf; 3263 #ifdef VBOX_WITH_VPX 3250 3264 uint32_t u32VideoRecImgFormat = VPX_IMG_FMT_NONE; 3251 3265 DISPLAYFBINFO *pFBInfo = &pDisplay->maFramebuffers[VBOX_VIDEO_PRIMARY_SCREEN]; 3252 3266 int rc; 3253 3254 3267 3255 3268 if (!pFBInfo->pFramebuffer.isNull() && !(pFBInfo->fDisabled) … … 3280 3293 rc = pFBInfo->pFramebuffer->COMGETTER(BytesPerLine) (&ulBytesPerLine); 3281 3294 AssertComRC (rc); 3282 3283 3284 switch (ulBitsPerPixel)3285 {3286 case 32:3287 case 24:3288 case 16:3289 u32PixelFormat = FramebufferPixelFormat_FOURCC_RGB;3290 break;3291 default:3292 u32PixelFormat = FramebufferPixelFormat_Opaque;3293 break;3294 }3295 3295 3296 3296 if(ulPixelFormat == FramebufferPixelFormat_FOURCC_RGB) … … 3319 3319 { 3320 3320 VideoRecCopyToIntBuffer(pVideoRecContext, pFBInfo->xOrigin, pFBInfo->yOrigin, 3321 u 32PixelFormat, ulBitsPerPixel, ulBytesPerLine,3321 ulPixelFormat, ulBitsPerPixel, ulBytesPerLine, 3322 3322 ulGuestWidth, ulGuestHeight, address); 3323 3323 3324 3325 LogFlow(("RGB:YUV\n"));3326 3324 VideoRecDoRGBToYUV(pVideoRecContext, u32VideoRecImgFormat); 3327 LogFlow(("Encode\n"));3328 3325 VideoRecEncodeAndWrite(pVideoRecContext, ulGuestWidth, ulGuestHeight); 3329 3326 } … … 4310 4307 pData->IConnector.pfnVBVAMousePointerShape = Display::displayVBVAMousePointerShape; 4311 4308 #endif 4312 #ifdef VBOX_WITH_VPX_MAIN4313 LogFlow(("Init And Create\n"));4314 int res = VideoRecContextCreate(&pVideoRecContext);4315 res = RTCritSectInit(&pVideoRecContext->CritSect);4316 AssertReturn(res == VINF_SUCCESS, E_UNEXPECTED);4317 4318 if(res == VINF_SUCCESS)4319 res = VideoRecContextInit(pVideoRecContext, "test.webm", 640, 480);4320 4321 #endif4322 4323 4309 4324 4310 /* -
trunk/src/VBox/Main/src-server/MachineImpl.cpp
r42831 r42838 166 166 mAccelerate2DVideoEnabled = false; 167 167 mMonitorCount = 1; 168 mVideoCaptureFile = "Test.webm"; 169 mVideoCaptureWidth = 640; 170 mVideoCaptureHeight = 480; 171 mVideoCaptureEnabled = true; 172 168 173 mHWVirtExEnabled = true; 169 174 mHWVirtExNestedPagingEnabled = true; … … 1656 1661 1657 1662 return rc; 1663 } 1664 1665 STDMETHODIMP Machine::COMGETTER(VideoCaptureEnabled)(BOOL * fEnabled) 1666 { 1667 AutoCaller autoCaller(this); 1668 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1669 1670 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1671 1672 *fEnabled = mHWData->mVideoCaptureEnabled; 1673 return S_OK; 1674 } 1675 1676 STDMETHODIMP Machine::COMSETTER(VideoCaptureEnabled)(BOOL fEnabled) 1677 { 1678 AutoCaller autoCaller(this); 1679 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1680 1681 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 1682 mHWData->mVideoCaptureEnabled = fEnabled; 1683 return S_OK; 1684 } 1685 1686 STDMETHODIMP Machine::COMGETTER(VideoCaptureFile)(BSTR * ppChFile) 1687 { 1688 AutoCaller autoCaller(this); 1689 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1690 1691 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1692 mHWData->mVideoCaptureFile.cloneTo(ppChFile); 1693 return S_OK; 1694 } 1695 1696 STDMETHODIMP Machine::COMSETTER(VideoCaptureFile)(IN_BSTR pChFile) 1697 { 1698 AutoCaller autoCaller(this); 1699 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1700 1701 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 1702 mHWData->mVideoCaptureFile = pChFile; 1703 return S_OK; 1704 } 1705 1706 1707 STDMETHODIMP Machine::COMGETTER(VideoCaptureWidth)(uint32_t *u32HorzRes) 1708 { 1709 AutoCaller autoCaller(this); 1710 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1711 1712 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1713 *u32HorzRes = mHWData->mVideoCaptureWidth; 1714 return S_OK; 1715 } 1716 1717 STDMETHODIMP Machine::COMSETTER(VideoCaptureWidth)(uint32_t u32HorzRes) 1718 { 1719 AutoCaller autoCaller(this); 1720 if (FAILED(autoCaller.rc())) 1721 { 1722 LogFlow(("Autolocked failed\n")); 1723 return autoCaller.rc(); 1724 } 1725 1726 AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS); 1727 mHWData->mVideoCaptureWidth = u32HorzRes; 1728 return S_OK; 1729 } 1730 1731 STDMETHODIMP Machine::COMGETTER(VideoCaptureHeight)(uint32_t *u32VertRes) 1732 { 1733 AutoCaller autoCaller(this); 1734 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1735 1736 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1737 *u32VertRes = mHWData->mVideoCaptureHeight; 1738 return S_OK; 1739 } 1740 1741 STDMETHODIMP Machine::COMSETTER(VideoCaptureHeight)(uint32_t u32VertRes) 1742 { 1743 AutoCaller autoCaller(this); 1744 if (FAILED(autoCaller.rc())) return autoCaller.rc(); 1745 1746 AutoReadLock alock(this COMMA_LOCKVAL_SRC_POS); 1747 mHWData->mVideoCaptureHeight = u32VertRes; 1748 return S_OK; 1658 1749 } 1659 1750 … … 8422 8513 mHWData->mAccelerate3DEnabled = data.fAccelerate3D; 8423 8514 mHWData->mAccelerate2DVideoEnabled = data.fAccelerate2DVideo; 8515 mHWData->mVideoCaptureWidth = data.ulVideoCaptureHorzRes; 8516 mHWData->mVideoCaptureHeight = data.ulVideoCaptureVertRes; 8517 mHWData->mVideoCaptureEnabled = data.fVideoCaptureEnabled; 8518 mHWData->mVideoCaptureFile = data.strVideoCaptureFile; 8424 8519 mHWData->mFirmwareType = data.firmwareType; 8425 8520 mHWData->mPointingHIDType = data.pointingHIDType; … … 9622 9717 data.fAccelerate3D = !!mHWData->mAccelerate3DEnabled; 9623 9718 data.fAccelerate2DVideo = !!mHWData->mAccelerate2DVideoEnabled; 9719 data.ulVideoCaptureHorzRes = mHWData->mVideoCaptureWidth; 9720 data.ulVideoCaptureVertRes = mHWData->mVideoCaptureHeight; 9721 data.fVideoCaptureEnabled = !! mHWData->mVideoCaptureEnabled; 9722 data.strVideoCaptureFile = mHWData->mVideoCaptureFile; 9624 9723 9625 9724 /* VRDEServer settings (optional) */ -
trunk/src/VBox/Main/xml/Settings.cpp
r42551 r42838 1589 1589 #endif 1590 1590 1591 /**1592 * Hardware struct constructor.1593 */1594 1591 Hardware::Hardware() 1595 1592 : strVersion("1"), … … 1610 1607 fAccelerate3D(false), 1611 1608 fAccelerate2DVideo(false), 1609 ulVideoCaptureHorzRes(640), 1610 ulVideoCaptureVertRes(480), 1611 fVideoCaptureEnabled(false), 1612 strVideoCaptureFile("Test.webm"), 1612 1613 firmwareType(FirmwareType_BIOS), 1613 1614 pointingHIDType(PointingHIDType_PS2Mouse), … … 1674 1675 && (fAccelerate3D == h.fAccelerate3D) 1675 1676 && (fAccelerate2DVideo == h.fAccelerate2DVideo) 1677 && (fVideoCaptureEnabled == h.fVideoCaptureEnabled) 1678 && (strVideoCaptureFile == h.strVideoCaptureFile) 1679 && (ulVideoCaptureHorzRes == h.ulVideoCaptureHorzRes) 1680 && (ulVideoCaptureVertRes == h.ulVideoCaptureVertRes) 1676 1681 && (firmwareType == h.firmwareType) 1677 1682 && (pointingHIDType == h.pointingHIDType) … … 2556 2561 pelmHwChild->getAttributeValue("accelerate2DVideo", hw.fAccelerate2DVideo); 2557 2562 } 2563 else if (pelmHwChild->nameEquals("VideoRecording")) 2564 { 2565 pelmHwChild->getAttributeValue("enabled", hw.fVideoCaptureEnabled); 2566 pelmHwChild->getAttributeValue("file", hw.strVideoCaptureFile); 2567 pelmHwChild->getAttributeValue("horzRes", hw.ulVideoCaptureHorzRes); 2568 pelmHwChild->getAttributeValue("vertRes", hw.ulVideoCaptureVertRes); 2569 } 2570 2558 2571 else if (pelmHwChild->nameEquals("RemoteDisplay")) 2559 2572 { … … 3702 3715 if (m->sv >= SettingsVersion_v1_8) 3703 3716 pelmDisplay->setAttribute("accelerate2DVideo", hw.fAccelerate2DVideo); 3717 xml::ElementNode *pelmVideoCapture = pelmHardware->createChild("VideoRecording"); 3718 3719 if (m->sv >= SettingsVersion_v1_12) 3720 { 3721 pelmVideoCapture->setAttribute("enabled", hw.fVideoCaptureEnabled); 3722 pelmVideoCapture->setAttribute("file", hw.strVideoCaptureFile); 3723 pelmVideoCapture->setAttribute("horzRes", hw.ulVideoCaptureHorzRes); 3724 pelmVideoCapture->setAttribute("vertRes", hw.ulVideoCaptureVertRes); 3725 } 3704 3726 3705 3727 xml::ElementNode *pelmVRDE = pelmHardware->createChild("RemoteDisplay"); -
trunk/src/VBox/Main/xml/VirtualBox-settings-common.xsd
r42261 r42838 460 460 461 461 <xsd:complexType name="TDisplay"> 462 <xsd:element name="VideoRecording"> 463 <xsd:complexType> 464 <xsd:attribute name="enabled" type="xsd:boolean"/> 465 <xsd:attribute name="file" type="xsd:string"/> 466 <xsd:attribute name="horzRes" use="required"> 467 <xsd:simpleType> 468 <xsd:restriction base="xsd:unsignedInt"> 469 <xsd:minInclusive value="4"/> 470 <xsd:maxInclusive value="2097152"/> 471 </xsd:restriction> 472 </xsd:simpleType> 473 </xsd:attribute> 474 <xsd:attribute name="vertRes" type="xsd:unsignedInt"/> 475 </xsd:complexType> 476 </xsd:element> 462 477 <xsd:attribute name="VRAMSize" use="required"> 463 478 <xsd:simpleType>
Note:
See TracChangeset
for help on using the changeset viewer.